NVIDIA / Q2RTX

NVIDIA’s implementation of RTX ray-tracing in Quake II
Other
1.22k stars 181 forks source link

Dawn of Darkness mod is not compatible #209

Open ruthan opened 2 years ago

ruthan commented 2 years ago

Hello, i just want to test one of best Quake 2 mods Dawn of Darkness: https://www.moddb.com/mods/dawn-of-darkness1 with RTX but its not working right.

There i can select difficulty with New game, i can load some maps through console, but there is problem that weapons are change to mod ones: map concept1 // its working map DoD1_1 is working but unless i shoot its dark map 1 // crash With vanilla Quake 2 its running fine.

Paril commented 2 years ago

Mods must be 64-bit if you want to run them natively in Q2RTX.

For 32-bit mods, you have to use a 32-bit engine to run the server (preferably with a dedicated server), then connect to it with Q2RTX as a client.

If the mod is single-player only this won't work, obviously, so you're out of luck unless the source was released and you can recompile it as 64-bit.

Maps that crash might be because they lack vis data or are doing something non-standard, or possibly just a result of the mod DLL not loading because of the above.

ruthan commented 2 years ago

Its not great that source is required.. vanilla Quake 2 is not requiring source code. It has some multiplayer, but single player campaign its most interesting. If im not wrong compiled code is within gamex86.dll

res2k commented 2 years ago

Vanilla Quake 2 is a 32-bit program. Q2RTX is a 64-bit program. The Quake 2 engine requires the game DLL to have the same "bitness" as the (server) executable - hence Vanilla works but Q2RTX not.

(I may have something laying around for this matter, but it would require you to be comfortable with/competent in compiling code.)

ruthan commented 2 years ago

You only out of curiosity how exactly these piece of code (game + mod) are connected within Quake 2 logic ? I never moded Quake 2 only Quake 1 and mainly Hexen 2. I my past compiled lots of things.. but i always just specified target architecture, use multiple target etc, but never tried some mixin. I know that 64bit executable should be a bit faster, consume a bit more memory for addressing and enable to allocate more memory more than 4 GB or what is 32 bit app limit, if im not wrong 32 bit Windows has limit 2 GB per process, but its not our case.

So question is if Quake RTX is really need more than 4GB or not.. If not 32 bit executable could be build (if we have source for all needed libraries) and problem could be in pure theory solved, its really only about architecture.. What i doubt, my guess is just new code is not fully compatible with old vanilla Q2 from interface API point of view (but i dont have any proofs for it), but its quite often that when you fork and enhance some code that compatibility with original (addons, plugins ) is broken in the process.

I always though that 64bit apps are superior than 32bit, but still could use some 32 bit inferior code or dlls libraries, same as some inline ASM and its possible to mix it, but i never tried. I found this but dunno if could be applicable to our case: https://blog.mattmags.com/2007/06/30/accessing-32-bit-dlls-from-64-bit-code/

BTW is somewhere some Quake 2 TRX mod compatibility info, list etc? To proof that other mods, at least some 64bit mods are running line?

apanteleev commented 2 years ago

The reason why Q2RTX is built as a 64-bit application is that ray tracing is not supported on 32-bit targets. The Vulkan extensions are just not available.

The solution that you mention, @ruthan, with a surrogate process - that could work.

res2k commented 2 years ago

This branch: https://github.com/res2k/Q2RTX/tree/singleplayer-x86 provides a (somewhat) seamless support for "old" x86 game DLLs (implemented through a dedicated server binary with various enhancements). Feel free to try it - you need to build Q2RTX from source, though, hence the requirement "to be comfortable with/competent in compiling code".

ruthan commented 2 years ago

Thanks, it would be better if this x86 work would be merged into this project :)

Meanwhile @Paril invented frankenstein process how to make it working with vanilla Quake 2 dedicated server and Quake 2 RTX as client, i only make it happen. But so far its only nice technical showcase, because you need to play with OpenGL mode and switch to RTX when you are outdoors, some basic light cheat is needed until someone if even will make some *.mat files for Dawn of Darkness.. but still make Quake II RTX fully capable engine to play any mod no just showcase of fancy graphics of original Quake 2 is still great and valid goal, even this basic lowres (i tested it on G1070, i have RTX only in my laptop..), low RTX details picture looks very nice.

image

image image

If someone is interested in details i described it here: https://www.moddb.com/mods/dawn-of-darkness1 in comments