-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
area: networkHas interaction with the network (Internet)Has interaction with the network (Internet)to-discussIdea or suggestion that needs some discussion before implementationIdea or suggestion that needs some discussion before implementation
Milestone
Description
tl;wr: the server does all calculations, clients only render the state they received. state is transmitted by keyframes at "predicted" end points.
The design is pretty much like on would do it for a FPS.
The basic idea is this: The server sends a packet which updates the "target" state of the future for clients. They interpolate the received movement/update/... functions and try reaching the target state all the time.
server
------
* central trust instance for the game state.
* does all the calculations based on input events.
* create and distribute keyframes for all clients
clients
-------
* receive keyframes
* calculate world state for current time by interpolating keyframes
* display world state and fancy animations et
* send actions to server (timestamp is probably a bad idea)
This is the low-level part for transmitting the results of the simulation itself.
To understand how the prediction works, see #740.
Metadata
Metadata
Assignees
Labels
area: networkHas interaction with the network (Internet)Has interaction with the network (Internet)to-discussIdea or suggestion that needs some discussion before implementationIdea or suggestion that needs some discussion before implementation