Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Run Doom in SQL: A Practical Guide to Database Game Experiments

“Doom in SQL” can mean original Doom logic in CedarDB, a SQLite Doom-like, compiled bytecode in a database VM, or a PostgreSQL extension. Here’s how the projects differ and how to get started.
Length5 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you want to run original Doom game logic and rendering in SQL, start with SQLDoom on CedarDB. It uses Python for keyboard input, timing, and display, and requires an IWAD game-data file. Other projects called “Doom in SQL” do something different: DOOMQL is a Doom-like built with SQLite, Turso runs compiled Doom bytecode in its database-derived virtual machine, and pg_doom connects PostgreSQL to a C game core.

What “Doom in SQL” means

There is no single recipe, because the phrase describes several experiments with different goals. SQLDoom is the closest match if you mean original Doom’s game logic and renderer represented in SQL. The other projects are useful comparisons, but they are not interchangeable installation guides.

Project What runs What the database does Practical fit
SQLDoom Original Doom game logic and renderer CedarDB executes SQL game logic and rendering; Python handles timing, input, and display Closest fit for an original-Doom-in-SQL experiment; requires CedarDB-specific functionality
DOOMQL An original Doom-like raycasting game SQLite calculates simulation behavior and RGB pixel values; Python transports terminal input and results A more approachable SQLite project if a Doom-like game is sufficient
Turso VDBE demonstration Unmodified Doom compiled to bytecode A Turso SQLite-derived VM executes VDBE bytecode in a long-running statement and emits frame rows Useful for exploring database virtual machines, not a demonstration of ordinary SQL text rendering the game
pg_doom A C game core A PostgreSQL C extension exposes game input and screen functions; a wrapper handles I/O An extension experiment rather than a SQL implementation of the game

SQLDoom’s author, Lukas Vogel, characterizes its BSP-based approach as faster and more visually faithful than DOOMQL’s raycasting approach in their comparison. That is the author’s comparison, not an independent benchmark; the projects also differ in game fidelity and database boundary.

Run original Doom game logic and rendering with SQLDoom

Check the requirements first

SQLDoom’s repository identifies CedarDB as a current requirement because some functions use cedarscript. Do not treat the project as a drop-in recipe for vanilla PostgreSQL. Before installing, check the repository README for its current CedarDB requirements, Python setup, and exact loader and client commands. The project uses Python with psycopg2 and pygame.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
DOOM Eternal: Standard Edition - PlayStation 4
  • Gain access to the latest demon-killing Tech with the DOOM Slayer's advanced praetor suit, including a shoulder-mounted flamethrower and the retractable wrist-mounted DOOM Blade
  • Upgraded guns and mods, such as the Super shotgun's new distance-closing meat hook attachment, and abilities like the double Dash make you faster, stronger, and more versatile than ever
  • You can't Kill demons when you're Dead, and you can't stay alive without resources. These tools are the key to your survival and becoming the ultimate demon-slayer
  • A new class of (destructible) demon
  • Battle mode is the new 2 versus 1 multiplayer experience built from the ground up at id software

You also need an IWAD, the game-data file. CedarDB author Lukas Vogel says the freely redistributable shareware doom1.wad is sufficient for episode one. Retail WADs work if you own them. Follow the project’s WAD-loader instructions for the file you have; the available information does not establish a single command that applies to every current setup.

Load the data and start the client

  1. Install and configure CedarDB according to the SQLDoom README, confirming that your installation supports the CedarDB-specific functions the project uses.
  2. Install the Python dependencies and place an eligible IWAD where the project’s loader expects it.
  3. Run the WAD-loader invocation documented in the repository README to import the game data into the database.
  4. Start the SQLDoom client using the README’s client command. Python captures keyboard input and presents the frames returned by the database.

Use the repository README as the source of truth for the literal commands: setup and invocation details can change, and no stable command sequence is established here.

Rank #2
Sale
DOOM: The Dark Ages – Xbox Series X
  • Developed by id Software, DOOM: The Dark Ages is the prequel to the critically acclaimed DOOM (2016) and DOOM Eternal that tells the epic cinematic origin story of the DOOM Slayer’s rage.
  • In this third installment of the modern DOOM series, players will step into the blood-stained boots of the DOOM Slayer, in this never-before-seen dark and sinister medieval war against Hell.
  • A dark fantasy/sci-fi single-player experience that delivers the searing combat and over-the-top visuals of the incomparable DOOM franchise, powered by the latest idTech engine. With a customizable difficulty system, it’s the perfect entry point whether you’re new to the franchise or a long time fan.
  • As the super weapon of gods and kings, shred enemies with devastating favorites like the Super Shotgun while also wielding a variety of new bone-chewing weapons, including the versatile Shield Saw.
  • Experience the origin story of the DOOM Slayer’s rage in this epic, cinematic, and action-packed story.

Understand what is being executed

The game logic and renderer are implemented in SQL, while the Python client handles the surrounding interaction loop: timing, keyboard input, and display. The SQLDoom article describes a 320 × 200 framebuffer and retains Doom’s original 35 Hz game-logic tic rate. Rendering is decoupled from that logic rate, so a new frame can be requested separately from each simulation tic.

