I'm thinking about building a multiplayer game with combat between players and monsters. Actors need to have a maximum actions per minute, otherwise users could cheat by holding down the attack key. Plus, I'd like to vary the maximum APM depending on the player class and monster.

How should I handle rate limiting combat in my game?

Assuming every actor has a timestamp of when their last action occurred, should I queue up actions to execute or should I drop them if they're received too early? Can you think of any reading material or examples I could research?


1 Answer 1


That time stamp should be from the server's receipt, never trust player data.

The two most enjoyable experiences, in my opinion, come from one of these two options:

1: For a more twitchy, timing based game drop everything that's too early, these are most assuredly the player spamming his input keys. If you have classes of actions with different APM limits you can tune some actions to be more responsive with a fast turn around while other actions have longer recycle times and this gives you flexibility to balance game play and make it feel fun.

2: For a more MMO feel buffer ahead just one command that was sent too early, game play feels more strategic and forgiving of player timing. I would game play test buffering strategies to see whether holding just the first command or the latest command to play when the timer is up, the only way to tell which feels better and is more fun for the players.

I don't have any references to cite because every game is tuned specifically to fit its own play design. So whatever you do, try to make the system flexible and data driven so you can tune the feel with as little extra work as possible.

I'd like to be more helpful but it really does come down to experimenting to see what feels best to your players.

  • 2
    \$\begingroup\$ +1 particularly for "never trust player data" -- sometimes I think MMORPG technology should be referred to as using a master/slave architecture rather than client/server. \$\endgroup\$ Sep 7, 2011 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .