7 ms·
Exactly, you assign a sequence number to each update, have the client send acks to convey which packets it has received, and the server holds onto and sends eac
by hpx7 4y ago
Exactly, you assign a sequence number to each update, have the client send acks to convey which packets it has received, and the server holds onto and sends each unacked update in the packet to clients (this is an improvement over blindly sending N updates each time, you don't want to send updates that you know the client has already received).
If the client misses too many frames the server can send it a snapshot (that way the server can hold a bounded number of old updates in memory).
- shepherdjerred 4y agoYou just described TCP
- hpx7 4y agoIt's close but TCP will retransmit frames rather than packing multiple updates in a single frame. It's common for people to build this kind of retransmission logic on top of UDP (especially for networked games), it's sometimes referred to as "reliable UDP".
- vvanders 4y agoTCP forces sequencing across all packets, SCTP is a bit closer.
- xyzzyz 4y agoIt’s not TCP, it’s TCP without head-of-line blocking, which makes it much more suitable for real time games.