Jump to content
Sign in to follow this  
  • entries
  • comments
  • views

So that works

Sign in to follow this  


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.
Sign in to follow this  


Recommended Comments

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.

Share this comment

Link to comment
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.

Share this comment

Link to comment
Stompy! I sent you a PM a while ago with loads of code and explanations for the SDL joysticks :-)

Share this comment

Link to comment

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!