Pong on the Game Boy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libstdgb @ ad5d763
src
.gitignore
.gitmodules
COPYING
Makefile
README
README.md
rom-spec.json
tiles.png
updatedeps.sh

README.md

gbpong

Pong on the Game Boy!

This small game is designed as a demonstration for Delwink's libstdgb library for developing for the Game Boy. Since Pong is the "hello world" of game development, I thought it would be well-suited as a test of the library's capabilities and the readability of its API.

Build Instructions

You'll need the GNU Make, Small Device C Compiler (SDCC) and Wand for Python 3. On Debian-based systems, you can install as follows:

# apt-get install make sdcc python3-wand

After that, just run

$ git submodule init
$ git submodule update
$ make

Finally, you'll have pong.gb which can be run on an emulator or flashed to your programmable cartridge.

If you get a syntax error while compiling, try

$ make CFLAGS=-DINT_BOOLS

On older versions of SDCC, the bool type doesn't work properly, so I added a way to use integers as boolean types. It makes the binary a bit larger and the computation slower, but it should still work.

Hacking

Match the style you see in the code. Do not use spaces for indentation.

Since the Game Boy is a very limited platform, code is expected to be written for binary efficiency. If you're just getting into Game Boy development, try mixing around nested if checks, and evaluate when pointers can efficiently be used, and check the output of gbromgen to see how your code affects the binary size.

License

gbpong is libre software: you are free to use, modify, and redistribute it under the terms of version 3 of the GNU Affero General Public License. See COPYING for details.