Abusing DuckDB-WASM by making SQL draw 3D graphics (Sort Of) by tanelpoder
Abusing DuckDB-WASM by making SQL draw 3D graphics (Sort Of)
Read More
Abusing DuckDB-WASM by making SQL draw 3D graphics (Sort Of)
Read More
Be the first to know the latest updates
Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.
14 Comments
mritchie712
This is a DuckDB feature that's incredibly hard for Snowflake (or anyone else) to copy. Running the same database client-side (WASM) and server-side can make for a pretty magical experience.
Queries that normally take 1s to 2s can run in 25ms, so you get under the "100ms rule" which is very uncommon in analytics applications.
We DuckDB server side and have experimental support for DuckDB WASM on the client-side at https://www.definite.app/ and sometimes I don't trust that a query ran because of how fast it can happen (we need some UX work there).
xnx
Impressive project, the subhead might attract even more attention: "Building a SQL-Powered Doom Clone in the Browser"
robertclaus
This is great! I did a similar project a while back to do image processing in a SQL database with pixels being individual records. It's amazing what SQL can do with the right table structures.
adornKey
Finally somebody did it! Back in the day my attempts to write a game in SQL were thwarted by buggy query-optimizers. They cached my calls to rand() way too often although documentation promised not to do that.
nonethewiser
Given the first post in the blog says "not made by a [ROBOT EMOJI]", should I assume this one which does not have this message, is made by a [ROBOT EMOJI]?
https://www.hey.earth/posts
enescakir
Like running Doom on a printer, but now it’s in the same engine powering your BI dashboards. Peak 2025 energy.
cess11
Nice project. Reminds me of one of my favourite demos, a MySQL raytracer:
https://www.pouet.net/prod.php?which=83222
datadrivenangel
Abusing databases is the way. I'm building a SQLite agent using triggers.
dkga
Very interesting!
You know it gets wild when you read "… Here's the core of the raycasting algorithm in SQL"!
gitroom
i think this is super wild honestly, cant believe sql is doing graphics now
karmakaze
I'd like to see something like this done in SpacetimeDB which was made specifically for game backends. I haven't looked into it yet, only seen the 1.0 announcement on HN and in my YT feed, and curious how its feature set makes this sort of thing easier or more natural.
pjot
Author here, wild to see this at the top of HN!
You can play it here:
https://patricktrainer.github.io/duckdb-doom/
Pressing “L” enables (very) verbose logging in the dev console and prints much of the sql being executed.
r3tr0
We use duck db wasm to make live system performance dashboards based on eBPF.
It really is magic!
You can check it out here.
https://yeet.cx/play
robertsdionne
https://x.com/geocucu_t/status/1909291486367166717