A Game Boy ROM, hand-written in SM83 assembly (RGBDS), implementing a variation on Pong: a single player-controlled paddle bounces a ball off the top and bottom walls, aiming to keep it in play. Built from scratch: tile data, OAM sprite handling, VBlank-synced input, and collision detection, with no engine underneath it.
src/
├── lib
│ ├── hardware.inc ; standard RGBDS hardware register/constant definitions
│ └── objects.asm ; paddle and ball tile data
└── pong.asm ; entry point, main loop, input handling, ball physics, collision, interrupt handler
In active development. Currently:
- Paddle renders as three stacked 8×8 tiles and moves with Up/Down, clamped to the screen bounds.
- Second paddle (computer-controlled) renders on the opposite side of the field.
- Ball renders and moves diagonally every frame, bouncing off the top and bottom walls.
- Ball-paddle collision detection is wired up against both paddles (bounding-box check against each paddle's X plane and Y span).
- Computer paddle tracks the ball's y-position every frame, moving one pixel at a time toward it, clamped to the screen bounds.
- Ball resets after any player "scores".
- No scoring display yet.
Requires RGBDS 0.5.0 or later.
cd src
make # assemble, link, and fix the ROM -> pong.gb
make run # open pong.gb in the default Game Boy emulator
make clean # remove build artifacts (pong.gb, pong.o, pong.sym)Load the resulting pong.gb in SameBoy or any other Game Boy emulator (or flash it to a cartridge for the real thing).
| Button | Action |
|---|---|
| Up | Move paddle up |
| Down | Move paddle down |
- gb-asm-tutorial: primary source for the underlying course material
- Pan Docs: the Game Boy hardware bible
- RGBDS Documentation
- gbdev hardware.inc: the hardware register/constant definitions this project includes
- SameBoy: emulator/debugger used throughout development
