views:

756

answers:

5

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.

A: 

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

Oakcool
XNA is .NET based - that's definitely NOT lightweight, nor cross-platform. Garage-games seems to be a full library, not quite what I'm looking for.Allegro, on the other hand, looks really interesting. I'll check it out.
Andrei Krotkov
A: 

I wanted to accept the answer given, but unfortunately it's not exactly correct.

Allegro is a great library that I found after that post.

GarageGames and XNA, however, were exactly the types of libraries that I wanted to avoid.

Andrei Krotkov
Accept the answer and then edit the answer to reflect what actually worked for you? I assume you found Allegro via Oakcool's answer?
Mark Ingram
+4  A: 

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.

Khalid
What's the license on this?
Andrei Krotkov
zlib/libpng License. You are free to use this library in any way you like.
Khalid
A: 

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.

Cory
A: 

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.

fortran