Archived

This topic is now archived and is closed to further replies.

Xorcist

Need help with input abstraction (action handler)

Recommended Posts

Xorcist    122
Does anyone know of any good references or tutorials that might help me design and implement an action handler to abstract the actual input I receive from the events those inputs trigger (so I don''t have to hard code everything). For instance I don''t care whether the player configures Z to have his player jump, or a button on a joystick (or both for that matter). But when he wants to jump, his character better jump. I''m a little fuzzy as to how I''d go about doing this. P.S. My input system is currently designed around SDL, so unlike DirectX there is no "built-in" action handler.

Share this post


Link to post
Share on other sites
Luctus    584
You might want to take a look on how it's done in Half-Life, it's not overly complicated (key binding that is, the rest is). Download the SDK and take a look...

//Edit:
Or the Quake or Quake II source might be better, since ALL the code is avaliable, not just a SDK like Half-Life (I managed to get a brief understanding of key-mapping from HL SDK, though..haven't looked at the Quake code)


-Luctus
Codito, Ergo Sum (Courtesy of ThinkGeek)

[Mail][DreggSoft]

[edited by - Luctus on March 5, 2003 3:53:45 PM]

Share this post


Link to post
Share on other sites
Xorcist    122
That sounds a bit daunting... aren''t there any tutorials on this? Something I that would "teach" me what I need to know. I''m assuming not, since I only got one reply and 100% of my internet searches resulted in exactly 0 successes. Is such a system so trivial that tutorials really aren''t needed? If so I''m feeling pretty stupid right about now, because I don''t even have the slightest idea where to start.

Share this post


Link to post
Share on other sites