{
  "id": 12127464,
  "title": "We ported the original Doom to SQL",
  "url": "https://urgent.news/2026/10/05/we-ported-the-original-doom-to-sql",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-05T10:27:06.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://cedardb.com/blog/sqldoom/"
  },
  "original_language": "en",
  "account": "In a groundbreaking project, the original 1993 game Doom was successfully ported to SQL. The game logic and renderer were executed inside a database, allowing the game loop to run at the original 35 FPS, while the renderer produced the complete 320x200 frame buffer at up to 60 Hz on a laptop. Python was solely responsible for handling timing, reading the keyboard, and displaying the bitmap returned by the SQL engine. Multiplayer functionality was also implemented, enabling four players to participate in first-come, first-served matches. The game can be played immediately in deathmatch mode, with users queuing if all slots are taken.\n\nThe process of porting Doom to SQL began with establishing baseline rules: Python would be deliberately boring, a single script would drive input and output, and the game logic, state, and renderer would all reside within the database. The game logic runs on a fixed 35 Hz loop, while the renderer operates independently, responding to requests for new frames as quickly as possible. Doom's .wad file format, which consists of VERTEXES connected by LINEDEFs, bounded SIDEDEFs, and SECTORs with THINGS, provided an inherently relational structure that was straightforward to translate into a database. This conversion took about 1000 lines of Python and took approximately 18 seconds to import all of Doom 1 on the author's laptop.\n\nThe core of the project involved translating Doom's game logic into SQL, resulting in around 5,900 lines of SQL code, which is significantly less than the original C source code's 9,000 lines. This SQL implementation leveraged SQL's ability to handle complex data processing more efficiently than C, allowing the database to handle entity component interactions and rendering with greater ease. The rendering pipeline consisted of several components, including a BSP-based system that processed game tics in about 10.45 milliseconds on average, or 8% of the available budget, leaving ample headroom for additional processing.\n\nIn summary, this unique project successfully ported the original Doom game to SQL, running at the original frame rate while leveraging the power and efficiency of a database for rendering, game logic, and multiplayer functionality.",
  "summary": null,
  "key_points": [
    "Original 1993 game Doom ported to SQL",
    "Game logic and renderer executed inside database",
    "Multiplayer functionality for four players"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Hacker News Best",
        "title": "We ported the original Doom to SQL",
        "url": "https://urgent.news/2026/10/03/we-ported-the-original-doom-to-sql-12148109",
        "published": "2026-10-03T22:14:00.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}