A first-person math shooter where reloading your weapon requires solving arithmetic problems under fire.
Solve fast. Kill faster.
DOOMATH is a DOOM-inspired arena FPS built in C with raylib (https://www.raylib.com/). You fight waves of enemies across four themed levels (Lab, Sewer, Fortress, and the Final Depths), each with unique textures and a boss encounter. The twist: every time you reload, the game throws a math problem at you - addition, subtraction, multiplication, or division - and you can't fire again until you solve it correctly.
Five weapons, increasing difficulty, particle explosions, floating damage numbers, and a ticking clock. Miss the math and you're dead.
Level 1: The Math Lab. Addition problems gate your reloads. The dino-blob enemies seem harmless. They are not.
Level 2 boss fight. Solve subtraction problems while a horde closes in and the boss eats your health bar.
| Key | Action |
|---|---|
| WASD | Move |
| Mouse | Look |
| Left Click | Fire |
| R | Reload (solve a math problem) |
| 1-5 | Switch weapon (Pistol / Triple / Shotgun / Rapid / Rocket) |
| P | Pause |
| H | Help |
Requirements: Linux, raylib 4.5 or later, GCC, raylib development headers.
Build and run:
git clone https://github.com/moderatedan/DOOMATH.git
cd DOOMATH
./build.sh
./doomath
- Math-gated reloading - solve arithmetic to reload, difficulty scales with wave progression
- 5 weapons - Pistol, Triple Shot, Shotgun, Rapid Fire, Rocket Launcher
- 4 themed levels - each with unique floor/wall/ceiling textures and a boss
- Wave-based combat - survive timed waves with increasing enemy count and speed
- Particle system - muzzle flash, explosions, hit markers
- Floating damage numbers
- Difficulty scaling - Easy (1 wave + boss), Normal/Hard (3 waves per level)
- Screen shake and kill streaks
- Arcade speed mode
doomath.c Main game source
build.sh Build script
include/ Header files (core/, audio/)
src/ Module sources (core/, audio/)
textures/ Per-level PNGs
resources/ Audio assets
media/ Screenshots and cover art
Music is not included in this repository. The game runs without music files. Music licensing for the official release is in progress.
Game design and code: Daniel Brummitt (@moderatedan)
Built with raylib by Ramon Santamaria.
MIT License - see LICENSE for details.
v4.1 - Active development. Bug reports and feedback welcome via Issues.


