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!


1 Answer 1

  • 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.

You must log in to answer this question.

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