Dege wrote:Thanks for the extra level to try!
I've just tested it through developer mode with bump mapping/trilinear filtering/lens flare etc. enabled but I didn't get FPS dropdowns.
Aside from some temporal and minor fallback I got constant 60 fps in 4K without MSAA enabled, didn't matter if I breathed fire or saw the lens flares.
That's strange. Is there something radically different about our systems that you don't experience it? My GeForce GTX 750 Ti is indeed from 2014, so not exactly bleeding edge. I did update drivers recently to something newer (391.35 on the main Windows 8.1 installation, though I do have 397.64 on my the test Windows 10 installation), which doesn't help. Another guy on Arokh's Lair forum mentioned the same problem and he has Radeon R7 260x. The other card I have is Radeon R2 in a laptop (part of AMD E1-6010 APU). If I get a chance, I might be able to test it on another laptop with Intel HD 4000 to see if it's any different there.
I do have all eye candy in-game enabled, plus 16x anisotropic filtering and 8x MSAA forced through dgVoodoo. I did test both with default settings in dgVoodoo and with the old binaries from 2000 as well as patched ones from my patch, which you may want to download, it's got a bunch of quality of life improvements over the original.
The results didn't differ between game versions, though they are better if you use low resolution in-game and let dgVoodoo force a higher one. It's still laggy though, just that FPS doesn't drop to 10-15, but rather 35-40. Small UI doesn't bother me, so I just go with 1920x1080 resolution in-game with Unforced setting in dgVoodoo, VSync left enabled in-game and FPS capped to 59 for better mouse response with VSync.
This issue is separate from the one that results in low-frame if you enable debug messages in developer tab and which can be sped up with fast video memory access option, which doesn't help in this case. Drakan does have console/text chat prompt, but it isn't problematic, just the debug messages are.
Either way, I'm stumped...
Dege wrote:Best would be to patch Drakan to be compatible with fast vidmem access.
Agreed.
Dege wrote:Once I debugged out that Drakan reads cursor bitmap through ReadFile directly to the mapped area of its texture.
Since you mention ReadFile, it uses that call regularly during gameplay. Was that how you saved memory in the nineties, by constantly reading certain data from disk instead of loading it into RAM? Drakan works on systems with 16 MB of RAM. And the worst graphics card it can run on is S3 Virge from 1995! It's anything but smooth with such configuration, even with Voodoo 1, it fares poorly according to this.
There are also 2 versions of one function in the engine, the regular one that does the math with FPU and the other that uses AMD 3DNow!. No performance difference on my older CPU, which still has support for that instruction set. I haven't found any documentation whether there was any difference on the CPUs of the time.
It also uses GlobalLock/GlobalUnlock/GlobalAlloc/GlobalFree for memory management, a relic from 16-bit Windows. Another optimization attempt? It's strange since the engine was new, written from scratch, designed to utilize bleeding edge tech of the time.
Dege wrote:I think it's matter of the code rewritten by inserting a temporary area with a memory copy. I'll try to dig out that code snippet.
Cool! 😎
BTW, I noticed dgVoodoo now works with Drakan's Level Editor application without crashing, though it's about as glitchy as it is on Linux with WINE (if I remember correctly, it's better if you set DirectDrawRenderer to gdi in registry). I'm guessing that mix of GDI and DirectDraw is pure mess. It also causes composition to go off on Windows 7/Vista (at least natively).