Developer renders full-color Doom in SQL database at 35-60 fps

3 min read
Source: Ars Technica
Developer renders full-color Doom in SQL database at 35-60 fps
Photo: Ars Technica
TL;DR

Lukas Vogel has successfully ported the classic game Doom to run entirely within an SQL database, achieving playable frame rates. The project, named SQLDoom, utilizes a Python client for input and output while relying on CedarDB tables and approximately 1,300 lines of SQL queries to manage game logic and rendering. This new iteration produces full-color 640x480 frames, a significant improvement over his previous attempt, DoomQL, which only generated grayscale ASCII graphics. Vogel reports the game runs at roughly 60 frames per second on a Ryzen 7 laptop, dipping to 35 fps in complex scenes. The project highlights the potential benefits of using a database for multiplayer server states, ensuring consistent data snapshots and avoiding physics discrepancies. Users can run the game locally using GitHub code and a Doom WAD file or try a hosted online demo, though the latter reportedly suffers from poor performance.

Key points

  • Lukas Vogel developed SQLDoom, a version of Doom that runs using SQL queries and CedarDB tables.
  • The project uses about 1,300 lines of SQL across 89 common table expressions to generate 35 bitmap framebuffers per second.
  • SQLDoom renders full-color 640x480 frames, unlike the previous DoomQL project which used grayscale ASCII graphics.
  • The game achieves approximately 60 fps on a Ryzen 7 laptop, with dips to 35 fps in busy scenes.
  • Vogel notes that using a database for game state provides benefits for multiplayer servers by ensuring consistent reference snapshots.
  • The project is available on GitHub and can be run locally with a Doom WAD file or via a hosted online demo.

Background

This development follows a trend of unconventional Doom ports and adaptations, including a recent cease-and-desist from Bethesda regarding a Doom-branded memecoin and browser game, as well as researchers using fruit fly connectomes to simulate gameplay. It also contrasts with previous attempts like DoomQL, which struggled with graphical fidelity. The project underscores the ongoing community interest in reimagining classic games through novel technical constraints, despite the inherent inefficiencies of using a database for real-time rendering.

Why it matters

This project demonstrates the potential of using relational databases for real-time game logic and state management, particularly for multiplayer environments where consistency is critical. It also highlights the creative boundaries of software development, showing that even inefficient methods can be optimized to achieve playable performance. The success of SQLDoom could inspire further experimentation in using non-traditional tools for game development and server architecture.

What to watch

Developers and enthusiasts can experiment with running SQLDoom locally using the provided GitHub code and a Doom WAD file. The project may also inspire further innovations in using databases for game state management, particularly in multiplayer settings. Additionally, the success of this port could lead to more unconventional adaptations of classic games, pushing the boundaries of what is possible in software development.

Share this article

Want the full story? Read the original reporting

Read on Ars Technica