DOOM
DOOM written in PHP and compiled to a native binary with Elephc.
- platform
- Linux x86_64 and ARM64 · macOS ARM64
- stack
- PHP, Elephc, SDL2
- license
- MIT
- install
- ./doom /path/to/DOOM1.WAD
Overview
Can PHP run DOOM? This engine does: it reads the original WADs, draws every frame and handles movement, combat, monsters and level interactions. The code is entirely PHP, compiled by Elephc into a native executable. SDL2 is the only runtime dependency, bundled in the macOS archive and installed from the system packages on Linux.
The engine is an independent implementation built from public descriptions of the game's formats and mechanics. It includes the original weapons and monsters, five difficulty settings, doors and lifts, an automap, six save slots, stereo sound effects and MUS music synthesized in PHP. The IDELEPHC cheat replaces the pistol and the marine's face with an elephant.
Download the archive for Linux x86_64, Linux ARM64 or macOS ARM64, extract it and launch ./doom with the path to your WAD. You need the shareware DOOM1.WAD or a DOOM.WAD from registered or Ultimate DOOM: original assets are neither bundled nor downloaded by the game. Registered and Ultimate content needs further playthrough validation with your own files. DOOM II and multiplayer are outside the project's scope.
What it does
- Independent single-player engine written entirely in PHP
- 320×200 rendering and simulation at 35 tics per second
- Weapons, monsters, automap, saves and sound effects from original WADs
- Linux and macOS binaries, without a PHP interpreter or VM
