narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
941 stars 70 forks source link

Nascar Road Racing #171

Closed ghotik closed 10 months ago

ghotik commented 1 year ago

This old game shows a very peculiar effect that appears both using DxWnd or using DDrawCompact. When the 3D part of the race starts, the camera seems to be positioned below the road level with crazy effects of transparencies and invisible scenery. That could easily accounted by a game bug, but the fact is that dropping the dgVoodoo2 dlls on the game folder everything works perfectly! Have a look: nrr1 nrr2

narzoul commented 1 year ago

I get the same results with dgVoodoo2.

How did you get past the initial crash? The game creates a second primary surface while the first one is still alive, and that causes a crash for me. Multiple simultaneous primary surfaces were never supported by DDrawCompat. I worked around it by suppressing the creation of the second primary, which gets me to the race.

After that, I just see the same issue as with dgVoodoo2: game looks fine at first, until the camera goes under the map and then it looks like on your screenshot. Did you use some special dgVoodoo settings to get it working?

ghotik commented 1 year ago

All my tests were done with DxWnd control (I didn't want to use compatibility modes to run the game on a 32bit desktop) so probably it was DxWnd taking care of the multiple primary open, since in emulation mode it opens a single real primary surface and returns to the application a virtual primary surface mapped on a offscreen memory surface. I now notice that the game also tries to use overlays, so I'll make more tests because I'm adding to DxWnd a sort of overlay emulation (as you already read in my Godfather posts). The game also seems to use multiple windows or something like that, because when the race starts I see only a black frame, but minimizing and restoring the window resumes the 3D scene. But, finally, this was another oddity: the 3D scene starts with a "below-ground-level point of view" both with and without DDC, but curiously this doesn't happen when dropping in the game folder the ddraw.dll file from dgVoodoo2. To answer your question, I used just the ddraw.dll file from dgVoodoo2.63.1, no configuration added. Since the minimize-restore action is necessary also with DgVoodoo2, I couldn't tell if dgVoodoo2 fixes the initial "below-ground-level" phase by fixing some fow parameter or if it simply quickly skips all bogus frames, anyway I thought it may interest you. I'll do more accurate tests.

BEENNath58 commented 1 year ago

The camera issue looked like the physics issue found in modern day games due to excessive FPS. IIRC, the game has a frame rate setting inside the settings, which probably maxes out at 30. I fixed the "camera going under the map" issue by limiting the FPS to 30 externally since DirectDraw frame limiter is broken for many interfaces.