Simplex Engine is a modern game engine written in Python, featuring an Entity-Component-System (ECS) architecture with integrated development tools.
We believe hardware performance will continue to improve in the future. This project aims to deliver the best experience to our customers:
- Game players
- Game developers
- Video creators
We believe a simplified engine (less code complexity, more functionality) will make game and video development faster, easier, and better.
Current Focus: Building a Minecraft-like voxel game engine with infinite procedural worlds, multiplayer support, and comprehensive development tools.
- ECS Architecture: Entity-Component-System for clean, modular game logic
- 3D Voxel Rendering: OpenGL-based rendering for block-based worlds (planned)
- Infinite Worlds: Chunk-based streaming for limitless procedural worlds (planned)
- Event-Driven Design: Unified event system for inter-system communication
- Input System: Responsive input handling with keyboard/mouse support
- Collision Detection: AABB collision system with voxel world integration
- Multiplayer Ready: Network architecture for multiplayer voxel worlds (planned)
- World Generation: Procedural terrain, biomes, and structures (planned)
- Development Tools: Debug overlays, world editor, and real-time configuration
# Clone the repository
git clone https://github.com/import1bones/simplex-engine.git
cd simplex-engine
# Install dependencies (using uv package manager)
uv sync
# Set up Python path and run the game
PYTHONPATH=/path/to/simplex-engine python3 examples/ping_pong/test_simple.py
# Or run the full-featured version
PYTHONPATH=/path/to/simplex-engine python3 examples/ping_pong/main_gui.py
- W/S Keys: Move player paddle up/down
- UP/DOWN Arrow Keys: Alternative paddle controls
- F1-F4: Debug functions (when available)
- ESC: Exit game
Comprehensive documentation is available in the docs/
directory:
- Getting Started - Installation, first project, and tutorials
- Core Concepts - Architecture, ECS, events, and systems
- Examples & Tutorials - Complete games and step-by-step guides
- API Reference - Complete API documentation
- Advanced Topics - Performance, networking, and expert techniques
- Development Guide - Contributing and extending the engine
I want to... | Go to... |
---|---|
Learn the basics | Getting Started Guide |
Build my first game | Ping Pong Tutorial |
Understand ECS | Core Concepts |
Find API details | API Reference |
Optimize performance | Advanced Topics |
Contribute code | Development Guide |
- Engine: Central game engine coordinator
- ECS (Entity-Component-System): Manages game entities and their components
- Event System: Handles communication between systems
- Renderer: Graphics rendering with pygame backend
- Input System: Processes keyboard input and forwards to game systems
- Collision System: Detects and handles entity collisions
- Movement System: Applies velocity to entity positions
- Scoring System: Manages game scoring and win conditions
All systems communicate through a unified event system:
# Emit events
engine.events.emit('input', input_event)
engine.events.emit('physics_collision', collision_data)
# Register event handlers
engine.events.register('score', handle_score_event)
The input system features a unified pipeline:
- Pygame Events β captured by SimpleRenderer
- Event Translation β pygame events converted to engine events
- Input System β processes events and maintains input state
- Game Logic β systems respond to input state changes
By using Python for all subsystems, this engine provides dynamic behavior when building game or video systems. For example, when you write a command, you immediately see the result on your monitor. Once you confirm it works as intended, you can build for better performance.
Python offers a superior development interface, making development and debugging easier and faster.
The engine includes a complete ping-pong game demonstrating:
- Player vs AI gameplay
- Real-time input handling
- Collision detection between ball and paddles
- Boundary collision handling
- Scoring system with win conditions
- Debug overlay for development
from simplex.ecs.ecs import Entity
from simplex.ecs.components import PositionComponent, VelocityComponent
# Create a player entity
player = Entity('player')
player.add_component(PositionComponent(100, 200, 0))
player.add_component(VelocityComponent(0, 0, 0))
engine.ecs.add_entity(player)
from simplex.ecs.systems import InputSystem, MovementSystem
# Create and register systems
input_system = InputSystem(event_system=engine.events)
movement_system = MovementSystem(event_system=engine.events)
engine.ecs.add_system(input_system)
engine.ecs.add_system(movement_system)
- Debug Overlay: Real-time system information
- Pause System: Pause/resume game execution
- Development Console: Runtime debugging capabilities
- Logging System: Multi-level logging with configurable output
The engine uses TOML configuration files for settings:
[engine]
debug_mode = true
target_fps = 60
[renderer]
width = 800
height = 600
simplex-engine/
βββ simplex/
β βββ engine.py # Core engine
β βββ ecs/ # Entity-Component-System
β β βββ ecs.py # ECS implementation
β β βββ components.py # Game components
β β βββ systems.py # Game systems
β βββ renderer/ # Rendering system
β β βββ simple_renderer.py
β βββ utils/ # Utilities
β βββ events/ # Event system
βββ examples/
β βββ ping_pong/ # Ping-pong game example
βββ docs/ # Documentation
- Fork the repository
- Create a feature branch
- Make your changes
- Test with the ping-pong example
- Submit a pull request
- Fixed input responsiveness issues where keys would only work once
- Implemented proper KEYUP/KEYDOWN event handling
- Unified input pipeline through SimpleRenderer
- Added comprehensive input state management
- Enhanced logging for input debugging
- Complete ping-pong game with AI opponent
- Enhanced collision detection with spin effects
- Scoring system with win conditions
- Real-time score display
- Smooth 60fps gameplay
[License information to be added]
For issues, questions, or contributions, please visit the GitHub repository.