A Python-first mini game engine and toolkit for building small arcade games.
Mini Arcade is a monorepo with a simulation-first engine core, swappable backends (native SDL2 and pygame), runnable examples, and reference games.
Current status: alpha.
The project is actively developed and APIs may still evolve.
Install:
pip install mini-arcadeRun from an installed environment:
mini-arcade run --example config/engine_config_basics
mini-arcade run --game deja-bounceEquivalent module form:
python -m mini_arcade.main run --example config/engine_config_basics
python -m mini_arcade.main run --game deja-bounceFrom the monorepo root:
./scripts/dev_install.ps1
python .\manage.py run --example config/engine_config_basics
python .\manage.py run --game space-invadersNotes:
manage.pyis the preferred local entrypoint for games and examples.- The runner prepends local
packages/*/srcpaths so workspace code wins over installed wheel metadata. - When
backend.provider: nativeis selected, Mini Arcade now honors that choice strictly. It does not silently fall back topygame. - The native backend uses Python source from the repo plus a compiled
_nativeextension from the active environment. If Python and C++ changes drift out of sync, rebuild with:
python -m pip install -e .\packages\mini-arcade-native-backend- Scene registry and scene stack with overlays
- System pipeline with ordered phases
- Command queue for scene/game actions
- Runtime services (window, input, render, audio, capture, files)
- Render pipeline passes (begin, world, lighting, ui, postfx, end)
- Built-in capture hooks (screenshot, replay, video frame capture)
- Swappable backends:
mini-arcade-pygame-backendmini-arcade-native-backend
Run a game:
mini-arcade run --game asteroidsRun an example:
mini-arcade run --example config/backend_swapRun all examples as a tour:
mini-arcade run tourForward args to the example runner:
mini-arcade run --example config/backend_swap --pass-through --backend native --fps 72from mini_arcade_core import EngineConfig, SceneConfig, run_game
from mini_arcade_pygame_backend import PygameBackend, PygameBackendSettings
backend_settings = PygameBackendSettings.from_dict(
{
"window": {"width": 960, "height": 540, "title": "My Game"},
"renderer": {"background_color": (20, 20, 20)},
}
)
backend = PygameBackend(settings=backend_settings)
engine_config = EngineConfig(
fps=60,
virtual_resolution=(960, 540),
enable_profiler=False,
)
scene_config = SceneConfig(
initial_scene="menu",
discover_packages=["my_game.scenes", "mini_arcade_core.scenes"],
)
run_game(
engine_config=engine_config,
scene_config=scene_config,
backend=backend,
)Use the detailed guide:
That guide includes:
- required folder and metadata layout
- complete
settings.ymltemplate - minimal runnable scene and commands
- full bootstrap (
manage.py+app.py) pattern used by current games
mini-arcade/
|- packages/
| |- mini-arcade/
| |- mini-arcade-core/
| |- mini-arcade-pygame-backend/
| `- mini-arcade-native-backend/
|- games/
|- examples/
|- docs/
`- scripts/
See:
MIT. See LICENSE.