Flappy bird on a Pi Pico 2 written in C, with the goal of writing it in ARM assembly in the future. Uses an SSD1306 display and doesn't use any libraries other than the Pico SDK.
Youssef
Check their project out: ReeTui
Jack Wetmore
Check their project out: Pretty Pong
555 timer
Check their project out: DOOMkey
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Added the demo video to the readme, I think I'm ready to ship!
It's done! I'm resetting the game by soft resetting the entire pi pico. Turns out that the Pico SDK didn't have a soft reset function (you can use watchdogs but that's janky and results in the pico locking up after reset occasionally for some reason? I think it might be an I2C-related thing as I wasn't resetting the display). So I had to write a value to the AIRCR register (standard register across many ARM cortex M-series chips I believe) in order to reset the RP2350. Anyway, the entire game is fully functional and done now :D
Added gravity! I'm still tweaking the jump velocity and gravity acceleration values so that it feels more natural, but gravity is done!
The bitmap drawing function now returns the number of pixels that were already on. I'll be using this for collision checking (if this number is > 0, we have a collision)
Input handling is done! I decided to use interrupts because it's better for handling button presses even at low tick rates, as it isn't limited to the same poll rate as the tick speed. (I know that there are ways to get around that, but interrupts probably simpler).
Who knew drawing a monochrome bird would be the hardest part of the project? It took way longer than 20 min btw (more like 1.5 hours), it just didn't track on Hackatime because I didn't have the plugin installed for aseprite :(
Finally figured out how to control the SSD1306, so I can control the state of each pixel now. All that's left to do is the game logic for flappy bird.
Started work on the display write function, trying to decipher the SSD1306 datasheet
Managed to somehow figure out the I2C interface, so now we have blink running on the entire screen (the chonky line in the middle of the screen is because of screen tearing, it looks normal in-person).
Finally managed to set up the Pico SDK (yay!), though I had to configure a bunch of udev rules for openocd to work properly without sudo (so that VSCode debugging could work properly).