A player with a bad connection hits people who already ran behind a wall
Making up for lag helps the shooter, and costs the one being shot. If the ride into the past has no end, a very slow connection kills players around corners seconds later. Here is how to choose the moment to look at, how to cap it, and how not to believe the player's own clock.
Why this works
Looking back helps one player at the cost of another, so the trade needs a ceiling. The shot is as old as its trip plus the screen's own delay, which the server can measure itself. A claim from the player is only trusted when it matches that, since anyone can edit a claim.
When not to use it
Wrong in games where nothing is shot at range, or where every player has the same fast connection, as on a local network. If a game cannot accept any hits around corners, give up rewinding and let the shooter lead their aim.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 20 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "A player with a bad connection hits people who already ran behind a wall" (read_entry limit-how-far-back-a-shot-may-look) 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