Skip to main content

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

Architecture Decision Records

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bge-0.1.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bge-0.1.0-py3-none-any.whl (135.5 kB view details)

Uploaded Python 3

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

Hashes for bge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 741c28a8fc005b1941b6acd32f8c7dfa4b3e77045d46068fe54eb5531ec2ca5b
MD5 193a35558e3d2eb5f9a929131de7c0ef
BLAKE2b-256 ebbcd65eb624796db8fb2346f40296ec7875f062a6235b3a1835adf70205a145

See more details on using hashes here.

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

Hashes for bge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d15a72f519b78ede0cf32079da23da4fdf1c9fcc0e69396b9d71f8e6bc0e0234
MD5 211b7a3eb98c495b5c5e90f52ae7648f
BLAKE2b-256 a81661c0675ac307743b50551e60109fd40b475fc51a2c3a831eba81d4d9fc9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page