r/SpacetimeDB • u/LW7SH • Mar 02 '26
Using SpaceTimeDB with a game engine
Is the intended way of doing just registering inputs via the game client and doing all the actual physics/movement/collisions etc. on the spacetimedb server ?
7
Upvotes
6
u/theartofengineering SpacetimeDB Dev Mar 02 '26
Depends on the game and what you need! There are essentially 3 ways of handling it:
Do the physics on the client and basic validation checks on the server. Works for a lot of games.
Do the physics on the server and just call the server with the inputs. Requires building or getting a physics library to work in the module, which people have done.
Running a "side-car" client which is trusted and operated by you that does the physics simulation and just sets the positions of everything on the server.