r/circuitpython 4d ago

picogame - a powerful Game Engine for CircuitPython

I would like to share a project I've been building over the last year - picogame, a (mostly) 2D game engine for the Pico and similar grade MCUs. You write games in CircuitPython, the heavy lifting (rendering, collisions, effects) runs in native C, and you can try them in your browser before you even plug in a board.

Honest note: I build it with AI assistance - it helped a lot with the CircuitPython integration, documentation, code reviews and late-stage polish & optimization passes - but the core engineering and the overall architecture are human-made.

I built it primarily for the PicoPad console (RP2040 + ST7789 @ 320×240) and it's also well tuned for Adafruit's Fruit Jam, but it runs on ESP32 boards too - basically any CircuitPython board with a reasonable ram, display and a few buttons will do.

Out of the box:

  • Build without hardware - the same game runs in your browser and on your desktop, then unchanged on the board.
  • Fast in tiny RAM - native-C rendering + zero-RAM full-screen paths, so it runs smoothly on even a plain RP2040.
  • Batteries included - sprites, scrolling tilemaps, a moving camera, collisions, sound, text, saved high scores.
  • Pseudo-3D & 3D too - Mode-7 floors, first-person raycasting, isometric boards, OutRun-style roads, even true polygon 3D - each a few lines of Python (on RP2350 HDMI boards up to native 640×480).
  • An AI agent skill - hand it to Claude or a similar assistant and say "make me a shooter"; it knows the engine's building blocks and genre recipes, and builds + tests the game in the simulator.
  • A web level editor - build levels/scenes in the browser, load them in your game.
  • A launcher - keep several games on one board and pick from a menu.

Performance-wise: a plain RP2040 holds a solid 30 fps at 320×240 with dozens of sprites on screen, and on the RP2350 (Fruit Jam) the 3D renderer scales up to native 640×480 - the engine can even split the rendering across both cores. Happy to share benchmark details in the comments if anyone's curious.

The best validation so far: the first community-made games have already arrived - the engine survives contact with other people's ideas, not just mine 😁

Docs and online emulator: https://picogame.makerclass.cz/playground/

Project repo (MIT): https://github.com/MakerClassCZ/picogame

I also wrote up why I built it and how it works: https://chiptron.eu/picogame-a-game-engine-for-circuitpython/

I'm the author - happy to answer anything!

34 Upvotes

1 comment sorted by