CedarDB’s article reports rendering at up to 60 Hz on the author’s laptop. That is a machine- and scene-specific report, not a performance guarantee for other systems. The logic tic rate and renderer rate measure different parts of the loop; a higher frame-request rate does not mean the simulation itself advances at that rate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
DOOM: The Dark Ages – PlayStation 5
  • Developed by id Software, DOOM: The Dark Ages is the prequel to the critically acclaimed DOOM (2016) and DOOM Eternal that tells the epic cinematic origin story of the DOOM Slayer’s rage.
  • In this third installment of the modern DOOM series, players will step into the blood-stained boots of the DOOM Slayer, in this never-before-seen dark and sinister medieval war against Hell.
  • A dark fantasy/sci-fi single-player experience that delivers the searing combat and over-the-top visuals of the incomparable DOOM franchise, powered by the latest idTech engine. With a customizable difficulty system, it’s the perfect entry point whether you’re new to the franchise or a long time fan.
  • As the super weapon of gods and kings, shred enemies with devastating favorites like the Super Shotgun while also wielding a variety of new bone-chewing weapons, including the versatile Shield Saw.
  • Experience the origin story of the DOOM Slayer’s rage in this epic, cinematic, and action-packed story.

Try DOOMQL if SQLite and a Doom-like game are the goal

DOOMQL is an original raycasting game, not a port of original Doom. Its README specifies a Unix-like environment or WSL, Python 3.11 or newer, SQLite 3.45 or newer with math functions enabled, and a terminal supporting 24-bit color and Unicode upper-half-block characters.

  1. Set up the listed Python and SQLite versions, ensuring SQLite has math functions enabled.
  2. From the project directory, run make run to start the game.
  3. Optionally run make inspect to open a read-only live SQL audit alongside the game.

In this project, SQL owns input interpretation, movement, collision, enemy behavior, combat, progression, raycasting, pixel values, and ANSI output. Python transports terminal input and the resulting data. This boundary makes DOOMQL a useful way to inspect how much of a small game loop can be expressed in SQL, without implying that it runs original Doom.

Rank #4
Doom - Xbox One
  • A Relentless Campaign: There is no taking cover or stopping to regenerate health as you beat back Hell's raging demon hordes
  • Return of id Multiplayer: Dominate your opponents in DOOM's signature, fast-paced arena-style combat
  • Near-Limitless Gameplay: Doom SnapMap – A Powerful, but Easy-to-Use Game and Level Editor That Allows for Limitless Gameplay Experiences on Every Platform
  • Entertainment Software Rating Board (ESRB) Content Description: Blood and gore, intense violence, strong language
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How Turso’s Doom demonstration differs

Turso’s demonstration does not translate Doom into ordinary SQL queries. The company describes compiling C to LLVM IR, translating that to VDBE bytecode, then loading and running that bytecode on a Turso VM with extensions. The game advances as a long-lived statement emits frame rows.

The meaningful experiment is execution inside a SQLite-derived virtual machine: the game’s compiled instructions run in the VM, rather than SQL text implementing the game’s rules and renderer. Turso presents browser and native execution, but the implementation is distinct from both SQLDoom and DOOMQL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
DOOM + DOOM II (Limited Run Games #144) - for Playstation 5
  • DOOM + DOOM II on a region-free physical disc.
  • Includes: DOOM, DOOM II, TNT: Evilution, The Plutonia Experiment, Master Levels for DOOM II, No Rest for the Living, Sigil & Sigil II, Legacy of Rust (a new episode created in collaboration by id Software, Nightdive Studios and MachineGames).
  • A new Deathmatch map pack featuring 25 maps
  • Total of 187 mission maps and 43 deathmatch maps in DOOM + DOOM II
  • # of Players: Single System 1-4, Local wireless 1-8, Online 1-16

How pg_doom differs

The pg_doom repository describes a PostgreSQL extension plus a shell wrapper. C functions bridge input and screen data to the game core, so the database exposes an interface to C game code rather than implementing the game in SQL. The project requires a Doom WAD, and its repository says game-data media is not freely distributed; obtain it legally.

What SQLDoom’s reported figures tell you

The implementation and performance figures below are reported by SQLDoom author Lukas Vogel in a CedarDB article accessed in 2026. They describe that implementation and, where noted, the author’s hardware; they are not independently measured comparisons.

  • Vogel reports an average of 2.15 ms for a typical game tic with six awake monsters, and 10.45 ms in a slower case with 46 awake monsters.
  • The author estimates the game logic at about 5,900 lines of SQL, compared with about 9,000 lines of original C game logic, and the renderer at about 1,300 lines of SQL.
  • The author describes a multiplayer implementation with about 110 tables, just over 100 functions, and four player roles.

Vogel calls rendering Doom in a database “obviously a bad idea,” while also discussing relational game state and database support for multiplayer. That is the author’s opinion about the engineering trade-off, not a claim that the experiment has no value.

Quick Recap

Bestseller No. 1
DOOM Eternal: Standard Edition - PlayStation 4
DOOM Eternal: Standard Edition - PlayStation 4
A new class of (destructible) demon
$27.49
SaleBestseller No. 2
Bestseller No. 4
Bestseller No. 5
DOOM + DOOM II (Limited Run Games #144) - for Playstation 5
DOOM + DOOM II (Limited Run Games #144) - for Playstation 5
DOOM + DOOM II on a region-free physical disc.; A new Deathmatch map pack featuring 25 maps
$44.48

Which route should you choose?

  • Choose SQLDoom if your question is whether original Doom’s logic and renderer can be represented in database SQL, and you are prepared to use CedarDB and follow the project’s current setup instructions.
  • Choose DOOMQL if you want a more self-contained SQLite experiment and are comfortable with an original Doom-like rather than original Doom.
  • Choose Turso’s demonstration if you are interested in running compiled game bytecode inside a SQLite-derived VM and can distinguish that from a SQL-authored game.
  • Choose pg_doom if your focus is a PostgreSQL C-extension interface to a game core, not SQL implementation of game logic.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Turn On Vibrant Visuals in MinecraftMinecraftBlog3min
  2. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  3. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.