Hasty Briefsbeta

Bilingual

SpacetimeDB ThreeJS Support

3 days ago
  • #SpacetimeDB
  • #Real-time
  • #Three.js
  • SpacetimeDB 2.0 is a database where game logic runs directly inside it, streaming state changes to clients like Three.js front ends.
  • It uses tables for world state (players, entities, transforms, systems), reducers for mutations (movement, damage, spawning), and views for read-only data.
  • Three.js clients subscribe to tables/views over WebSockets, receiving fine-grained diffs instead of polling an API.
  • The server acts as the authoritative world simulator, while the client focuses on rendering and interpolation.
  • Common workflows like 'entity moved' or 'player joined' map naturally to updating Three.js scenes.
  • Ideal for low-latency, synchronized 3D state applications: multiplayer games, collaborative editors, shared visualizations, or virtual worlds.
  • SpacetimeDB offers a generous free tier and a paid tier starting at $25/month with higher limits.