D2X-W32: Joystick config improved

A forum just for you old time Descent and Descent2 players.
Post Reply
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

D2X-W32: Joystick config improved

Post by Diedel »

Toned down joystick sensitivity so that it is easier to assign joystick axis to flight maneuvers.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

works great man. but only two joystick buttons work. and I have a 3dpro, which has eight.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Strange. I can configure 6 buttons (of 8 ), and they work. Another guy had problems because he had two joysticks connected to his comp. Removing one made the other work. So if you're using two, try to disconnect one.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

Sorry Diedel, but that is not good enough. I use a USB throttle (also known as an Belkin Nostromo N50 speedpad) for D2. I need the ability to assign all buttons even with the second device plugged in.

Also, you MUST, MUST tone down the maximum turn rate when the sensitivity slider is at it's highest setting. I cannot stress this enough. The way it works now reminds me of the 180 degree flip the spaceorb was (in)famous for. It is unethical and is basically a cheat.
User avatar
Aus-RED-5
DBB Friend
DBB Friend
Posts: 1604
Joined: Fri Apr 23, 2004 7:27 am
Location: Adelaide, South Australia
Contact:

Post by Aus-RED-5 »

I was using the Belkin Nostromo N52 speedpad (USB) and a Wingman Extreme joystick and was only able to set 2 buttons as well. Seems that the D2x-w32 doesn't like having 2 joys pluged in. Only likes 1 joy. Good thing I'm used to using the keyboard! :wink:
User avatar
Avder
DBB Material Defender
DBB Material Defender
Posts: 4926
Joined: Sat Oct 09, 1999 2:01 am
Location: Moorhead, MN

Post by Avder »

I dont suppose anyone working on the D2X project would be skilled enough to hack D2X's Joystick Subsystem into the current version of D1X, would they? My Joystick works fine in D2X (A previous version, not latest) but its never worked in the latest d1x.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Ferno wrote:Sorry Diedel, but that is not good enough. I use a USB throttle (also known as an Belkin Nostromo N50 speedpad) for D2. I need the ability to assign all buttons even with the second device plugged in.
Sorry Ferno,

but I will not fix that. It's way to complicated.
Ferno wrote:Also, you MUST, MUST tone down the maximum turn rate when the sensitivity slider is at it's highest setting. I cannot stress this enough. The way it works now reminds me of the 180 degree flip the spaceorb was (in)famous for. It is unethical and is basically a cheat.
"Please" would have sounded quite a bit nicer. I'll see what I can do about it.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

Diedel wrote: Sorry Ferno,

but I will not fix that. It's way to complicated.
Why is it too complicated? Seriously, this sounds like you're giving up on that part. also, you're leaving a lot of people out in the cold because of this.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Ferno wrote:
Diedel wrote: Sorry Ferno,

but I will not fix that. It's way to complicated.
Why is it too complicated? Seriously, this sounds like you're giving up on that part. also, you're leaving a lot of people out in the cold because of this.
I think you have no clue about D2X coding and what it would take to make D2X properly work with a second joystick. I will try to fix problems in D2X or enhance it if I'm approached in a halfway friendly way, but I really don't like the way you are addressing me here all the time. I "MUST" do nothing, and I do not "give up" on this. Are you trying to make me look like a quitter and thus pressurize me into changing D2X? Is saying "please" such a big deal for you? ;)

Edit: I have built in a limitation allowing a 360° single axis rotation in no less than about 2 seconds. I can make this faster or slower if required.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

very cool diedel.

The whole reasoning behind the way I said it was it was a critical facet of Descent. I wasn't trying to be mean or obtuse, rather I was trying to be honest and very 'matter-of-fact'. If it was a non critical request, such as a new feature, I would have used the word 'please'.

D2, when it came out, had support for dual joysticks (wingman WCS/FCS, a joystick/throttle setup). I was disappointed when I could only use one out the two devices I have.

