Delta Force 2

General information and assistance with dgVoodoo.

Delta Force 2

Postby Dege » 2017-1-24 @ 20:13

I'm posting about it before I forget to (last week I had a look at it):

ed_barber wrote:Your wrapper is probably the best thing I've come across for retro gaming on Windows 10 as I've gotten every game I tested on it to work! I have one game called Delta Force 2 and it has support for both software rendering and semi-hardware rendering. The thing is that in hardware mode the objects being rendered using Direct3D (I believe uses DirectX 6) get shown through the terrain (rendered in software mode even if the renderer is set to full-screen hardware) even when they are behind it. If I use dgVoodoo 2 to try and fix it it will actually make everything that's rendering in Direct3D disappear so only the terrain is in the scene with the fonts on the characters that represent their friendly tag. It would be cool if you could look into this. I would love to see the day I can finally play this lost treasure while making use of its 3d acceleration on modern hardware.

I even heard that the chipsets listed such as the nVidia TNT 2 had issues with the game too. I even got a GeForce 7600 GS using drivers from around June 2008 to render everything correctly in hardware mode but at a lower than anticipated framerate. Your work is very great and you should consider contacting game companies with your fixes. Many people would love to see certain retro games able to play once again!

PS. It would be nice if there was an option to use either hard or soft shadows in when the game is using shadow buffer mode such as in Splinter Cell :)


Well, briefly: I cannot beleive that this game ever worked on any hw with its d3d (hw) renderer. :)
I patched the game to 1.06.15.

This game has a voxel based software terrain renderer. The main problem for most hw I guess is that this game write the rendered terrain and its depth values to the back- and Z-buffer by the CPU, prior to rendering objects by D3D.
Accessing the z-buffer through CPU was a problem for even old GPU's, as far as I remember (it still causes glitches natively with my videocard).

Two main problems:
1) 3D rendered object gets shown through the terrain
Terrain depth values are 24 bit (the game always assumes z-buffer with 24 bits).
The main engine seems to feed the renderer dll's with 20-bit depth values for the non-terrain objects, but the hw renderer dll interprets them as 28 bit.
Integer depth values are shifted down by 4 bits on the exe side, but the scaling factor for normalizing the values are shifted up by 4 bits in the renderer dll. This ends up in too small z's for the objects, that's why they are always visible.
The normalizing coefficient seems to be constant, it already has it's value when the renderer dll is loaded.
I experimentally changed it to the (presumably) correct value and this problem is gone, but unfortunately there still are glitches.

Image

Some region of the terrain z-values is corrupt.

2) No fog for 3D objects
The game utilizes precalulcated vertex fog for 3D objects, but fog blending is never enabled for rendering, and the main engine always feed the renderer with fog values of zero. :confused: :blah: :dead:

Image

Neither the coefficient factor nor the calculation of the fog values seem to be dependent on the underlying hw, not even on D3D. They are just hardcoded constants.
The renderer queries the caps of the D3DDevice but checks for nothing special, only max texture size, vertex fog, alphablending and such.
So, I don't know what to say about this. Seems to be a semi finished renderer dll for me.

BTW, I attach the modified one, if someone want to try it. It should work with dgVoodoo 2.53.
http://dege.fw.hu/temp/DF2Hw_d3d.zip
Dege
Oldbie
 
Posts: 1300
Joined: 2003-9-04 @ 11:06

Re: Delta Force 2

Postby ed_barber » 2017-2-07 @ 00:14

Dege wrote:I'm posting about it before I forget to (last week I had a look at it):

ed_barber wrote:Your wrapper is probably the best thing I've come across for retro gaming on Windows 10 as I've gotten every game I tested on it to work! I have one game called Delta Force 2 and it has support for both software rendering and semi-hardware rendering. The thing is that in hardware mode the objects being rendered using Direct3D (I believe uses DirectX 6) get shown through the terrain (rendered in software mode even if the renderer is set to full-screen hardware) even when they are behind it. If I use dgVoodoo 2 to try and fix it it will actually make everything that's rendering in Direct3D disappear so only the terrain is in the scene with the fonts on the characters that represent their friendly tag. It would be cool if you could look into this. I would love to see the day I can finally play this lost treasure while making use of its 3d acceleration on modern hardware.

I even heard that the chipsets listed such as the nVidia TNT 2 had issues with the game too. I even got a GeForce 7600 GS using drivers from around June 2008 to render everything correctly in hardware mode but at a lower than anticipated framerate. Your work is very great and you should consider contacting game companies with your fixes. Many people would love to see certain retro games able to play once again!

PS. It would be nice if there was an option to use either hard or soft shadows in when the game is using shadow buffer mode such as in Splinter Cell :)


Well, briefly: I cannot beleive that this game ever worked on any hw with its d3d (hw) renderer. :)
I patched the game to 1.06.15.

This game has a voxel based software terrain renderer. The main problem for most hw I guess is that this game write the rendered terrain and its depth values to the back- and Z-buffer by the CPU, prior to rendering objects by D3D.
Accessing the z-buffer through CPU was a problem for even old GPU's, as far as I remember (it still causes glitches natively with my videocard).

Two main problems:
1) 3D rendered object gets shown through the terrain
Terrain depth values are 24 bit (the game always assumes z-buffer with 24 bits).
The main engine seems to feed the renderer dll's with 20-bit depth values for the non-terrain objects, but the hw renderer dll interprets them as 28 bit.
Integer depth values are shifted down by 4 bits on the exe side, but the scaling factor for normalizing the values are shifted up by 4 bits in the renderer dll. This ends up in too small z's for the objects, that's why they are always visible.
The normalizing coefficient seems to be constant, it already has it's value when the renderer dll is loaded.
I experimentally changed it to the (presumably) correct value and this problem is gone, but unfortunately there still are glitches.

Image

Some region of the terrain z-values is corrupt.

2) No fog for 3D objects
The game utilizes precalulcated vertex fog for 3D objects, but fog blending is never enabled for rendering, and the main engine always feed the renderer with fog values of zero. :confused: :blah: :dead:

Image

Neither the coefficient factor nor the calculation of the fog values seem to be dependent on the underlying hw, not even on D3D. They are just hardcoded constants.
The renderer queries the caps of the D3DDevice but checks for nothing special, only max texture size, vertex fog, alphablending and such.
So, I don't know what to say about this. Seems to be a semi finished renderer dll for me.

BTW, I attach the modified one, if someone want to try it. It should work with dgVoodoo 2.53.
http://dege.fw.hu/temp/DF2Hw_d3d.zip

Wow, very amazing! Tested it with dgVoodoo 2.53 and it works well! It's a shame that Novalogic didn't patch Delta Force 2 when they recently patched their other game from around the same time. The game is finally looking a lot better on modern GPUs cause that old software renderer looks terrible.

I knew in the past that this game worked on older GPUs because I had one that worked with this game but never tested it with fog :(

Just goes to show you that Novalogic had bad quality assurance.

PS. In the mission where you have to parachute down, the buildings will not appear until you are closer.
ed_barber
Newbie
 
Posts: 13
Joined: 2016-9-26 @ 17:02

Re: Delta Force 2

Postby Dege » 2017-2-07 @ 20:10

ed_barber wrote:PS. In the mission where you have to parachute down, the buildings will not appear until you are closer.


Well, yes.
I too experienced such glitches in some missions. :(
My judge was that this renderer dll is (almost) unusable for playing.
Dege
Oldbie
 
Posts: 1300
Joined: 2003-9-04 @ 11:06

Re: Delta Force 2

Postby ed_barber » 2018-10-17 @ 15:49

Do you plan on revisiting the issue? I think with certain chipsets and drivers this game worked to an extent as I remember. I know the ATI Rage Fury chipsets, and Nvidia TNT/TNT2 chipsets were known to work with this game in Direct3D 6 using 32-bit color rendering exclusively. However, I don't remember the fog working or not. Even people were saying back in the day that the Geforce256 chipset worked with this game.
ed_barber
Newbie
 
Posts: 13
Joined: 2016-9-26 @ 17:02


Return to dgVoodoo General

Who is online

Users browsing this forum: No registered users and 1 guest