Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.58 KB

0113-2023-07-12.md

File metadata and controls

41 lines (31 loc) · 1.58 KB

12 Jul 2023

Previous journal: Next journal:
0112-2023-07-11.md 0114-2023-07-13.md

Pygame and "BOOP!" for Lily

I took a break from the usual Verilog/ASIC stuff to start working on a game for Lily, which I've called "BOOP!".

This is being done using Pygame, and for now its funtionality is very simple:

  • Go full-screen on monitor 0 (which for me is my main, large display).
  • Set resolution to 1280x720
  • Very slowly cycle the background colour through the spectrum, with low brightness
  • Calculate FPS and display in top-right corner
  • Quit is a key combo unlikely to be hit by Lily: CTRL+ALT + numpad star
  • B key displays a (distorted) banana.

I think the standard way I'm using Pygame at the moment is using very primitive image transforms and rendering, which is unlike how it's typically done with polygon texture rendering, i.e. after I load a "texture" I can't render/blit it at any dynamic size and opacity...?

I also tried using this:

screen = pygame.display.set_mode(
    (1280,720),
    pygame.FULLSCREEN | pygame.OPENGL,
    display=0, vsync=1
)

...but I just get a black screen.

Maybe check out this and this game might include examples of fast image/texture transforms.

NOTE: It's still possible that Lily will find key combos that switch from the game to other apps, but this might help.