TLDR Web Dev · ARTICLES & TUTORIALS
ABUSING DUCKDB-WASM BY MAKING SQL DRAW 3D GRAPHICS (SORT OF)
Summary from the TLDR Web Dev newsletter
This developer created a text-based 3D Doom clone in the browser using DuckDB-WASM to handle game state and rendering with SQL queries. The core of the rendering engine is a SQL VIEW that performs raycasting via recursive CTEs, with JavaScript handling orchestration, sprite rendering, and Z-buffering. There were some challenges along the way with WASM initialization, SQL dialect differences, query planner limitations, and race conditions, all of which the dev overcame with some creativity.