Hacker News new | ask | show | jobs
by alexanderson 1207 days ago
It's built with Node.js and Electron on the backend, a bespoke JSON-based database, a React frontend built with Vite, three.js and React Three Fiber for the 3D views, and an adapted network layer based on tRPC that supports live queries over WebSockets, so data updates are automatically propagated to all subscribed clients.

My biggest regret is the database. During gameplay, the database needs to be in memory so the game loop has as little latency as possible, so the database is just for persistence when the app closes. I really should use something built for this purpose, like sqlite. But the database engine I'm using is designed to be transparent and convenient. It uses a JavaScript proxy to track any time a data mutation is made to the in-memory database, and dumps that to the JSON file on a throttle.

Everything else is meeting my needs just fine.