D2X for MS-Windows

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Garak
DBB Ace
DBB Ace
Posts: 128
Joined: Wed Aug 27, 2003 2:01 am
Location: Alabama
Contact:

Post by Garak »

I KNEW that was you posting @ gamedev! :)
Way to tell Pouya to go away. :P

BTW, love your work on D2X, got me playing again. thx dude
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

:roll:

You're welcome. :)
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

-gl_trilinear ?????

Post by Tigeron »

Well I don't know about this......
I downloaded your latest release and when the game starts there is just a black screen. I backed out and put the Brightness slider all the way up and tried again. Nothing but a black screen.

I commented out your new argument (-gl_trilinear) and tried again. Nothing but a black screen. The level started as I can hear the lasers when I fire them but completely in the dark.

Concerning the prveious two files that I listed as to where the constant jerking begins.....Is there a way that you can run a file compare on them to see what the differences are? It might help jog your memory if you saw the difference in the code. if you no longer have the files give me an Email address and I will send them to you.

Tigeron
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

did you do any GFX card tweaks Tigeron? because that's how I ran into trouble with D2X the last time.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Tiger,

please download the version from yesterday night. I could play both on a GF MX 400 on Win2K pro and a Radeon 9800 pro on WinXP home.

If you have only d/l'd the executables, running a diff over them will not help as I will only get binary differences. I'd need to check the source code.
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

Black Screen

Post by Tigeron »

No card tweeks....not really anything to tweek anyway.
I have an MX 440 on Win 98 SE.
Tried desktop at 16 and 32 bit.
With and without the Triliner argument.

I guess they still don't have a good decomplier after all these years. I have C++ 6.0 Pro but never got into it. Only went through a few tutorials before getting side tracked a few years ago. Would not even now how to compile with it now.

On my way to work...be back in about 11 hours

Ron
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

I have just (3:15 pm DST GMT+1) uploaded a new version of D2X-W32 (the exe is now named d2x-gl.exe, btw.) It contains a little change regarding depth buffer and a fix regarding some internal table reset and overflow handling. Make sure you have an IPX protocol installed and bound to your network adapter before trying this.

I have also tested IPX usage with this D2X version and I could setup and play an IPX-based multiplayer match on our company LAN.

To select 16 bit color depth (only fullscreen mode, windowed mode will use desktop color depth), you can specifiy "-gl_16bpp" in d2x.ini. If you don't specify it, D2X will use 32bpp.

If you still get a black screen, please try "-legacyzbuf" in d2x.ini.

I have just played two levels of D2:Vertigo on my Win2K/MX400 machine and everything was fine.
pATCheS
DBB Ace
DBB Ace
Posts: 187
Joined: Sat Apr 03, 2004 9:12 pm
Contact:

Post by pATCheS »

