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.

The input system of Quake3 is handled using a Keybinding relay, whereby each keypress is matched against a 'binding' which is then passed to the CLI along with a time stamp of when the keypress (or release) occurred.

I just wanted to get an idea from developers what they considered to be the key benefits of designing your input system around this approach?
One thing i don't particularly like is the appending of the timestamp to the bound command. This seems like a bit of a hack to bend the CLI into handling the games input?
Also I feel that detecting the keypress only to add the command to a stream of text that gets parsed at a later date to be a slightly latent way of responding to input? (or is this unfounded?)

The only real benefit i can see is that it allows you to bind 'complex' commands to keypresses; like 'switch weapon;+fire;' for example. Or maybe for journaling purposes?

Thanks for any insights!

share|improve this question
    
Maybe check out gamedev.stackexchange.com/questions/3076/… as well? –  The Communist Duck Feb 13 '11 at 10:58
add comment

1 Answer

up vote 7 down vote accepted
  • It makes it very easy to implement customizable button assignment in your game.
  • It makes programming very easy because you can think in abstract terms: You only have to decide what shall happen if the player input is "forward" for example, whether this "forward" comes from pressing the up key, w, an analog stick or even a combination of keys.
  • A keybinding relay is an abstract concept and your implementation can differ from the one of Quake3. For example I wouldn't implement a timestamp if I didn't need a replay function. The overhead you're worried about is negligible if you query the whole controller state at once.
share|improve this answer
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.