TLDRocket
Sign in

DOOMQL

Simon Willison Simon Willison

Peter Gostev built a Doom-like game engine using SQLite, where SQL queries handle all game mechanics including movement, collision detection, enemies, combat, and graphics rendering instead of storing data separately. The implementation runs as a Python terminal script that generates a recursive CTE ray tracer query and creates a playable game accessible through both the command line and a Datasette web interface. Players can now monitor game state through a live-updating HTML dashboard with minimap functionality, generated by Claude from a natural language prompt.

Why it matters

DOOMQL Peter Gostev built this using GPT-5.6 Sol. This is a lot of fun: DOOMQL started with a deliberately unreasonable question: what if SQLite were the game engine, not merely the place where a game stores data? The result is a small, original Doom-like game in which SQL owns movement, collision, enemies, combat, progression and every RGB pixel on screen. It's implemented as a Python terminal script - I tried it out like this: cd /tmp git clone https://github.com/petergpt/doomql cd doomql uv run host/doomql.py Here's the huge SQL query that implements a full ray tracer in SQLite using a recursive CTE. Running the above script creates a /tmp/doomql/.doomql/doomql.sqlite SQLite database, which you can explore using Datasette like this: uvx --prerelease=allow --with datasette-apps datasette \ /tmp/doomql/.doomql/doomql.sqlite \ -p 4444 --root --secret 1 --internal internal.db The --with datasette-apps option installs the new Datasette Apps plugin, which supports creating custom HTML+Jav

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads 60+ sources, removes duplicate coverage, and summarises the day in two minutes. Free, no spam, unsubscribe anytime.