Create your games with the Stage library and microPython

A project log for microByte

OpenSource hand-held retro console which can emulate NES, GameBoy/GameBoy Color, Game Gear, and Sega MasterSystem

Juan FloresJuan Flores 03/11/2021 at 16:332 Comments


I think that the microByte can be an interesting tool to developed your games. So, a while ago a saw the Stage library for microPython and CircuitPython, I was amazed at how good it looks the demos.  

I've "ported" the Stage library to the custom version of microPython that I'm working on, but with some improvements, for example, I've integrated the library on microPython.

One of the advantages of this approach is that now I'm able to separate the rendering process and "paint" processes on differents cores and tasks, or use the ST7889 driver written on C, which uses the standard ESP-IDF SPI calls. All of this gives a huge improvement in performance.

This is a pretty simple demo, but on the naked eye run very smooth:

I'll continue working on the microPython custom version and Stage library because I think that it's possible to obtain very cool results.


Juan Flores wrote 03/13/2021 at 14:46 point


The Stage library is pretty cool, you did a very nice work!

Yes I'm mergint LVGL with the Stage library on a custom version of microPython. I've modified a little bit both libraries, to take advantage of the multicore architecture of the ESP32, so echa library has a render and "paint" task, so you can pause any of them to avoid issues with the display call. 

Regarding the compatibility, well, you need to do a little modification on the source code of the game, because I don't use ugame, due to I've implemented the buttons, display or sound control on microPython, so it's implemented on the machine module. 

But I think I could do somekind of fix, adding an empty ugame module , to continue with the compatibility. 

  Are you sure? yes | no

deʃhipu wrote 03/12/2021 at 14:09 point

I haven't seen this before, I'm so happy to see the Stage library being used! I see you are merging it with LVGL? Will it still be compatible with the games written for the regular Stage library?

  Are you sure? yes | no