I just want it to work properly and have as many people playing it as possible. I'm sure you want the same thing too.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

The problem is that joystick handling has totally changed in D2X. It is now done in the SDL (which in turn lets it handle the OS), and I will first have to find out whether SDL can handle dual joysticks. If it does, I will have to see how D2X handles joystick data it receives from the SDL. Finally, I will have to make it distinguish these inputs and properly assign them to game functions. Not trivial.

Please do me a favor and try the rotation speed limit (try the mouse too) and tell me whether it's alright, too fast or too slow. You need to start a multiplayer game for it to work - I have disabled it in singleplayer, as I prefer the higher turn rates there. :)
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

sure thing. I'll let you know in about twenty minutes.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

sorry man, I can't even see a multiplayer game under Kali. and I had Tyranny helping me out. We both tried to host. me first, then him.
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6458
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

d2x supports TCP/IP IIRC.

and, if its a windows port, why not just use the plain-jane windows Mulitmedia functions directly, or better yet, DirectX
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

UDP/IP, and as far as I know it requires you to be on the same subnet.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

D2X supports both IPX and UDP, but not TCP/IP. I can play LAN multiplayer games, but I don't know about KALI. It might be KALI though not recognizing D2X.

Anyway, you don't need Kali to launch a multiplayer game. Just select multiplayer, IPX, chose a level and start the game. You will simply be the only player in the mine.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

tried that man.. it told me that i need at least two people to start the game. which is typical for D2. Do you think you'd be able to put in a switch for testing multiplayer specific modes? IE: '-multitest'.
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

The final release of D2x before you took over the project (d2x-cvs-20031107_mingw) worked fine on Kali. Kali just serves as an IPX emulator over the net. Allowing people over the net to play eachother as if they were connected to a LAN.

However for some reason D2x-w32 does not see games hosted on Kali by people using previous D2x version or the matching version as Ferno and I found out today. Shortly after you first started posting new D2x-w32 releases here recently I tried playing another friend on Kali and the same thing happend. We weren't able to see eachother at all. I had to switch back to the version mentioned above to even play that night.

Also, I know you were trying to address the issues of the slow turn rate regarding joysticks Dietfrid, but the setting you settled on is borderline cheating. It does resemble the quick 180 ability that some Orb users enjoyed (Which most people considered a hack). I'm asking kindly if you'd tone the turn rate down to something more idealistic for most people. Something slightly faster then what the highest setting was on the D2x source you inherited, but at the same time no where near as fast as what you currently have it now. In both Singleplayer and multiplayer the settings should be the same. You could keep it how you have it for yourself, but something more moderate might be beneficial to the rest of us. That way both parties can be happy.

One more thing, and this is just a personal suggestion, but would it be possible to return the scroll feature back into the sliders in the game? You used to be able to hold down the up or down keys in the level selection menu or the left and right keys on the setting sliders and they would scroll through. Now you have to continue tapping the keys to get to proper setting (Unless you use the alphabetic hotkeys for the level select).

I know this is a lot to put on your lap but such is the case with things that have a lot of potential. We appreciate what you've done so far and I know Ferno doesn't mean to get as harsh as he is sometimes. I think he too recognizes what can be and is frustrated that he can't do more to help. Plus he wants to play again. I don't like speaking for anybody though, I'm sure he'll let me know if I was close ;)

Keep up the good work man.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Tyr,

your post is dripping with honey ... ;)

KALI

I really can't tell (yet) why d2x-w32 doesn't see KALI hosted D2 games, as I haven't changed a single line of the networking code. I will try to find out however.

I have been able to run IPX und UDP multiplayer games on a LAN here, so this amazes me.

The thing is that I will have to dig into the networking code and find out where d2x does detect d2 matches. As far as I understand it, KALI is an IPX emulator, translating IPX based communication to TCP/IP and vice versa. So it shouldn't matter for d2x whether it is run on a LAN or over KALI - unless there is a difference between IPX communication on a LAN and what KALI does.

