A drop-in stage + ugame compatibility layer: existing
python-ugame/stage games run on the
picogame engine unmodified - same code.py, same 16-colour .bmp assets - just by putting
these modules on the import path instead of the originals. No _stage C module needed; the rendering
is reimplemented on top of the picogame C engine.
Why bother: the shim is fully compatible, fullscreen, and ~2x faster than the
original _stage on the same game (measured on a PicoPad).
| File | What it is |
|---|---|
stage.py |
The stage API on picogame: Bank / Grid / WallGrid / Sprite / Text / Stage / collide (+ BMP16/PNG16 loaders). Sprite rotation 0..7 maps to picogame flip/transpose. |
ugame.py |
The board half: display, buttons.get_pressed() + K_* constants, audio (best-effort). |
picogame_bitfont.py |
The 8x8 outlined font stage's Text renders with (1:1 game glyphs + ASCII). Bundled so the kit is self-contained; also usable standalone for picogame HUDs. |
mpy/ |
Pre-compiled .mpy of each module (smaller, faster import). |
- A board running CircuitPython with the
picogameC module built in (the engine). - Nothing else -
stage.pyonly importspicogame,picogame_bitfontand the standardboard/time/array/structmodules. It does not depend on thepicogame_*helper library.
- Build/flash a picogame-enabled CircuitPython firmware on the board.
- Copy
stage.py,ugame.py,picogame_bitfont.py(or theirmpy/builds) intoCIRCUITPY/lib/. - Drop an existing
stage/ugamegame'scode.py+.bmpassets in the CIRCUITPY root. It runs unmodified.
Textis rendered with the bundled 8x8 bitfont (stage's own glyphs), scaled to match the screen - content is faithful; exact glyph shapes differ slightly from the original_stagefont.Sprite.rotation(0..7) maps onto picogame's flip/transpose; the 4 diagonal values use transpose.
MIT. stage.py is a compatibility reimplementation derived from
python-ugame/circuitpython-stage
(MIT, © Radomir Dopieralski) - see the header in stage.py. See LICENSE.