https://github.com/meithecatte/rpi-game
An arcade game for the Raspberry Pi
https://github.com/meithecatte/rpi-game
Last synced: 11 months ago
JSON representation
An arcade game for the Raspberry Pi
- Host: GitHub
- URL: https://github.com/meithecatte/rpi-game
- Owner: meithecatte
- Created: 2017-05-24T14:44:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-01T12:39:03.000Z (about 4 years ago)
- Last Synced: 2025-01-30T19:49:12.730Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 11.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rpi-game
Turns a Raspberry Pi into a gaming platform. A simple snake game is implemented.
Makes use of a SNES controller connected over GPIO.
## Adding a new game
* Add to `GAMES` in `Makefile`
* Add to `game_index_t` in `gamedef.h`
* Add to `gamedef.c`
* Assets in `assets/gamename/*`
* Code in `gamename/*`
* `startFunc` is called once, then `renderFunc` every frame
* to exit, cleanup everything and call `GameExit`
* define your images in `IMAGE_LIST` in `global.h`
## Save format used by games
### Ekans
| Bytes | Corresponding variable |
|:---------:| ------------------------------------------------- |
| 0 - 119 | `Ekans_ScoresTableEntry gEkansHighscores[10]` |
| 120 - 127 | `char gEkansScoreName[8]` |
#### Ekans_ScoresTableEntry
| Bytes | Corresponding variable |
|:---------:| ------------------------------------------------- |
| 0 - 7 | `char name[8]` |
| 8 - 11 | `int score` |