borrowing quakeforge's joystick code for modern engines

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
Nocebo
Posts: 6
Joined: Mon May 09, 2005 1:22 am

borrowing quakeforge's joystick code for modern engines

Post by Nocebo »

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?
RenegadeC
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada
Contact:

Post by RenegadeC »

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.
Lardarse
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Post by Lardarse »

The SDL version of DarkPlaces has very good joystick support.
Nocebo
Posts: 6
Joined: Mon May 09, 2005 1:22 am

Post by Nocebo »

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.
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

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.
Nocebo
Posts: 6
Joined: Mon May 09, 2005 1:22 am

Post by Nocebo »

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?
RenegadeC
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada
Contact:

Post by RenegadeC »

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.
Lardarse
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Post by Lardarse »

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...
Post Reply