Flappy pig is an Arduino Uno hyper casual game. It was developed as a side project during the university class "Arduino and multicore programming" at Sapienza. It uses U8g2 to communicate, via the SPI protocol, directly to the screen hardware without worring about low level details.
Download the progetto.ino file and install the latest U8g2 library version. Add the following lines inside these library files.
// inside U8g2lib.h right after nextPage definition
void customPage(uint8_t page) { u8g2_customPage(&u8g2, page); }
// inside u8g2.h right after u8g2_NextPage declaration
void u8g2_customPage(u8g2_t *u8g2, uint8_t page);
// inside u8g2_buffer.c right after u8g2_NextPage definition
void u8g2_customPage(u8g2_t *u8g2, uint8_t page) {
if ( u8g2->is_auto_page_clear )
{
u8g2_ClearBuffer(u8g2);
}
u8g2_SetBufferCurrTileRow(u8g2, page);
}
You can now compile and try the game!
- 8bit sounds effects when the player dies or earns a point
- Easy to play
- 14fps on average with a clock speed of 16mhz, 2kb of sram and a 1.5inch oled screen
- Compatible with every monochrome SPI Arduino display
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contribution you make to Flappy pig is greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Flappy-pig is released under the under terms of the MIT License.