I took a look at this just now, it appears that deeper things are getting drawn over shallower things (and things of different types get drawn in different order, which is interesting to note). The issue with the new Z testing is pretty unquestionably that the depth test function is backward. Reverse the test (ie, if it's GL_GREATER, make it GL_LESS) and it should be fine. Alongside this, all cubes that are at any point sent to the video card (even if they end up invisible to the player) show up in the automap. I had seen the entire first level in the game without leaving the first area and the lava tunnel to the hostages, and it all showed up in the map. I imagine it's because of a cube flag of some sort that gets set some time before the cube is shipped out to the renderer. I recommend making the existing culling system only a little more lenient and leaving depth testing enabled, or using the current depth testing only for sending data to the graphics card, and using the old code for setting the automap flag.

Going to the options menu while in game and looking at the monitor sideways, and returning to the game causes it to be "letterboxed." This may also occur when going to and from the automap (and anything else that causes the game to switch to 640x480. perhaps any reduction of screen resolution while in game should simply not be allowed?); I have been unable to controllably reproduce the problem. Restarting the game did not necessarily fix the issue, so it may be getting saved somewhere (probably the pilot file) or it may occur at random. Changing screen resolutions from the options menu while in game fixed the problem. This will be difficult to pin down.

Touching the lava only barely (if at all; I may have been delusional, because it's so natural to me that things would fade red on hitting lava) made the screen go red. It needs to become much more red to more accurately reflect the amount of damage done.

The fade to near-black on getting the cloak powerup in level 1 was not present.

Keyboard turning controls are INSANE.

Using the high performance timer exposed in the Win32 API for game timing would be a good idea, as its accuracy is immense and should be far more accurate than any millisecond timer. This would fix high FPS issues, or at least make the speed of everything consistent enough that scaling the speed would fix any issues, and eliminate the need for any hackish fixes.

D2X modified: May 25, 2004, 5:10:42 PM
SDL modified: May 23, 2004, 11:17:58 PM
OS: WinXP SP1a
Hardware: Barton 2600+, 512 RAM, GF4 MX440 64MB


I'd also like to request that the 1280x1024 screen resolution be changed to 1280x960 (1280x1024 is not 4:3, so if you take a screenshot and look at it using resolution with a 4:3 aspect ratio, as is the case with most screen selectable resolutions, everything in the screenie except for text (bitmapped) is vertically stretched), and the addition of 1600x1200 :)

Now fix the 8 bit sound, please, before I lose my sanity :P



[edit]
Oh, not cool, an update while I was busy testing and writing :P

Okay... new bugs! Found within the first 60 seconds!

On the PEST robot (those green guys on level 1), the black gun "holes" (whatever) on the end of his barrels are having Z issues (guess that's to be expected with the fixed Z testing); others very likely have that problem too.

One frame of animation of the fire from the PEST was a frame of some eye texture.

More later, I have school to get ready for.
[/edit]
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

I am pretty certain Z order evaluation is being done properly. It works well on two different setups of mine (Win2K/GF MX400, WinXP/Radeon 9800 pro).

If it doesn't work for you, turn it off as described in one of my former posts here.
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

Black Screen

Post by Tigeron »

I still get no video when entering the level. Sounds of laser are present when I press the fire button.

When I press Escape key to exit i get a larger than normal outline of a mouse arrow. When the menu should be displayed the same mouse arrow is there so I continue to exit with the up arrow and press Enter.
Back to the desk top with normal video.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Tigeron,

do you get a picture when turning the OpenGL Z buffer off?

patches,

from all I can see from the code, screen mode 1280x960 is available.

When going to the setup and returning to the game, you sometimes get "landscape" video format. Don't ask me why. Changing the screen res usually helps.

I will and cannot do anything about sound issues in D2X.

From all you are telling me it looks like the OpenGL depth buffer is not properly enabled on your machine. Make sure you have the most recent display drivers installed (uninstall the old ones and reboot before installing new ones).

I have just fixed problems with the automap (all segments visible, hostages, keys etc. not being displayed). It works now as it should.
pATCheS
DBB Ace
DBB Ace
Posts: 187
Joined: Sat Apr 03, 2004 9:12 pm
Contact:

Post by pATCheS »

Ah, I did neglect to mention that the Z problems in the update I had downloaded yesterday were fixed. But there are some things that depended on Z testing *not* being there to draw properly:

Image

The arrows point out the Z artifacts I mentioned in the edit of my last post. Unfortunately, it would be very difficult to fix; it'd be easier to just live without Z buffering.

The laser bolts (circled) are lacking their inner blobs (this will occur for all polygonal weapons that use inner blobs, like Fusion and all the other laser levels). And, VERY curiously, the bolts are getting lit (this is not visible in the screenshot I put up, I noticed it in the hostage area). The inner blob thing makes sense, but the polymodels of the laser bolts themselves should always be full bright. I have no idea how they would get any lighting at all o.0

Explosions (like on lava, robot pieces, monitors, etc) are also rather inappropriately clipped by cube faces. Yada yada yada, more pain-in-the-ass stuff. I think simply disabling Z testing for them (and maybe also laser bolts) would work fine, but I'm not sure how the sorting works for them.

The fading for the cloak powerup still doesn't work.

Is there any particular procedure for changing the screen resolution to something not in the menu? The D1X style command line options didn't work (I tried -1280x960 and -1600x1200, I dunno if any others might work), and I whimsically tried specifying "-width 1280" and "-height 960", all to no avail.

D2X modified: May 27, 2004, 6:40:44 PM
SDL modified: May 25, 2004, 1:33:18 PM


Sound, why not? Is the code really THAT bad? I wouldn't know...

Figuring out a way to get translucency into explosion textures (basing it on pixel intensity works fine) would be very cool, I did something very hackish in D1X to accomplish this (various size-related checks that couldn't tell the small robot debris explosion from a letter of text--rather odd results), and it looked pretty nice. Just something to toy around with should you ever find the need. End of wishlist.


Very good work otherwise, the game is stable, the map is working correctly now, and it looks about as pretty as it can get without revamping the game. :)
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 on my machines this problem (Z artifacts) simply doesn't exist. I will however check the sequence in which stuff is drawn, esp. for explosions. You say the "inner" texture of laser and fusion bolts is missing? I could not see any such texture even when turning off all my Z buffering and rendering modifications.

Maybe your problems have something to do with the color depth you're using. Are you running D2X in 16bpp? Depth buffer range is at a pretty insane value currently. I will change that for 16 bit color depth - maybe that helps.

I could also not observe the cloak fade effect missing. It is there, though rather weak. Maybe you need to tweak your brightness settings.

The sound stuff is buried deep in SDL. Btw, I don't know what's wrong with it. I never had the impression there was a problem with it.

Are your video and sound drivers up-to-date?
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: the laser bolt is constructed with a polygonal shape insaide another polygonal shape. the inside one is colored white, and the other is colored to the corresponding laser power level.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

As I said: I don't even see two colored lasers when turning all my modifications off. I will check this with D2 Win95, but this bug might eventually not be on my behalf.

edit: I was wrong. If I turn my stuff off, the lasers are bi-colored.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Worse come to worst, open up the model in MODELVIEW32 or something. You'll see the inner and outer polys.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

I have looked into this. Obviously the inner laser polygon is somewhat further away than the outer one. This leads to normal Z testing always causing the inner polygon to be overwritten with the outer one - regardless in which sequence they're rendered (inner or outer first), and which depth function I select (GL_LESS, GL_LEQUAL). Nothing that could be easily fixed, I'm afraid.
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

Windows 98 SE, XP & 2000

Post by Tigeron »

I have just installed Windows XP for some testing.
I tried your download offer from 5/27/04 and when I entered the level it was normal. The frame rate is down but then again only the default monitor is installed and only a VGA driver. Can't seem to get the property button highlighted to change the monitor. Anyway, there is normal video when the game starts.

You have been using Windows XP and 2000 to do your testing with. I am using Windows 98 SE as my operating system and I have loads of software and hardware that I use for it. So I prefer not to go to XP.

There must be something that is not compatible with Win 98 when you make modifications to regarding Zbuffering. Even disabeling your changes there seems to still be an artifact in place that gives problems to Win 98. I even had see through wall problems when you first made changes in this area when you detected no problems using XP or 2000. Turning of your Zbeffer mods did not help.

Do you think that this can be rsolved so the code is compatible with all three operating systems?

Ron
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

I don't think so, because I don't have access to a Win98 machine to debug on.

Do you have the most recent video drivers for your gfx card installed?

I just noticed that you have only the standard VGA driver installed. Please install the most recent video drivers for your gfx card to have proper OpenGL support!

If you specify "-blegacyzbuf" and "-blegacyrender" in d2x.ini (must reside in the Descent 2 folder), all my OpenGL extensions are disabled. Make sure to have a newline after the last parameter in d2x.ini (a blank line at the file end).

You will only need OpenGL depth buffering for very complex levels showing a lot of see-through walls with standard D2 rendering.

That's all I can do for you.
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

Post by Tigeron »

I only loaded in XP test the D2x because of the black screen I was getting in game with your last three download offers. The system will not let me install new drivers with the default monitor selected. And I cannot get the property button to highlight in order to change the monitor.

On the win 98 I am using Nvidia 45.23 drivers which are the latest that offer a matching 3d video stereo dirver. They are fine and work great. so I guess this is going to be a dead end for win 98. Well keep up the good work anyway, your still doing a great job.

Ron
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Ok, I see. And you couldn't install another driver because of the monitor in XP? That's pretty strange.

Your Win98 NVidia drivers should do the job.

Sorry I couldn't help you.

Ironically enough, the recent versions of my d2x were based on more up-to-date source code I had received from Bryan Bell (who maintains the d2x project), and had fixed a few issues my older versions had.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

I always thought the outer poly model was translucent.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

afaik not, but i could try that in the ogl version, good idea!
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

Post by Tigeron »

Deidel:

I had a little tunnel vision when trying to change the monitor type on this new XP installation. I was afraid of not being able to change the refresh rate for my 3D video stereo. When I tried installing the Nvidia drivers, I had forgotten that the base driver was only for 95, 98 and ME and that the stereo driver was also for XP. I downlaod the base driver for XP and the new matching stereo driver. The base driver installed completely.

I tried D2x again and got right in to the game. Frame rate is again a flat 60 fps. Joystick movement runs like silk in both panning directions. Did not do a full check as I wanted to get my computers networked together and try the multiplayer functionality.

They were networked just fine with Win 98 but seems to have a little problem with XP. I can see each computer but can't access the files on each yet. And yes I do have file sharing enabeled. I did not want to put this partition with XP on the Internet yet as I wanted to keep as much garbage off until D2X with 3D stereo was completely working. But going through a hub seems to be a problem without an internet connection. So will install Internet on the XP partition and see what happens.

I had almost given up, with not being able to use D2x on 98. I still am not sure if my Game voice will run under XP but will find out before long. I am happy to be back in the playing field with you.

I was wondering if it would be to much trouble to have the sensitivity slider for the joystick to function for the Mouse, Joystick and the Arrow keys individually. This way each could be set up for speed without effecting the other. The user could custimize his own preferances for ship handling.

Again, Keep up the good work

Ron
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

You know what is weird? I also have 60 fps when entering the game, although the default cap value is 80. If I go to the D2X menu and explicitly enter "80" (although it's already standing there), I suddenly get 80 fps. Miracles of technology. Lol.

I might add more sensitivity sliders, but I don't promise anything. ;)

Btw, adding transparency to the lasers and fusion bolts with OpenGL Z buffer turned on helps somewhat, but it looks like somehow the renderer uses the same color for the inner and outer part of laser bolts with Z buffer enabled. I absolutely cannot tell why this is so: When debugging that part of the render, different color values got specified. Another technological wonder (you wonder all the time what the heck is going on ... ;)).
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

another thing you should consider is having the inner bolt give off light.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

The lasers are giving off light; I've just checked it. Currently the inner and outer bolts have different colors depending on the laser's level.

Here's what a Laser level 1 looks like when Z buffering is enabled and the bolts are rendered slightly transparent:

Image
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

And when transparency is disabled, the inner bolts are hidden? Wouldn't that be indicative of properly-functioning Z-buffering?

And IIRC the inner bolt of Laser level one is yellow(er).
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Sure is Z buffering working. And the inner is not yellow because the transparency of the two polygons adds up. I don't know whether that can be changed in OpenGL.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

i can't see the light that's being given off from the inner bolt in a dark room. it could be inheriting the light from ambient sources.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

To check this, I have completely darkened a level of mine and fired some laser bolts in it (needs to be close enough to some wall). The wall got lit along the path the laser bolt travelled.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

yup. that's usually what happens. but the bolt itself is dark, right?
Tigeron
DBB Ace
DBB Ace
Posts: 60
Joined: Wed May 12, 2004 7:11 pm
Location: Las Vegas, Nevada

Post by Tigeron »

Diedel:

I tried retyping the 80 fps in the window but it still only got me a flat 60 fps. this was on the XP partition. It has taken me 3 full days to get this sucker networked with my other Win 98 machine but they are talking. Boy oh boy, I hate XP...win 98 is so much easier to work with.

I started the retail version of D2 to check things out for IPX. I was able to get into the game with no problem. I started D2x-gl on the XP but could not see the game on the socket on the Win 98 machine. I also started a game (Retail version of D2) on the Win 98 machine but could not see it on the XP machine either.

It seems a bit strange that if you saw it between your XP and Win 2000 machines that it does not show up between my Xp and Win 98. I don't see what the diference would really be. Unless D2x can only see another D2x game!

Of course i also tried D2x through kali over the Internet and of course I did not see the game. Had to give it a try anyway.

ron
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

I was trying to connect D2X on a Win2K pro and NT4 machine on our company LAN, and I could run a multiplayer game.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

Ferno wrote:yup. that's usually what happens. but the bolt itself is dark, right?
No, it's colored and visible. "Bright" is pretty relative. Making a color transparent darkens it a little.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

Tigeron wrote:Boy oh boy, I hate XP...win 98 is so much easier to work with.
And hence much more vulnerable and fragile. XP forces you to do networking right. But off-topic...

There's no IPX on XP by default. You have to install it.

Click Start : Control Panel. If you've got Category View on, click Network and Internet Connections, then click Network Connections. If you don't have Category View on, just double click on the Network Connections icon. Right-click on Local Area Connection (or whatever your network connection is named), then click Properties. Click on Install..., then click on Protocol, then click Add, then double-click NWLink IPX/SPX/NetBIOS Compatible Transport Protocol, then click OK.
User avatar
Tricord
DBB Alumni
DBB Alumni
Posts: 3394
Joined: Thu Nov 05, 1998 12:01 pm

Post by Tricord »

Sorry if this is somewhat of a hijack, but I was wondering...

D1/D2 currently uses a P2P system with broadcast (every player broadcasts his stuff so everyone receives stuff from everyone). While this works fine on LAN under IPX (as it was originally done), this is not the best way to run multiplayer games over the internet (despite the best efforts of Kali and the like).
When D1x/D2x came out, the IPX carrier was replaced by an IP carrier using UDP segments and broadcast addresses, which basically left the netcode untouched and just changed the transport protocol.

This means that TCP/UDP support can only be used by clients on the same subnet, because all network traffic is unroutable. Wouldn't it be possible to design a server software (which doesn't even need to run the game itself, just an UDP pass-through. Instead of using a broadcast address on the local subnet, the packets are sent to the server address, which is routable over the internet. Other clients connect to this server in the same fashion, and the server sends any incoming segment to all registered clients.

This would mean however, that automatic game detection is no longer possible, and would require a tracker system. It would however become a true client/server architecture without any optimisations (the server sends all packets, even those you don't need, e.g. from players who are not visible because they are someplace else in the level). Plus it can be played over the internet, without the need of Kali or anything else. It would be even nicer if the UDP-passthrough was implemented in the executable itself, that way nothing else but D1x/D2x itself is required to play internet games...

Maybe I'll look into this myself, but not right now.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

well, see what you can do to make the inner bolt bright to the point where it looks like it's giving off light.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

It's not possible because the inner bolt is overlaid by the outer bolt, such getting darkened due to the additive transparent color effect.
User avatar
Ferno
DBB Commie Anarchist Thug
DBB Commie Anarchist Thug
Posts: 15012
Joined: Fri Nov 20, 1998 3:01 am

Post by Ferno »

so I'm going to have to deal with dark bolts in dark room?
Post Reply