« All posts

DOOMQL: A Doom-like FPS Where SQL Renders Every Pixel

DOOMQL is a terminal-based Doom-like FPS where SQL queries handle all game logic and pixel rendering, with a live SQL audit tool included.

DOOMQL is an experimental terminal shooter built on a deliberately extreme premise: SQLite is not just where the game stores data, it is the game engine. Movement, collision, enemy AI, DDA raycasting, sprite scaling, and every final RGB pixel value are computed by SQL queries, while the Python host only forwards keystrokes, time, and terminal size to SQLite and prints the finished query result unchanged.

A standout feature is the live SQL audit tool: opening a second terminal in read-only PRAGMA query_only mode lets you watch the exact SQL statements, before/after state values, and render query behind every displayed frame in real time. This isn't a replay or a parallel simulation — it's genuine audit data written inside the same transaction as gameplay changes.

A 36-test suite verifies gameplay, deterministic replay, frame dimensions, RGB ranges, and the absence of game logic from the Python host. Released under MIT and unaffiliated with id Software, DOOMQL offers engineers a concrete case study in strict separation of concerns and verifiable system boundaries.