---
title: "DOOMQL: An AI-Generated Doom-like Game Using SQLite as the Game Engine"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Jul/13/doomql/#atom-everything"
permalink: "https://feed.astralor.com/items/itm_5d56648d8b0172024a741bfc"
published: "2026-07-13T22:34:41.000Z"
score: 71
channel: "ai"
tags: ["ai-assisted-programming","Datasette","DOOMQL","GPT-5.6 Sol","SQLite"]
---

# DOOMQL: An AI-Generated Doom-like Game Using SQLite as the Game Engine

## AI commentary

> DOOMQL perfectly demonstrates how AI can combine seemingly unrelated technologies (SQLite and game engines) into stunning results. For database enthusiasts and AI programming explorers, this is a brilliant collision of inspiration.

## At a glance

DOOMQL, built by Peter Gostev with GPT-5.6 Sol, uses SQLite as the full game engine to create a Doom-like game with ray tracing, collision, enemies, combat, and progression. Every pixel is driven by SQL recursive CTEs, running as a Python terminal script. Integrated with Datasette and an AI-generated app, it enables real-time game state viewing and a minimap, showcasing AI's remarkable potential in creative coding.

## Key points

- Built with GPT-5.6 Sol, SQLite serves as the full game engine powering movement, collision, enemies, combat, and rendering.
- A full ray tracer implemented via recursive CTEs, with every pixel generated by SQL queries.
- Runs as a Python terminal script while creating an SQLite database for real-time analysis via Datasette.
- Using the Datasette Apps plugin and Claude (Fable 5), an HTML+JavaScript app was generated to display the game screen and minimap in real time.

## Full text

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+JavaScript apps that can run SQL queries directly within the Datasette interface. I created a new app, pasted the copy-paste prompt into Claude chat (Fable 5) and told it: Build an app that displays the current state of the screen using the frame_pixels view with its x, y, r, g, b columns. have it refresh once a second. This got me a working HTML+JavaScript app inside Datasette that could reflect the current state while I played the game in my terminal. Then I added: add a minimap And now my Datasette App looks like this: Here's the HTML app code - paste that into your own Datasette instance (using the uvx --with datasette-apps recipe from above) to try it yourself. Via @petergostev Tags: games, sql, sqlite, ai, datasette, generative-ai, llms, ai-assisted-programming, gpt, datasette-apps

---

Verify against the original before citing; curated by Astral Feed: https://feed.astralor.com/items/itm_5d56648d8b0172024a741bfc