I rather have the suspicion that KALI for some reason does not recognize d2x-w32. KALI "knows" d2x-gl.exe (obviously the KALI guys have added it to the list of games KALI knows), and maybe KALI doesn't know how to handle d2x-w32. That would be the same as with ASE or Gamespy: You usually cannot play games over them they don't know (though afaik there are exceptions). If I am right, I would need to find out how to make KALI recognize d2x-w32.exe.

Btw, here is some info on how to setup custom games in KALI.

Turn Rate

I have built a turn rate limit into d2x-w32, limiting rotation speed around a single axis to about 2s for 360°. This only works in multiplayer though. If you have been trying it in multiplayer and it still was too fast, just let me know the desired minimum time for a 360° turn around a single ship axis (i.e. heading/pitch/roll). I told Ferno the same, so please don't too easily use the term "cheating". As it is now, it is simply a first try and subject to testing by some skilled D2 veterans who can tell me what the proper turn speed should be.

All I can do to make testing easier is to enable the turn speed limit for single player games. I will add an appropriate switch to d2x.ini and upload a d2x-w32.

Continuous scrolling

Shouldn't be too hard to re-enable. I wondered why it didn't work myself already. :)

Dual joysticks

I will try to make this work. Fortunately I do own two joysticks. :wink:

Further development

If I manage to make d2x-w32 run satisfactorily for everybody, I will be open for suggestions how to enhance it. How e.g. about timed doors/force fields, or in-level teleports making you instantaneously hop to a far away segment in the level (not like the single player teleport version, where a new level is loaded and you have a respawn animation before you can start), or accelerator segments like in D3?

That would make for some interesting new options in D2 level design, and maybe a little renaissance of D2.

Update

I have uploaded a new version of d2x-w32 with the following changes:
  • auto repeat for keyboard scrolling in all menus enabled
  • new d2x.ini switch "-limitturnrate" will enable limiting the single axis turn rate in single player
  • new d2x.ini switch "-minturnrate XX" will limit the single axis turn rate to XX 1/10 seconds. E.g. "-minturnrate 20" will limit single axis turn rate to 2 secs for a full rotation.
You can play around with the minturnrate switch and find out the proper setting now. :)
User avatar
Avder
DBB Material Defender
DBB Material Defender
Posts: 4926
Joined: Sat Oct 09, 1999 2:01 am
Location: Moorhead, MN

Post by Avder »

Whats the maximum turn rate in the original version of D2? Thats what it should be in D2x. Nothing more, nothing less.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

And what the heck is the max. turn rate in D2? :P Apart from the fact that in all D2 versions except mine it is frame-rate dependant!
User avatar
Avder
DBB Material Defender
DBB Material Defender
Posts: 4926
Joined: Sat Oct 09, 1999 2:01 am
Location: Moorhead, MN

Post by Avder »

Any framerate below 150 is adequate. Turnrate acceleration does not begin until the 150fps bug took effect in the original D2.
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Um... I think you'll find certain controllers can do whatever they like. There was the SpaceOrb's increased turning rate and even 180 flip button; more than likely D2 just worked on the principle of 'the harder you push the controller the faster it'll turn'; the controller's, uh... resolution I guess determined exactly how much that would be and in some cases that was VERY high.

That's what I suspect anyway.
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Oh, and I just thought. Could you add a friendly fire toggle to the multiplayer game setup Diedel? I couldn't imagine it'd be -too- tricky to do... trying to figure out the owner of a weapon would be the toughest bit I think, but I believe D2 already does it in the instance of running into (most of) your own fire, and determining whether a light or trigger will get blasted (I don't think robots can do it).
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Avder,

you're wrong. The high FPS bug is something different.

Sirius,

sure, good idea! :)
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

oooh, no Friendly fire! great idea Sirius :)
Diedel wrote:Btw, here is some info on how to setup custom games in KALI.
btw, I don't know if that was a general direction or if it was directed at me, but Ferno and I have been playing Descent on Kali for almost a decade. We know how to setup games there :P

