Drawing primitives and bitmap mirroring for uPyGame / MicroPython


I am adding drawing primitives and bitmap mirroring to uPyGame / MicroPython.

P.s. I do not know why the anim-gif is so slow (it is recorded with Pokitto Emulator). The performance in HW is about 25-40 FPS, depending on the primitive.


This is awesome!

… Also, the demo is quite hypnotizing… O__o


I speed up all my gifs to 600% in ezgif.com

Then it roughly matches the hardware


Where did the cat sprite come from?
More cats please!

Seriously though, drawing primitives are a big step forward.

Usually I edit .gifs with GIMP, but I see the framerate varies,
so I can’t just set the frame duration like I normally would.


Useful addition. Very Mice demo :grin:


updated the anim-gif to match better to the speed in HW


I measured the mirrored blit performance.

  • The vertical mirroring is as fast as normal blit
  • The horizontal mirroring is only 7% slower than the normal blit


Further measurement, blitting 50 bitmaps of size 16x16:

  • normal blit: 48 fps
  • horizontally mirrored blit:47 fps
  • vertically mirrored blit: 49 fps :slight_smile:

Differences are actually under 2% (compared to the normal blit), no need to optimize.