Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the menu system for our game (selecting levels, options, etc.), the player presses the a button on the gamepad to go to the next screen. I coded the menu system to wait until the button is released before taking any action (i.e., displaying the next screen). Some recent playtest feedback suggested that we do it the opposite way: take action as soon as the button is pressed. I am curious, what is the standard way this is handled, and does it even make a difference?

share|improve this question
up vote 30 down vote accepted

In a game which is controlled by a gamepad, where control inputs directly change GUI focus from one GUI button to another, those GUI buttons should be activated when a controller button is pressed.

In a game which is controlled by a mouse (or if a gamepad is used to move a virtual mouse cursor around the screen), on-screen buttons should be activated when the mouse/controller button is released over the same button on which it was pressed. (If the press occurred over one GUI button, and the mouse was then moved, and released over a different GUI button, neither GUI button is activated)

The reason for this is that people's mouse control skills are highly variable, and often people have a little trouble positioning the cursor exactly where they want it, or even telling precisely which GUI button they're hovering over at the moment. The theory is that people can press and hold the mouse button to make the GUI button highlight, and if that GUI button wasn't the one that they intended to use, they can move their cursor away from it before releasing the mouse button in order to avoid pressing it.

But if your game is being controlled by a gamepad, then you absolutely want to take action when the gamepad button is pressed, not when it's released.

share|improve this answer
+1. The action should be taken on mouse-release, not mouse-down. However, for this to be effective it's important that the GUI element itself changes visual state on the mouse-down event. – Kylotan Jul 2 '11 at 1:06
Makes sense, thanks for the responses! – Venesectrix Jul 2 '11 at 6:12

I'd take action as soon as the key is pressed.

The best example where the action took place after the key was released was in Starcraft: Broodwar. When I would press the keys very quickly, I would often press the next key before completely releasing the previous one which led to some commands being ignored. (1A Click, 2A Click, 3A Click - the 2 would be ignored)

This was changed in Warcraft III and the game felt a lot more responsive to me as a result and I never had the 'sticky control group' problems from Broodwar.

share|improve this answer

Your Answer


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.