Also, I was really excited to find out that you fixed the redbook issue and now you can play music cds while playing again. Was jamming with some Lacuna Coil in there while testing the turnrate settings. The only bug I found in that though was that the CD Volume slider in game doesn't function properly. It still plays at the same volume level no matter what it is set on. It also doesn't retain that you're using the redbook after you leave the program.

A couple other things I've always noticed with D2x is that on the HUD display there is always this black box covering up where the ship should be on the shields display and the AB meter is always on empty even when it is full. Not sure what you can do about that though. Just thought I'd mention it.
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

Diedel wrote:I think you have no clue about D2X coding and what it would take to make D2X properly work with a second joystick.
My condolences, I worked w/ the code and I feel w/ you. One of the worst coded programs I've seen so far.. :(

You got a link to the latest source handy ?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Grendel,

see my Descent site, D2X section.

Tyr,

I just wanted to make sure everything was tried. :p

It's pretty hard for me to test D2X-W32 on KALI when there are no D2 games at all going on, btw. :( It seems not to be too popular a game nowadays ... :roll:

Do you really play with full cockpit view?

Btw, it looks like KALI networking was disabled in D2X-INI. I have found it to be enabled by a define (#define KALINIX) and have defined that variable. There are now two extra options in the Multiplayer menu: "Start KALI Netgame" and "Join KALI netgame". Additionally, you can set a command line parameter ".kali" which will force D2X into KALI networking mode when starting a regular IPX network game - maybe that is required when D2X-W32 is launched by KALI. You can also place "-kali" in d2x.ini. Please note that parameters are given w/o double quotes; I have only used them here to enhance readability. Eventually it might also help to rename d2x-w32.exe to d2x-gl.exe, as the latter is a known game for KALI. I hope this is all that was needed to make D2X-W32 work with KALI.

Here is a proposal for a d2x-w32 command line for use in KALI:

-kali -shortpackets -packets 5 -nomovies -player <player profile>

The -player <player profile> command will load the player profile <player profile>.plr (e.g. "-player tyranny" will load tyranny.plr) and skip the pilot selection dialog. Pretty handy, if you ask me. :)

Actually I believe that with a broadband connection you could also specify -packets 20 and omit -shortpackets.
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

You usually have to ask around if you can find someone to play with. The Chickens |CM| clan usually play quite often. A lot of D2 is played by the Rangers as well on their server but usually later in the evenings. You haven't been able to find just open games though for several years now, but people still play.

Btw, I already had the command line -Kali in my d2x.ini. :P I understand its difficult for you to test that stuff, I'm not trying to pressure you on anything. We can all work together and see what can be done to improve on things :)

I don't play with full cockpit view no, I play with the smaller HUD "The bar across the bottom". As for the new options for Kali play, will you still be able to see games hosted via IPX from previous D2x or D2 builds? If not that might pose a problem. I'm sure I can test it with a few people. I'll get back to you on that.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

The -kali switch did nothing in d2x-w32 versions prior to the KALI networking enabled one, but it's good its already in your d2x.ini.

Imo d2x-w32 should display all KALI D2 games if KALI networking actually works - as I said, I haven't changed a single line (or character) of the networking code.

Actually, you could launch a D2 game with KALI using d2x-w32 right now if you like - I'm online in KALI. So we'd know at once whether it works now or not. :)

You can also meet me in irc.gamesurge.net:6667 #descent3. I'm karx11erx there.
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

