5 ms·
If you can figure out a way to only send inputs for each player instead of their full state, it should significantly reduce network traffic and lag for each pla
by Scaevolus 5y ago
If you can figure out a way to only send inputs for each player instead of their full state, it should significantly reduce network traffic and lag for each player-- right now it's sending ~1KB/frame!
- airhead969 5y agoOperational transformations (OTs).
- kgwxd 5y agoI don't see "game" mentioned in the wiki at all. Is that something typically used for games or do they tend to use something else?
- sib301 5y agoCollaborative text editing is what it’s traditionally used for.
- airhead969 5y agoIt can also be used to mutate hard game state (I wouldn't try it with dynamic, interpolated values like object position, angle, acceleration, or velocity.) There are many other methods, some are more precise and compressible than others: Trailing State Synchronization https://www.cs.ubc.ca/~krasic/cpsc538a/summaries/38/ https://www.cs.ubc.ca/~krasic/cpsc538a/summaries/38/ Basic ideas https://www.gafferongames.com/post/state_synchronization/ https://www.gafferongames.com/post/state_synchronization/ https://engineering.monstar-lab.com/2021/02/09/Game-server-Synchronization https://engineering.monstar-lab.com/2021/02/09/Game-server-S... https://www.gabrielgambetta.com/client-side-prediction-server-reconciliation.html https://www.gabrielgambetta.com/client-side-prediction-serve...
- rtkwe 5y agoYou'd have to resync fairly often to avoid desync especially for Joust where positioning during fighting is pretty important.
- Scaevolus 5y agoDesync is possible with UDP protocols, where a dropped packet would mean lost inputs, but this uses websockets, which are reliable TCP connections, so just the list of inputs combined with a deterministic engine is sufficient.
- rtkwe 5y agoThey can arrive out of order so you still have to deal with rewinding an re'simulating' the whole sequence of moves since the skipped packet then dealing with resolving the client vs server when they disagree.
- jasonkester 5y agoYeah, 700b for 20 players, and normally at least somebody does something every tick, so that will go out 30 times per second. It still only works out to 24kbps, so you might not need to upgrade the modem you had back when the original was in the arcades. I tried only sending updates every 3rd tick, but even there I could notice the difference. You're right that it'd be worth experimenting with sending keystrokes instead, and backing off the full resync to once/second or so.