Forum

borrowing quakeforge's joystick code for modern engines

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

borrowing quakeforge's joystick code for modern engines

Postby Nocebo » Fri Mar 02, 2007 7:27 pm

The Linux ports of just about every engine I've tried all lack joystick support, which mods such as the Ascension of Vigil scream for. The lone exception I've found has been quakeforge. This is my first dive into engine coding, so forgive me if this is a dumb question, but how difficult would it be to graft quakeforge's joystick code into darkplaces or joequake?
Nocebo
 
Posts: 6
Joined: Mon May 09, 2005 1:22 am

Postby RenegadeC » Fri Mar 02, 2007 8:20 pm

Hmm, have you tried or found any Linux programs that allow you to bind your joystick to keyboard commands?

Windows users are able to use JoyToKey to bypass Quake's terrible joystick support and therefore I've included it in the latest TAoV and future versions.
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby Lardarse » Sat Mar 03, 2007 3:11 am

The SDL version of DarkPlaces has very good joystick support.
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Postby Nocebo » Sat Mar 03, 2007 8:04 am

Yeah, I do have joy2key, but rather than sensibly looking up the documentation for it, I started poking around the Quake source.

Nice job on TAoV by the way Mr. C. The fighting engine is a lot of fun, the models are damn spiffy, and the nods to the Igavanias and the Guardian Heroes games are hip.

And unless I'm missing something the current release versions of DarkPlaces only seem to support the joystick in windows; there's even a note in the todo list about it. Consequently I nabbed the newest dp beta and everything seems to be in order joystick-wise. Thanks for the help though.
Nocebo
 
Posts: 6
Joined: Mon May 09, 2005 1:22 am

Postby Sajt » Sat Mar 03, 2007 10:19 am

Did you try the SDL version?
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Nocebo » Sat Mar 03, 2007 6:53 pm

Yeah, the 20060725 SDL build wasn't working with my joystick. I didn't see anything in the code like related cvars and the like, besides the naming of joy1 and so on for key assignments. Perhaps, I'm not looking in the right place.

Just the SDL build in 20070302beta1 seems to support it, which I suppose is a limitation of the APIs?
Nocebo
 
Posts: 6
Joined: Mon May 09, 2005 1:22 am

Postby RenegadeC » Sat Mar 03, 2007 11:59 pm

Nocebo wrote:Yeah, I do have joy2key, but rather than sensibly looking up the documentation for it, I started poking around the Quake source.

Nice job on TAoV by the way Mr. C. The fighting engine is a lot of fun, the models are damn spiffy, and the nods to the Igavanias and the Guardian Heroes games are hip.

And unless I'm missing something the current release versions of DarkPlaces only seem to support the joystick in windows; there's even a note in the todo list about it. Consequently I nabbed the newest dp beta and everything seems to be in order joystick-wise. Thanks for the help though.


Thanks! Also I disabled joystick in the settings.cfg, you may want to re-enable it if you haven't already.
User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby Lardarse » Sun Mar 04, 2007 10:05 pm

Nocebo wrote:Perhaps, I'm not looking in the right place.

LordHavoc tore out the old joystick code from the SDL version, and it instead uses the SDL routines. Drop the console and type "joy" then hit tab to autocomplete. The axis cvars let you assign a direction to each axis, or -1 to disable input from that axis. The other 2 do what they say on the tin...
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest