Get the latest tech news
Building a DOOM-like multiplayer shooter in pure SQL
CedarDB is a database system that delivers unmatched performance for transactions and analytics, from small writes to handling billions of rows. Built on cutting-edge research to power today’s tools and tomorrow’s challenges.
Ever since I’ve read that, I wanted to push his awesome idea to the logical extreme: Build a multiplayer DOOM-like shooter entirely in SQL with CedarDB doing all the heavy lifting. Send a set of rays from each player’s eye into the world, and see which map tiles are visible Check which walls the player sees, rendering them at the correct height and more or less solid based on the distance Project mobs into the player’s camera space Select sprite LODs based on depth Expand sprites into pixels, scaled to screen space Occlude against walls and other sprites Assemble frame buffer rows with string_agg Build a minimap reusing the visible tiles calculation from earlier Combine the 3D view with minimap and HUD (HP/bullets/players) into a game view Because clients send raw SQL as superusers (I didn’t bother setting up any role based access control or row level security, don’t do that!
Or read this on Hacker News