Improving the Microcontroller Gaming Performance with PicoGame

Wait 5 sec.

The ability to write Python on microcontrollers with the likes of MicroPython and later CiruitPython has made them much more accessible. [MakerClassCZ] brings that to game development with PicoGame.Like any good project, it starts with a problem that needs solving. Put simply, the existing CircuitPython libraries aren’t too impressive for gaming. The DisplayIO library tends to do full display refreshes, which are slow on such tiny displays, and the Stage library just wasn’t flexible enough for [MakerClassCZ]’s liking. So he built his own.PicoGame, like the others, implements the performance-sensitive things in C, but does partial updates for the screen, on its own massively increasing the framerate. On the other end, it uses fixed-point math–much cheaper than soft-float–and makes an active effort to keep the RAM usage low so Python can have it. What’s even more clever is using the downtime between sending one tiny portion of frame to calculate the next just in time.Of course, the display is still the limit. If you need to update a lot of it, you might end up with 10 FPS if you’re lucky. But if you can settle for less motion, you could see 100.