FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows ME, 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.32k stars 148 forks source link

Hard Truck: Road to Victory #95

Closed IceLoveTizeR closed 2 years ago

IceLoveTizeR commented 3 years ago

The game is very fussy and practically doesn't work for modern operating systems (including Windows XP SP2~SP3), constantly pop-up window errors related vehicle physics, render, events and legacy extension Windows 9x. For a long time there were no any solutions. Even "dgVoodoo2" and early "cnc-ddraw".

Recent update "cnc-ddraw" started working pretty well without any crash, only "Screen" mode and "Large" (800x600) & "Medium" (640x480) resolution. No "Window" mode and "Small" (320x200).

Here are the settings created for ".ini":

; Hard Truck: Road to Victory [htruck] maxgameticks=25 renderer=opengl noactivateapp=true

Vehicle physics is strongly tied to 25 FPS, like "Interstate '76". Beyond the limit ~50 FPS starts to break falling trajectory of raindrops for windshield only horizontally - left and right, should be fall 5~45 degrees to below hood.

renderer=direct3d9 - launches without application to taskbar, first encounter such executable file. noactivateapp=false - the application may be lost, if you press alt+tab, alt-win, shift+esc.

The later version of the game added support for 3D accelerators - "Accelerator" mode. Before running only software mode. It cannot start as "cnc-ddraw" it requires 16mb vram, although it can work with 12mb vram in real hardware. Could there be any way out?

FunkyFr3sh commented 3 years ago

I just added the preset, thanks for sharing! Will have a look into the game soon, maybe I can do a few more improvements.

About the 3D accelerators: cnc-ddraw doesn't support these at all, it only has a few dummy interfaces for logging but there's actually no code behind it to handle anything. It only works for DirectDraw games right now, not sure if that will change in the future

IceLoveTizeR commented 3 years ago

I just added the preset, thanks for sharing! Will have a look into the game soon, maybe I can do a few more improvements.

About the 3D accelerators: cnc-ddraw doesn't support these at all, it only has a few dummy interfaces for logging but there's actually no code behind it to handle anything. It only works for DirectDraw games right now, not sure if that will change in the future

Thanks for response. I understand that "cnc-draw" can't fully display Direct3D. Perhaps, this situation to beginning research the issue, because this engine created quite strange, old DDraw wrappers (without D3D) managed to launch the game with obvious graphical artifacts - some textures blank, no bilinear textures, problem transparent textures. Main difference is 3D cabin interior, geometry rendering (vertex lighting) and bilinear texture.

Shows this error when running "cnc-draw":

warning : Internal error, please contact htruck@softlab-nsk.com (can not find device One or more of the parameters passed to the method are incorrect. ) 0

The engine itself has some kind counter performance of your hardware in first start, check out in file "TRUCK.INI".

vpss=0 pf=2 vpsm=0 vpsl=0 vpas=0 vpam=0 vpal=0 video=65842

This setting is at the end of ini file "TRUCK.INI", enable support for all render modes, included "Accelerator" mode.