Page 1 of 1

D2X-W32: Joystick config improved

Posted: Sat Feb 19, 2005 6:03 pm
by Diedel
Toned down joystick sensitivity so that it is easier to assign joystick axis to flight maneuvers.

Posted: Sat Feb 19, 2005 10:46 pm
by Ferno
works great man. but only two joystick buttons work. and I have a 3dpro, which has eight.

Posted: Sun Feb 20, 2005 2:40 am
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.

Posted: Sun Feb 20, 2005 3:14 am
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.

Posted: Sun Feb 20, 2005 4:10 am
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:

Posted: Sun Feb 20, 2005 4:36 am
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.

Posted: Sun Feb 20, 2005 6:16 am
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.

Posted: Sun Feb 20, 2005 1:07 pm
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.

Posted: Sun Feb 20, 2005 3:03 pm
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.

Posted: Sun Feb 20, 2005 4:43 pm
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.

Posted: Sun Feb 20, 2005 4:57 pm
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. :)

Posted: Sun Feb 20, 2005 5:30 pm
by Ferno
sure thing. I'll let you know in about twenty minutes.

Posted: Sun Feb 20, 2005 6:11 pm
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.

Posted: Sun Feb 20, 2005 6:25 pm
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

Posted: Sun Feb 20, 2005 6:44 pm
by Sirius
UDP/IP, and as far as I know it requires you to be on the same subnet.

Posted: Sun Feb 20, 2005 8:58 pm
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.

Posted: Sun Feb 20, 2005 10:55 pm
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'.

Posted: Sun Feb 20, 2005 11:37 pm
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.

Posted: Mon Feb 21, 2005 6:26 am
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. :)

Posted: Mon Feb 21, 2005 7:31 am
by Avder
Whats the maximum turn rate in the original version of D2? Thats what it should be in D2x. Nothing more, nothing less.

Posted: Mon Feb 21, 2005 7:37 am
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!

Posted: Mon Feb 21, 2005 2:22 pm
by Avder
Any framerate below 150 is adequate. Turnrate acceleration does not begin until the 150fps bug took effect in the original D2.

Posted: Mon Feb 21, 2005 2:55 pm
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.

Posted: Mon Feb 21, 2005 2:58 pm
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).

Posted: Mon Feb 21, 2005 3:07 pm
by Diedel
Avder,

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

Sirius,

sure, good idea! :)

Posted: Mon Feb 21, 2005 3:41 pm
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.

Posted: Mon Feb 21, 2005 4:43 pm
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 ?

Posted: Mon Feb 21, 2005 4:48 pm
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.

Posted: Mon Feb 21, 2005 5:16 pm
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.

Posted: Mon Feb 21, 2005 5:21 pm
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.

Posted: Mon Feb 21, 2005 5:32 pm
by Tyranny
Meet me on the Descent server (539).

Posted: Mon Feb 21, 2005 7:49 pm
by Diedel
Well ... no KALI (yet). That define was for UNIX. :(

Posted: Tue Feb 22, 2005 1:15 am
by Tyranny
I'm sure we'll get to the bottom of it. Sorry I couldn't be of more help.

Posted: Tue Feb 22, 2005 1:52 am
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.

Posted: Tue Feb 22, 2005 3:42 am
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

Posted: Tue Feb 22, 2005 3:48 am
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.

Posted: Tue Feb 22, 2005 3:58 am
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. :(

Posted: Tue Feb 22, 2005 4:19 am
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.

Posted: Tue Feb 22, 2005 5:24 am
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.