home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Sauerbraten Game Controller Support

by dbox on 03/22/2006 20:48, 39 messages, last message: 05/26/2006 09:53, 15981 views, last view: 05/18/2024 23:36

I thought I would start a new thread to announce the game controller support enhancement I recently just finished. You can check it out here (source code included):

http://www.quadropolis.us/node/171

I'm really curious to get feedback to see if there would be any other interest in this feature (and to know if it works for anyone else). If so, I would be happy to donate what I've done so far back to the project and expand on what is there now.

My general approach was to translate joystick events (button presses, hat and axis movements) into sauerbraten "keypress" events. This way you can use the bind command to map joystick events to actions. (There are examples of this in the quadropolis posting).

I did my best to add this without much modification to the existing code. I put all of the joystick event and logic into a single class (joystick.h) and only touched 3 other files:

main.cpp - added 4 calls to joystick class

engine.h, physics.cpp - added joymove() method (very similar to mousemove)

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages

#8: Seriously

by Pxtl on 03/24/2006 02:09

This has been tried. Any time mousers play against joystickers, it's a bloodbath. Especially in frantic, fast-paced games like Sauer. Notice how _slow_ console FPS games are? The only fast-paced console FPS I can think of is OutTrigger, which relied on really powerful autoaim to handle the pace.

reply to this message

#9: Re: Seriously

by dbox on 03/24/2006 02:20, refers to #8

Hmmm... point taken.

So I'll put you down for Team Mouse then?

reply to this message

#10: Re: Seriously

by Passa on 03/24/2006 07:25, refers to #8

meh its good to have the option anyway.

some people WOULD prefer to play from the confort of their lounge, and console FPS games are not that slow, have a look at Halo 2 for example.

reply to this message

#11: Re: Seriously

by eihrul on 03/24/2006 08:30, refers to #8

Makes me wonder about mouse vs. the nintendo revolution's controller... :)

reply to this message

#12: Re: Seriously

by RealNitro on 03/24/2006 09:52, refers to #11

"Makes me wonder about mouse vs. the nintendo revolution's controller... :)"

It seems like Nintendo will encourage indie developers to write games for the Revolution, maybe somebody will port Sauerbraten...

reply to this message

#13: Re: Seriously

by Pxtl on 03/24/2006 14:03, refers to #12

By "indie" they mean "only $2000 per devkit" not "Free Software".

reply to this message

#14: Re: Seriously

by RealNitro on 03/24/2006 15:23, refers to #13

I know, but still. You never know somebody that has a devkit descides to port it... (Just dreaming here, I'm not saying somebody will.)

reply to this message

#15: improvements

by dbox on 03/24/2006 17:26

So I log on last night to do some testing with the old joystick and wouldn't you know it, there's Pxtl.

I'm not going to lie to you folks... I got handled.

But it did help me find some flaws with my design. So I went back to the drawing board and made some enhancements. By the end of the night I was actually holding my own pretty well against some established cube/sauerbraten players.

I'll be posting the updates later this afternoon.

Sign-ups are still open for the Joystick/Mouser Smackdown :). So far we've got dbox (or "joystick boy" as some of you started affectionately calling me last night) on Team Joystick vs. Pxtl on Team Mouse.

reply to this message

#16: Re: improvements

by dbox on 03/24/2006 23:21, refers to #15

As promised I have uploaded a new and improved version of the joystick support mod. Not only does it impact less existing sauer code (only minor modifications to main.cpp to make calls out to my joystick class) this one is exponentially better than the first attempt with regards to quality of control.

With the first one I was never really happy how "flat" the field of view control was. Now it is much more sensitive to how far you are moving the analog controller. Light pressure keeps the motion slow and controlled for aiming. Pressing hard right or left now lets you wheel around very quickly.

Personally, (and I know I'm probably biased) I think this release is getting pretty close to the level of control you would have with a console game.

I'd really like to hear some feedback from anyone who tries it out.

reply to this message

#17: Re: improvements

by dbox on 03/24/2006 23:22, refers to #16

You can get it here:

http://www.quadropolis.us/node/172

reply to this message

#18: Joystick for Cube

by dbox on 03/25/2006 23:17

Hey all. Just wanted to announce that I back-ported the joystick support to Cube. It's included in the same zip file now:

http://www.quadropolis.us/node/172

reply to this message

#19: Re: Joystick for Cube

by boilover_atwork on 03/26/2006 01:49, refers to #18

not as cool as my mod for sauerbraten

reply to this message

#20: Re: Joystick for Cube

by CC_machine4 on 03/26/2006 23:56, refers to #19

this mod is way cooler than yours, you mean.

reply to this message

#21: Config update

by dbox on 03/29/2006 09:56

I've added a small feature to the joystick support mod that should make it a bit easier to configure. If you set the new "joyshowevents" property to 1, all of the joystick events will be displayed in the console as they are fired. This will help you know which button to bind to which action and which axes to use for your direction and field of view control.

You can check out all of the details and download the updated mod here:

http://www.quadropolis.us/node/172

reply to this message

#22: Survey

by dbox on 03/29/2006 09:58

Has anyone tried out this mod yet?

If so, what's the make and model of your game controller? How did it work for you?

reply to this message

#23: Menu-driven configuration

by dbox__ on 04/05/2006 08:05

So is everybody ready for a non-controversial post? Well here you go:

I've just uploaded the latest update to my joystick support mod. You can now completely configure the joystick using dynamically generated menus. If you have your joystick plugged in this new menu will show up under options->joystick.

You can read all about it and download the latest version over at Quadropolis:

http://www.quadropolis.us/node/172

reply to this message

#24: Heh

by pushplay on 04/06/2006 07:32

Actually I'm pretty surprised that the joystick mod hasn't caused more controversy. Usually it's a debate between the people who think it's obviously an inferior control scheme and the sooner everyone gives it up the better, versus the people who want to give everytone whatever controls make them happy.

reply to this message

#25: ..

by makkE on 04/06/2006 14:22

Well, I don´t mind what controllers people use, I think it´s cool he does it.
Wouldn´t mind that being official (and also add turning keys)
If someone wants to use keyboard or joysticks, why not?
Better for my score, lol.

reply to this message

#26: Just out of curiosity...

by dbox__ on 04/26/2006 01:13

This question is for Aardappel or another source contributor...

I know you guys aren't really joystick fans but have you guys considered including my joystick support in the official release?

reply to this message

#27: some testing

by rancor on 04/26/2006 02:19

OK, so I went and tried out the joystick mod with a xbox 360 controller, and while it shows a good deal of promise, particularly with the dynamic menus, several issues made it almost unuseable. The primary issues were with axises being confused, as in it seemed like axis 3(the triggers) and axis 4(up/down right stick) were interfering with each other. The other major issue was that the dpad directions seemed partially rotated clockwise one position, as in things bound to JOYHAT1N ran when JOYHAT1NE was pressed. Additionally, I may have just missed it, but there does not appear to be a way of making thing bound to the maximums of an axis execute on a threshhold lower then the maximum. This is an issue in that moving the joystick all the way out to the limit of its range of motion is both uncomfortable and more likely to trigger additional, spurious, directions.

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54039665 visitors requested 71820509 pages
page created in 0.036 seconds using 9 queries
hosted by Boost Digital