Activeweb appsPython

Snaike

GameBoy snake game

34 viewsAdded 1mo ago

AI-Agent Assisted

Tier 2
Claude Code
Signals: README-built-with-claude-code

README

SNaiKE

A classic Snake game for the Nintendo GameBoy (DMG), developed with GBDK-2020.

https://github.com/user-attachments/assets/5b5c5ec4-51fe-499a-b9df-269d15cd73fc

Features

  • Classic Snake gameplay
  • Progressive speed increase
  • High score tracking (per session)
  • Title screen, Game Over screen, Victory screen
  • Sound effects

Requirements

  • GBDK-2020 installed at C:\gbdk (Windows) or /opt/gbdk (Linux/macOS)
  • mGBA or any GameBoy emulator for testing
  • GNU Make

Build

make          # Build the ROM
make run      # Build and launch in mGBA
make rebuild  # Clean and rebuild
make clean    # Remove build artifacts
make info     # Show build configuration

Environment Variables

VariableDefault (Windows)Default (Linux/macOS)
GBDK_HOMEC:/gbdk/opt/gbdk
MGBA_HOMEC:/Program Files/mGBA/usr/bin

Controls

ButtonAction
D-padMove snake
STARTStart game / Restart
AStart game

Project Structure

snaike/
├── src/
│   ├── main.c        # Game loop and state management
│   ├── snake.c/h     # Snake logic (circular buffer)
│   ├── fruit.c/h     # Fruit spawning
│   ├── input.c/h     # D-pad handling
│   ├── graphics.c/h  # Tile rendering and text
│   ├── states.c/h    # State machine (title/game/gameover/victory)
│   └── sound.c/h     # Sound effects
├── res/
│   └── tiles.c       # Graphics data (tiles and font)
├── bin/
│   └── snaike.gb     # Compiled ROM (after build)
├── Makefile
├── SPECS.md          # Game specifications
├── LICENSE
└── README.md

Docker

Play SNaiKE directly in your browser using the Docker image with the binjgb emulator.

Pull from GitHub Container Registry

docker run --rm -p 8080:8080 ghcr.io/alexandreroman/snaike

Then open http://localhost:8080 in your browser.

Build locally

make docker      # Build the Docker image
make docker-run  # Build and run the container

Keyboard Controls (Browser)

KeyAction
Arrow KeysMove
ZA Button
XB Button
EnterStart
ShiftSelect

Technical Details

  • Platform: Nintendo GameBoy (DMG)
  • Resolution: 160x144 pixels (20x18 tile grid)
  • ROM Size: 32 KB
  • Snake Storage: Circular buffer (max 360 segments)
  • Timing: VBlank synchronized (~60 FPS)

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Tags

built-with-claude-codepythongame

Similar Tools