So that works

Published December 26, 2006
Advertisement
I got the drivers installed for the controller, and ran a small program to test it...riviting:


It is nice to see that it works, although I'm a bit intimidated that there are 5 axes on the controller(I would say there are 2).

This will be my first time working with the SDL_Joystick library, so it's going to take some time to learn it. From first impressions it seems easy to use, just like the rest of the SDL libraries. Plus, it helps that I always have a copy of "Focus on SDL" handy on my desk.

During the break, I want to get controller input working for Blocky Man. And, if I can do that, I'll also go back and get controller input working for Stompy's Revenge.

ArchWizard brought up a good point yesterday that I think I should clarify. Although I'll be testing the input with the Xbox 360 controller, that's not to say that it won't work with other controllers. In theory, any gamepad that has a joystick and two buttons should be sufficient to play Blocky Man, although I can't account for how it will work on every Gamepad. Plus, programming gamepad support is something completely new to me, but I'll try my best. I think that given the types of games that I make, being able to play them with an actual game controller is quite important.

That's all I'll really be working on over my break. Well, that and finally beating Final Fantasy III.
Previous Entry Merry Christmas!
0 likes 4 comments

Comments

Mushu
heh, joypad support - awesomeness.

As for the axes, each analog stick should have 2 axes. I thought the 360 controller had 2 sticks, which would mean 4 axes. Dunno what the 5th one is, probably something random.

I remember my PS2 USB controller had 5 or 6 axes though (using joytokey, which using DInput internally). Hur.
December 26, 2006 11:32 PM
Stompy9999
For whatever reason, I was thinking 1 axis = 1 stick. But even with that, it still doesn't explain the 5th axis.

Tomorrow I'll actually test input to see what button maps to what and so on. I honestly can't wait to be able to play Blocky Man with a controller.
December 27, 2006 12:22 AM
Metorical
Stompy! I sent you a PM a while ago with loads of code and explanations for the SDL joysticks :-)
December 27, 2006 09:34 AM
Stompy9999
Yeah, I remember. I'll check it out and see what you did.
December 27, 2006 10:27 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement