Please sign in to access this page

GamePico

GamePico

26 devlogs
63h 41m
•  Ship certified
Created by Matt

A project in MicroPython that includes games and tools for making games (or other programs that can utilize a GUI) for the original Raspberry Pi Pico equipped with a 240px*240px LCD display.
See the GitHub repository and readme for all the details.

Timeline

I also thought I would post an alternative setup to the one that I posted originally. This one is much more compact and only requires the Pico and the display to be connected together. However, it requires powering by USB and also can't record the screen to an SD card.

Update attachment

I fixed the bug with the buttons not centering properly in the horizontal scrolling menu.

Update attachment

So, I finally added a difficulty selector to the snake game. With that I fixed a few bugs as well (for example in the vertical scrolling menu, where the selected button did not render as selected if it was selected by the joystick center button).
I also realized that I forgot to put out a devlog about adding a horizontal scrolling menu function that I added and it is used for example for the difficulty selection.
However there is still a bug that causes the buttons not to center correctly.

Update attachment

I just added a How to run section to README

Update attachment
Matt
Matt
1h 33m 3 days ago

I completely refactored the snake game and removed redundant code.

Update attachment

I fixed the snek game that I broke when adding the multiline text support and I added a cooler game over screen.

Update attachment
Matt
Matt
3h 47m 4 days ago

I spent some more time refining the code and I added multiline text support which allows me to do stuff like this very easily:
(It should also work seamlessly with any other functions like buttons or titles.)

Update attachment

Ship 1

0 payouts of shell 0 shells

Matt

9 days ago

Matt Covers 19 devlogs and 54h 44m

I just added a simple controls tutorial/walkthrough and now I am ready to ship.

(Once again, note that all the screen captures from the Pi Pico are upscaled from 240*240 to 960*960 resolution in all my devlogs.)

Update attachment

I just finalized readme and I am working on uploading a video of the working project. Once I'm done, I'm ready to ship.

Update attachment
Matt
Matt
3h 35m 9 days ago

I added a brightness setting. (the effects of which are not visible on the recording but trust me, it works)
I also managed to seamlessly integrate it with the scrolling menu such that for the user it seems like they have not left the menu.

Update attachment

I just updated the behaviour of the scrolling menu when the A, B, X or Y buttons are pressed.

Update attachment
Matt
Matt
3h 25m 10 days ago

I added a scrolling menu function. Now there can literally be an unlimited amount of options in one menu. (granted as long as the fit into the rather limited RAM of the pico)
Now I only need to add a brightness and difficulty option and I think I'll be ready to ship this project.

Update attachment
Matt
Matt
4h 46m 11 days ago

I reworked how buttons are created and rendered into a class structure.

Update attachment
Matt
Matt
3h 23m 14 days ago

I fixed the image displaying function and also fixed all the image assets. I also added much better functions to record the display.

Update attachment
Matt
Matt
1h 58m 15 days ago

I've finally fixed the problem with color conversion and I added some minor features.
I now have to fix the image loading function.

Update attachment
Matt
Matt
4h 10m 15 days ago

So after three painful hours and almost designing my own tool to export images to the pico I discovered that the problem was partially me and partially in the fact that there probably is a bug in the micropython framebuf library.
Specifically in the way it processes RGB565 colors. In the image below you can see that I am setting the pixel 0, 0 to the color code #F800 which in the RGB565 color space corresponds to red.
However as you can see in the console the data written to the bytearray is actually #00F8 which is in fact not #F800 as one would expect. This, I believe is caused by the fact that the library treats the second byte as the higher byte when it should be the other way around.
All this now means that I will have to come up with a new color conversion function that works around this and also I will have to fix the new function that displays images from files.

Update attachment

I refactored the main menu code and I added a logo to the main menu. I also added a function to load and display images while restricting the amount of RAM used. There are however still some issues with this function. I will have to figure out why and how to fix them.

Update attachment

I thought I should also show off the current setup of the pi pico. As it is the project is currently fully compatible with the raspberry PI pico, pico 2, and pico 2 W. It also fully works if you flash the normal pico firmware onto the pico W. It however does have issues with insufficient memory on the normal pico W. But I do have plans to try to fix this.

Update attachment

I now also fixed the screen recording feature. Each time a recording is started, new folder is created for it. This was broken because I implemented it only halfway but it should work well now.

Update attachment
Matt
Matt
2h 23m 25 days ago

I finally ported my own version of the snake game from my old project! Here is a little showcase of it: (Note that it is again upscaled from the original 240*240 resolution.)

Update attachment

I came up with a way to prevent most of the unwanted multi-clicks that are caused by the low quality buttons of the display.

Update attachment
Matt
Matt
4h 38m 27 days ago

I added better key press handling using IRQ interrupts in order to fix the issue where some key presses were not registered.
I have also discovered that the joystick button on the display that I chose tends to multiple-click. I will try to rectify this in the software in the future.

Update attachment

Since Each devlog allows for only one image, I am posting this one to show off the screenshot exporting tool itself as well.
I also fixed the file number selector in the screenshot export tool.

I can finally export animations!
I have finished a tool to export images on the PICO in multiple formats, including GIF. Now, I will focus on adding proper configuration files and settings menu.

Update attachment

I have added a screenshot function. I will have to implement it properly now in order to allow for recording as well. And I also added the possibility to save the screenshots to an SD card.
Now, I will focus on creating a proper tool to export those screenshots and I will try to add the posibility to record GIFs.
(The screenshot here is upscaled from the original 240*240 size)

Update attachment

So, after more than 7 hours of work this is my first devlog. I've started refactoring my old code and so far the main menu is mostly done. I have also made a new logo for this project of mine. Now I'll work on actually adding some basic settings and rewriting my old snake game to make it compatible with this new version of the code.

Update attachment