Meet me on the Descent server (539).
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Well ... no KALI (yet). That define was for UNIX. :(
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

I'm sure we'll get to the bottom of it. Sorry I couldn't be of more help.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

Oh, I found something. Now I don't know if this can be fixed or not, but whenever I create a player file under D2X-w32, I can't use it under D2X-GL. But I can use player files created under D2X-gl in D2X-w32. It's pretty wierd.
User avatar
Aus-RED-5
DBB Friend
DBB Friend
Posts: 1604
Joined: Fri Apr 23, 2004 7:27 am
Location: Adelaide, South Australia
Contact:

Post by Aus-RED-5 »

I don't know if you know this or not, but the D2x-sdl.exe 2.5 version works with Kali fine. Its can see net games on the Descent server. But the gl and w32 versions you've done seem to not see any games. Lan games work though (not thru kali). I have 3 pc hooked up. So lan games is ok. :)

Diedel - I hope you can find and fix the kali probs. I would so love to be able to play D2-w32 or gl versions insted of the sdl version. The sdl version isn't as nice or smooth as you're versions!

Good luck!
Aus-RED-5
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

Thats what we spent several hours trying to debug yesterday. This is an issue that is already known about and has been / is being discussed. In theory, being that the D2x-w32 project came from the same source code used to make the D2x-sdl and D2x-gl executables and the netcode was untouched it should work on Kali just fine.

We know though that it doesn't. Hes working on it though.
User avatar
Aus-RED-5
DBB Friend
DBB Friend
Posts: 1604
Joined: Fri Apr 23, 2004 7:27 am
Location: Adelaide, South Australia
Contact:

Post by Aus-RED-5 »

Tyranny, This I know. I'm just glad that NOW (Finally) its beeing worked on and might be fixed by Diedel.
I only wish that I could help out, but I know nothing about coding or programing. :(
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Ferno wrote:Oh, I found something. Now I don't know if this can be fixed or not, but whenever I create a player file under D2X-w32, I can't use it under D2X-GL. But I can use player files created under D2X-gl in D2X-w32. It's pretty wierd.
I think it's because there's a number somewhere that D2X-W32 uses an extra byte to store in the player file. I had the same problem myself; however, if I hex-edited that extra byte out, it continued to work under D2X-GL.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Tyr,

thank you very much for you help last ... well, for me it was night. :)

I have changed the version number in the player files because I had at one point of time increased the max. folder name length from 13 to 255 to be compatible with long filenames.

I had the suspicion that d2x-w32 doesn't work with KALI because I had changed some global data type, making it incompatible with other D2 games. But if that would be the case, d2x-w32 should work fine at least with other d2x-w32 games on KALI (as they would use identical data types), which they do not.

I had also compared my network code files with those from the official d2x CVS (version control system), and they were identical.

Afaik KALI simply intercepts IPX calls made by applications it controls (i.e. has launched), translating them to and from TCP/IP. As d2x-w32 works fine on LANs with IPX I am absolutely clueless what could be going on here. I would need to debug KALI itself and see whether and how it communicates with d2x-w32, but I doubt the KALI team would give me their source code ... :roll:

One more thing I will try is to mix Descent 2 Win95 and d2x-w32 on a LAN and see whether they work together. If they do, it proves that all data used by them to communicate is compatible.

I have sent an e-mail asking for help to the KALI team and hope they can assist me a little in getting this nasty problem fixed.

This is really annoying me. Any Christians out there? Time to pray ... :D

Update 1:

D2 Win95 and d2x-w32 don't see each other! Now I can look into what data they're using and hopefully find out what's wrong here.

Update 2:

I've found a difference, and I think I can say that I am not to blame for it. There was a member in one of the data structures used for IPX communication with an enum data type. Now in Win32 enum is int, which is 4 bytes long. When I saw this I was pretty sure that this should only be a 1 byte field, so I changed the declaration, recompiled and voilà: D2 Win95 and d2x-w32 suddenly understood each other! I stumbled over this when receiving errors on data length info while D2 Win95 and d2x-w32 were "talking" with each other.

There was another bug causing the level checksum calculation to yield wrong results, which I introduced when fiddling with the renderer. I fixed that one too.

So there is a new d2x-w32 available on my Descent site.

--> see new thread.
Post Reply