Send only what changed about the world, and recover when a packet is lost
Sending the whole world sixty times a second is wasteful, but sending only changes breaks as soon as one packet goes missing, and the player sees a world that is slightly wrong forever. The trick is to compare against what the player has confirmed, not against what you sent last. Here is how, with the fallback.
Why this works
Only the receiver knows what the receiver has. Describing changes against what the player has confirmed, not against what you sent, means a lost message costs one update and never leaves the picture wrong for good.
When not to use it
Skip it when the world is tiny or changes completely every moment, such as a few numbers or a fast scoreboard: sending it all is simpler and not larger. The saving appears only when most of a big world stays the same.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 33 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Send only what changed about the world, and recover when a packet is lost" (read_entry online-send-only-what-changed-since-last-confirmed) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP