Box Game Engine — a 2D game engine optimized for AI agent development
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bge-0.1.0.tar.gz.
File metadata
- Download URL: bge-0.1.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
741c28a8fc005b1941b6acd32f8c7dfa4b3e77045d46068fe54eb5531ec2ca5b
|
|
| MD5 |
193a35558e3d2eb5f9a929131de7c0ef
|
|
| BLAKE2b-256 |
ebbcd65eb624796db8fb2346f40296ec7875f062a6235b3a1835adf70205a145
|
File details
Details for the file bge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 135.5 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d15a72f519b78ede0cf32079da23da4fdf1c9fcc0e69396b9d71f8e6bc0e0234
|
|
| MD5 |
211b7a3eb98c495b5c5e90f52ae7648f
|
|
| BLAKE2b-256 |
a81661c0675ac307743b50551e60109fd40b475fc51a2c3a831eba81d4d9fc9e
|