# ChenEngine **Repository Path**: open-all-things/chen-engine ## Basic Information - **Project Name**: ChenEngine - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-06 - **Last Updated**: 2026-04-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ChenEngine A 2D game engine with C/C++ core and Python bindings. ## Features - 2D rendering with support for materials and sprites - Keyboard input callback system - Sound system for loading and playing audio - Python API for easy game development - C/C++ core for performance ## Dependencies - SDL2 - SDL2_mixer - Python 3.6+ - CMake ## Installation ### 1. Install dependencies ```bash sudo apt-get install libsdl2-dev libsdl2-mixer-dev python3-dev cmake ``` ### 2. Compile the C/C++ core ```bash cd chenengine/core mkdir build cd build cmake .. make ``` ### 3. Install the Python package ```bash cd ../../.. pip install -e . ``` ## Usage ```python from chenengine.python import ChenEngine, load_sound, play_sound, destroy_sound # Initialize engine engine = ChenEngine(800, 600, "Test Game") # Load material player_material = engine.load_material("assets/player.bmp") # Load sound jump_sound = load_sound("assets/jump.wav") # Key callback function def key_callback(key, state): if state == 1: # Key pressed if key == 32: # Space bar play_sound(jump_sound) # Set key callback engine.set_key_callback(key_callback) # Update function def update(engine): pass # Render function def render(engine): engine.render_sprite(player_material, 100, 100) # Run engine engine.run(update, render) # Cleanup destroy_sound(jump_sound) ``` ## Example See `examples/test_game.py` for a complete example. ## Directory Structure ``` ChenEngine/ ├── chenengine/ │ ├── core/ # C/C++ core code │ └── python/ # Python bindings ├── examples/ # Example code │ └── assets/ # Example assets ├── docs/ # Documentation └── setup.py # Python package setup ```