Stop one player from flooding the game with moves or actions
A modified client, or just a browser tab coming back from sleep, can send hundreds of actions in one go and move a character far beyond what is fair. A strict limit per second blocks honest bursts too. Here is the allowance idea that blocks floods but forgives a hiccup.
Why this works
Honest play comes in bursts around a steady pace, and a flood does not. A bucket that refills slowly and holds only so much allows the pace and the bursts, and stops exactly the stored-up or endless sending that cheats rely on.
When not to use it
Skip it for games where only a handful of messages are sent per minute, and for anything the server can check by simply looking at the outcome. A limit can also hurt a legitimate fast tapper, so test it with your fastest honest player.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 27 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 "Stop one player from flooding the game with moves or actions" (read_entry online-limit-inputs-per-second-per-player) 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