Sign in to follow this  
Nytehauq

What library should I use for input?

Recommended Posts

What library should I use for input? I'm trying to stay relatively platform independent, and I don't want to use anything Microsoft. I'm looking for a simple library for handling input that won't interfere with other parts of the program. I looked at SDL and Allegro, but I can't get them to start up with just input - they want to do graphics and everything too. Any ideas?

Share this post


Link to post
Share on other sites
You could check out my OIS lib (check my sig). It is currently only ported to Linux (under X11) and Win32 (via DirectInput). A MacOSX port has been in work for a little while. Also, plans for other platforms (and consoles) are in the works.

Share this post


Link to post
Share on other sites
Yeah, I understand your frustration too. I've been looking for one too that doesn't want to do rendering or anything else and is free to use commercially. After looking for platform indy solutions (didn't find any), I then tried WM_KEY**** and WM_INPUT messages (the fact that you don't get them on a per-frame basis complicated things and wasn't as neat as I liked), then tried GetAsyncKeyState (after a few calls, successive calls started reducing my frame rate exponentially), and then ended up going back to DirectInput (the most evil, but it really does work the best).

Share this post


Link to post
Share on other sites
Quote:
Original post by yadango
Yeah, I understand your frustration too. I've been looking for one too that doesn't want to do rendering or anything else and is free to use commercially. After looking for platform indy solutions (didn't find any), I then tried WM_KEY**** and WM_INPUT messages (the fact that you don't get them on a per-frame basis complicated things and wasn't as neat as I liked), then tried GetAsyncKeyState (after a few calls, successive calls started reducing my frame rate exponentially), and then ended up going back to DirectInput (the most evil, but it really does work the best).


Yeah, I figure I might as well use DirectInput on microsoft platforms and develop other implementations on a platform by platform basis. It'd be great to use other libraries if they were actually suited to your needs ;(

Share this post


Link to post
Share on other sites
Quote:
Original post by Nytehauq
Quote:
Original post by yadango
Yeah, I understand your frustration too. I've been looking for one too that doesn't want to do rendering or anything else and is free to use commercially. After looking for platform indy solutions (didn't find any), I then tried WM_KEY**** and WM_INPUT messages (the fact that you don't get them on a per-frame basis complicated things and wasn't as neat as I liked), then tried GetAsyncKeyState (after a few calls, successive calls started reducing my frame rate exponentially), and then ended up going back to DirectInput (the most evil, but it really does work the best).


Yeah, I figure I might as well use DirectInput on microsoft platforms and develop other implementations on a platform by platform basis. It'd be great to use other libraries if they were actually suited to your needs ;(


Um? Just curious.. Did you read my post? I am not trying to be pushy or anything.. It's just that my lib already uses DirectInput under the hood, and provides a cross platform C++ API for the Keyboard/Mouse/Joysticks. Plus, my lib is zlib, so use it, mod it, whatever, no strings attached ;)

But, do as you will, spend months reinventing the wheel if you want :D

Share this post


Link to post
Share on other sites
Quote:
Original post by pjcast
Quote:
Original post by Nytehauq
Quote:
Original post by yadango
Yeah, I understand your frustration too. I've been looking for one too that doesn't want to do rendering or anything else and is free to use commercially. After looking for platform indy solutions (didn't find any), I then tried WM_KEY**** and WM_INPUT messages (the fact that you don't get them on a per-frame basis complicated things and wasn't as neat as I liked), then tried GetAsyncKeyState (after a few calls, successive calls started reducing my frame rate exponentially), and then ended up going back to DirectInput (the most evil, but it really does work the best).


Yeah, I figure I might as well use DirectInput on microsoft platforms and develop other implementations on a platform by platform basis. It'd be great to use other libraries if they were actually suited to your needs ;(


Um? Just curious.. Did you read my post? I am not trying to be pushy or anything.. It's just that my lib already uses DirectInput under the hood, and provides a cross platform C++ API for the Keyboard/Mouse/Joysticks. Plus, my lib is zlib, so use it, mod it, whatever, no strings attached ;)

But, do as you will, spend months reinventing the wheel if you want :D


Oh, sorry, I did read your post ;), just got sidetracked.

I figure I'll write my own library though, I don't really like to use other libraries without at least knowing how they work and being able to do everything without them anyway.

Share this post


Link to post
Share on other sites
His library is open source, so there's nothing stopping you from being able to learn and understand his code for you to modify for your own needs. I mean, wasn't this your original question?

Quote:
What library should I use for input? I'm trying to stay relatively platform independent, and I don't want to use anything Microsoft. I'm looking for a simple library for handling input that won't interfere with other parts of the program. I looked at SDL and Allegro, but I can't get them to start up with just input - they want to do graphics and everything too. Any ideas?


I just find it odd that someone posts something that exactly matches what you said you wanted only to say 'nah' a few posts later. Your choice though.

Share this post


Link to post
Share on other sites
Thanks for the suggestions.

However, having read superpig's enginuity series thoroughly, I've decided to settle on using SDL for all the mundane tasks that I wanted to keep free of it, and also use it for input. I guess I won't be reinventing the wheel ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this