Skip to content
ZapskiRetro

FPS Dungeon

A first-person, Wolfenstein-style raycaster on the original Game Boy. Four floors, each a freshly generated maze: find the key, open the door, take the stairs down — and shoot whatever comes round the corner first. Clear floor 4 to escape.

Game Boy (DMG)GBDK-2020 + assemblySuper Game Boy enhancedHomebrew

Emulated by binjgb (WebAssembly). Click the screen to give it keyboard focus. Open full screen.

How to play

ScreenButtons
WalkingUP / DOWN walk forward and back · LEFT / RIGHT turn · B + LEFT / RIGHT strafe
FightingA shoots at the centre of the screen, about four shots a second
AutomapSELECT opens it and pauses the game · SELECT or A closes it · B turns the music on or off · START saves to a slot
Title / Game OverSTART begins a fresh run · A loads a save, once any slot is used

Doors are the dark grey blocks marked D: walk into one with a key to open it. The stairs always sit in a small alcove behind that door, so the key comes first. Enemies hurt on contact and the screen flashes when they do; at zero hearts the run ends. The automap pauses the game, so it is the safe place to plan a route. The game's own player guide has the full rules.

Keyboard

  • D-padArrow keys
  • AX
  • BZ
  • STARTEnter
  • SELECTC

Emulator

  • Toggle the SGB borderS
  • Fast-forwardShift
  • PauseSpace
  • Save / load stateF6 / F9
  • RewindBackspace

Items

  • Key — Opens a door. Always in the dead end farthest from the start; keys don't carry to the next floor.
  • Heart — Restores one heart. Left lying if you're at full health, so you can come back for it.
  • Gem — Adds to your gold. Two per floor.
  • Map scroll — Reveals the whole floor on the automap.
  • Stairs — Down to the next floor, one way. On floor 4 they lead outside.

Enemies

  • Grunt — The dark blob. One shot on floors 1–2, two on floors 3–4.
  • Bat — Flies at eye level at twice a grunt's speed, but one shot kills it. Floor n has n bats.
  • Brute — A bigger grunt at half speed that takes three shots. One on floor 3, two on floor 4.

Super Game Boy

FPS Dungeon title screen, with the raycaster walking a maze on its own behind the title

On a Super Game Boy the screen sits in a wall of stone bricks — 56 tiles and one palette, drawn by a script and packed with our GB-SGB-Tooling. The emulator reads the ROM's SGB flag and starts with the border on — press S to toggle it. On a regular Game Boy nothing changes.

Saving, losing and winning

There are three battery-backed save slots, and each keeps the floor you were on. Open the map, press START, pick a slot. Once any slot is used, the title and GAME OVER screens offer A LOAD SAVE.

Losing every heart shows the floor you reached, your kills and your gold. Taking the stairs on floor 4 wins, and the win screen adds your time in seconds — time spent on the map doesn't count.

Under the hood

The 3D view is a real 128×64 bitmap: 64 rays, each two pixels wide, cast by a hand-written assembly renderer and drawn straight into tile data. The game double-buffers across the Game Boy's two background tile banks and flips between them in VBlank, with the HUD in the Window layer. Rays come off the camera plane, so the distance is already perpendicular and needs no fisheye correction; odd columns whose neighbours hit the same wall face are interpolated instead of cast.

Walls shade by the side they face, the first ray on each new block is a shade darker so corners read clearly, and distant walls fade into a dithered fog. Enemies and items are billboards in three distance tiers, hidden behind nearer walls and kept within the DMG's ten-sprites-per-line limit. Enemies chase you along a breadth-first distance field rebuilt only when you change cell.

Every floor is generated on the cartridge when you enter it — a corridor maze with a few rooms and loops knocked through, the key in the farthest dead end and the stairs sealed behind the only door — so every run is new. Written in C with GBDK-2020 plus assembly, in a single 32 KB MBC1 cart with battery RAM.

More about FPS Dungeon

More games