elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.16k stars 83 forks source link

Near perfect Creatures 2 performance, except for the Eye window #106

Closed MoogieOuttaMyDepth closed 9 months ago

MoogieOuttaMyDepth commented 3 years ago

Firstly, I wanted to congratulate and thank you for providing a fix for Creatures 2! At long last, the prophecy has been fulfilled. Seriously, major kudos. It has been a long struggle getting this game to play nicely on modern Windows.

It runs so well with the fixes you posted, but there is one remaining issue, which is best described with a screenshot:

image

When not on top of the game window, it doesn't render at all:

image

It almost seems too much to hope for, but maybe there is just one more small tweak needed to get it redrawing correctly? Then this game could almost be considered 100% compatible!

elishacloud commented 3 years ago

The trouble here is that I am rendering everything to the main window. So when another render window appears on top the contents of that window is also displayed to the main window. Then when you move it outside the main window it can no longer render it.

The proper fix would be to render to the correct window. That may take a bit of time because I am not completely sure how to tell what window it is rendering to. However, let me look into a different way of fixing this.

BTW: I found the core issue with Creatures 2 and added the fix here and here. Creatures 2 would use a rect for Blt that is 1 pixel too large and Windows would fail the Blt. Then Creature 2 would see the error message and exit the game. I just added code to detect this case and retry the Blt using a slightly smaller rect.

MoogieOuttaMyDepth commented 3 years ago

If you could read through the game's original rendersystem.cpp, display.cpp and ddraw.cpp, would that be helpful at all?

If so, is there any way to contact you privately?

elishacloud commented 10 months ago

This update should fix this issue. It is now using Direct3D9 rather than GDI: dxwrapper.zip

elishacloud commented 9 months ago

This issue should be fixed in the latest release: https://github.com/elishacloud/dxwrapper/wiki/Creatures-2:-The-Albian-Years