Drawing primitives and bitmap mirroring for uPyGame / MicroPython

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

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.

8 Likes

This is awesome!

… Also, the demo is quite hypnotizing… O__o

3 Likes

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.

1 Like

Useful addition. Very Mice demo :grin:

2 Likes

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

1 Like

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
2 Likes

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.

5 Likes