Reputation: 5684
I'm trying to write a game with support for Joypads as well as mouse/keyboard. I've tried finding information about that, but it's either outdated or not portable enough.
Does anybody know of any good, lightweight libraries that can abstract Joypad reading? I want to use the 360 controller, but I would like support for more than that.
I'm primarily going to be writing on Windows, but I really don't want to use DirectInput/XInput, in case I ever wish to port my code.
Upvotes: 19
Views: 20591
Reputation: 751
Have you ever tryied OIS (Object Oriented Input System)? An efficient and light weight library. I am very satisfied with it.
I have never tried with the 360 controller, but it should work fine.
Upvotes: 12
Reputation: 326
I know this thread is very old and by now you might have gotten what you need, but im answering this just in case someone stumbles on it and needs help as well.
I stumbled upon this library gainput and it seems like it makes alot of sense. You can try it out, if it helps.
Gainput is a lightweight c++ library, that enables you use the same interface for Joypads, macs, pc, linux as well as mobiles, and it is very easy to integrate to your project.
A link to gainput can be found here (http://gainput.johanneskuhlmann.de/)
Upvotes: 4
Reputation: 76057
What about SDL?
Maybe it's not what you mean by lightweight (it has the graphic and audio subsystems too), but it's very portable.
Upvotes: 4
Reputation: 1339
This maybe an older question and is already answered but..
Someone on tigsource made a lightweight cross-platform gamepad library that you might find useful.
You can view the post on it here.
Upvotes: 5
Reputation: 1496
Have you looked at XNA game framework? There is also
Allero http://www.talula.demon.co.uk/allegro/
GarageGames http://www.garagegames.com/
Try that out
Upvotes: -6