Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
2  
+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. –  Randolf Richardson Sep 7 '11 at 17:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.