phel-doom
256-color ANSI · pure Phel · ~5ms frame

PHEL-DOOM

A DOOM-lite raycaster that runs entirely in your terminal. Written in pure Phel — a Lisp that compiles to PHP. No GPU. No engine. Just a frame loop and a lot of escape codes.

10 levels 10 enemy types 7 weapons 4 difficulties 256-color ANSI ~5ms frame PHP ≥8.4
bash — no clone, no Composer
// the view

It actually renders, in cells.

phel-doom gameplay: ANSI raycast corridor with Freedoom cacodemon, demon and imp sprites, shotgun in hand, heart HUD and live minimap
Freedoom enemy sprites, sub-cell shading, depth-faded walls, live minimap and heart HUD — all from text cells.
// what's inside

A full game, in your terminal.

10hand-tuned levels
10enemy types
7weapons
6AI states
8pickup types
9save slots

256-color raycaster

Full-viewport ray-marching at 180×40, under 5ms per frame. Sub-cell shading, depth-faded colors, and sprite occlusion. Resizing widens your view, not zooms it.

10 levels, procgen + boss

A tutorial floor, 8 procedurally generated levels, and a hand-built cyberdemon arena (50 HP boss). Color keycards, locked doors, and up to 2 hidden secrets per floor.

10 enemy types, real AI

Imp, demon, cacodemon, baron, cyberdemon, spectre, revenant, archvile, mancubus, pinky. Each runs a sleep → alert → hunt → attack brain, wakes nearby monsters when you shoot, and throws dodgeable fireballs.

7-weapon arsenal

Pistol, shotgun, chaingun, chainsaw, BFG, incinerator, rocket launcher. Balanced damage, persistent ammo, splash hits, a wall-piercing pistol, and mobs that shrug off fire.

Horror beats

Heartbeat and thump on low HP, flickering lights, jump-scares, sudden silence, blood drops, blinking door-eyes, and a "behind you" warning. Tension, not just sprites.

λPure-functional core

One immutable world map flows through input → step → cast → render. Side effects stay in one IO layer. The math lives in pure, unit-tested modules.

// hands on

Controls

WASD

Move & turn

Strafe and rotate with WASD or the arrow keys ↑↓←→. Hold ⇧ Shift or X to sprint.

SpaceFire
RReload
1··7Switch weapon
FDoor / secret
EAbout-face 180°
MMinimap
NSound
HHelp overlay
F5Quick-save
F9Quick-load
PPause + settings
QQuit
// see it move

Gameplay