I am working on a movement system, which is key-based (using WASD), for an MMORPG barebones framework. A problem that I have come across is key spamming for the movement. For the system, I am simply sending keystrokes to define when the client starts/stops moving (to minimize packet size and sending intervals substantiallly). Everything runs smooth until a malicious client wishes to perform DDoS action (mainly key spamming). For this reason, I am forced to implement an anti-key-spam system. My first thought for a solution was to limit the keypresses via timers (disallowing the client to send a movement packet for a miniscule timeframe). However, this would introduce movement bugs, which is byfar worse than key spamming. I wasn't able to think of anything else. Could anyone help me out?