Hacker News new | ask | show | jobs
by muhaaa 1070 days ago
I thought tigerbeetle distributes the db on web clients? I skimmed through the docs and cannot find how to design a web app with tigerbeetle like the game https://sim.tigerbeetle.com/
1 comments

Hey! I'm not completely sure I follow the question. But the game is built a little differently from how you'd typically run TigerBeetle in production. In production you'd run a cluster of replicas (see https://docs.tigerbeetle.com/deploy/hardware#cluster-of-repl...) and then you'd have your application connect to the cluster using one of our client libraries.

The game is more a reflection of how we do simulation testing (as the post mentioned). You can find the code for that here: https://github.com/tigerbeetledb/tigerbeetle/blob/main/src/s....

I have a very interactive app with limited data use <10MB. Right now its a lots of different API calls to sync state between server and multiple clients. But if I have a distributed sync protocol (that works), I can replicate the state on each cient and server by tunneling the sync protocol to the server and back. I have reduced a lots of api complexity. My react UI just subscribes to the data changes in the synced DB. Similar concept impelmented pouchdb & couchdb but its a bit outdated.
What did you use to make the graphics? Thats very cool.
They're handmade by Joy Machs! We credit him in the post. :) https://twitter.com/joymachs
Oh the sprites are great, don't get me wrong, but I mean how the graphical game system was made.
Nice! Looks pretty rad. I've never used Zig but it sure looks like an interesting language. Did NanoVG help with the animation stuff like the little text that pops out of the beetles and the lines that zip between them?