source: simon willison: doomql
level: technical
peter gostev built doomql using gpt-5.6 sol, starting from the question of whether sqlite could be a game engine instead of just a data store. the result is a small original doom-like game where sql owns every part of the experience, from movement and collision to enemies, combat, and every rgb pixel on screen. it runs as a python terminal script, and the core is a huge sql query that implements a full ray tracer in sqlite using a recursive common table expression.
running the script creates a sqlite database file. you can explore it with datasette, a tool for publishing and exploring sqlite databases. by using the new datasette apps plugin, you can build custom html and javascript apps that run sql queries directly inside the datasette interface. simon willison created an app that displays the current game screen from the frame_pixels view, refreshing once per second, and then added a minimap. the app code is available to paste into your own datasette instance.
the project shows how far sqlite can be pushed beyond typical data storage. the ray tracer query calculates pixel colors by simulating light rays in the game world, all within sql. this approach turns the database into an active computation engine, blurring the line between data and logic. the combination of a terminal game and a live datasette dashboard demonstrates a creative use of sql and modern ai-assisted development.
why it matters: it demonstrates using sqlite as a real-time computation engine for graphics and game logic, which can inspire new ways to build data-driven applications and visualizations.
source: simon willison: doomql