BGE — Box Game Engine
A 2D/3D game engine designed for development by AI agents using Claude Code.
Philosophy
BGE is built around a simple idea: every aspect of your game is a text file. Scenes are YAML, scripts are Python, configuration is TOML. There is no visual editor — AI agents (or humans) author content by reading and writing files directly. This makes the entire development workflow version-controlled, diffable, and transparent.
Features
- Entity-Component-System (ECS) architecture — composable, flat, agent-friendly
- YAML scenes — declarative entity definitions, trivial to diff and modify
- Python scripting — write behavior as plain Python classes, no DSL to learn
- Abstract renderer — 2D (pygame-ce) and 3D (ModernGL) backends behind one interface
- Addon system — extend the engine with new components, systems, and CLI commands
- CSS textures — any texture field accepts
css:linear-gradient(...)strings - Prefabs, save/load, particles, tilemaps, tweens, camera effects — built in
- Headless mode — run and test games without a display window
- CLI-first — all operations available as
bge <command>
Quick Start
# Install with uv
uv pip install -e .
# Create a new project
bge new my_game
# Run a demo (headless smoke test)
SDL_VIDEODRIVER=dummy bge run demos/pong/ --headless --frames 120
# Run a demo interactively
bge run demos/snake/
# Validate scene files
bge validate my_game/
# Package a game as a standalone executable
bge build demos/snake/
Project Layout
my_game/
├── project.toml # Window size, FPS, entry scene, renderer backend
├── scenes/
│ └── main.yaml # Entity definitions
├── scripts/
│ └── player.py # Behavior scripts
├── prefabs/ # Reusable YAML entity templates (optional)
├── addons/ # Project-local engine extensions (optional)
└── assets/ # Textures, sounds
Demos
Each directory under demos/ is a self-contained game: pong, snake, pacman_game_design_document (Pac-Man, including its source GDD), bouncing, particles, animation_demo, card_battle, roguelike, shader_demo, car_game (3D), and network_demo (LAN multiplayer via a project-local addon).
Documentation
- Getting Started
- Agent Guide
- Scene Reference
- Component Reference
- Scripting Guide
- Addon Development
- Build & Distribution
Architecture Decision Records
- ADR-001: Language Choice
- ADR-002: ECS Architecture
- ADR-003: Scene Format
- ADR-004: Renderer Abstraction
- ADR-005: Addon System
- ADR-006: Package Layout
License
MIT
Release files for bge 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bge-0.1.0.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / bge-0.1.0.tar.gz
| Download URL | bge-0.1.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
741c28a8fc005b1941b6acd32f8c7dfa4b3e77045d46068fe54eb5531ec2ca5b
|
|
BLAKE2b-256 checksum How to use checksums |
ebbcd65eb624796db8fb2346f40296ec7875f062a6235b3a1835adf70205a145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / bge-0.1.0-py3-none-any.whl
| Download URL | bge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 135.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d15a72f519b78ede0cf32079da23da4fdf1c9fcc0e69396b9d71f8e6bc0e0234
|
|
BLAKE2b-256 checksum How to use checksums |
a81661c0675ac307743b50551e60109fd40b475fc51a2c3a831eba81d4d9fc9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|