Arika Game Engine - Multiple Key Presses in a single frame

Thread in 'Discussion' started by JoshuaD, 11 Jan 2011.

  1. If a user somehow managed to press the same key multiple times in a single frame, what would happen? The three options that come to mind: disregard any key press after the first per frame, process one press this frame and one each subsequent frame until they are exhausted, and process each one this frame.

    Thanks!
     
  2. Muf

    Muf

    Re: Akira Game Engine - Multiple Key Presses in a single frame

    Arcade and console games use state-based input. A bitmask for possible direction and button presses is kept in memory and updated once per frame, usually right before gameplay logic is run. So in theory you can press a button right before the game polls input, then release it, and press it again right before the game polls the next frame, and the game will consider the button to have been held down continuously.
     
  3. Zaphod77

    Zaphod77 Resident Misinformer

    What he said. Arcades count on the fact that humans generally can't press and release a microswitch within 1/60th of a second, so they tend to not drop inputs. :)

    (anyone who can tap 60 times per second let me know. :) )
     

Share This Page