Just before logging off of the Gutsy, I tried running the 0.0.5 beta version of Doofus 3D via Wine and “Voilà”, it actually ran! On Linux, with no tweaks of any kind, no nothing! Obviously only with the OpenGL driver, Wine has near absent DirectX support so it was only OpenGL, but still I was like blown away. I didn’t even expect it to work and I must say I could see no performance issues. Almost the same speed as Windows. I ran most of the unit tests and managed to finish the first 7 levels without any problems (, didn’t try any more but I am sure they will work just as well). To be frank I didn’t expect the game to run, and I mean run at all, let alone with the same speed as Windows.
I had no idea Wine had no DirectX support. I guess it must be very difficult to port the DirectX APIs (, but who’s complaining when the engine can run on OpenGL just as well) . The engine logs show Wine hooks in the native OpenGL driver on Linux, so I guess there is no visible performance loss while running the game using OpenGL renderer via Wine.
Update (Dec 17th, 2007): After reading Dan’s comments and some experimentation I could in fact run Doofus 3D via the DirectX renderer. However, the DirectX renderer will not run out of the box and there might be other legal issues associated with it, which are as yet unclear. You can read the entire comments here. I like to thank Dan for pointing out the error in the above post, Wine does have DirectX 9 support.
Glad to hear it!
But Wine *does* have DirectX9 support; we’ve been working pretty hard on it. (See our to-do list at http://wiki.winehq.org/DirectX-ToDo ). Does your DirectX version not run on Wine? We’d be happy to work with developers to find and fix problems in Wine, so send bug reports our way any time.
No it doesn’t run via the DirectX renderer out of the box.
OK I found the problem.
--------------++ O2 Engine log ++--------------
Error logger started -- Sun Dec 16 12:32:45 am.
Error log:(1140): Failed to load d3dx9_xx.dll.
Error logger stopped -- Sun Dec 16 12:32:47 am.
I dropped the d3dx9_32.dll into the game folder and the game ran with DirectX 9 as well.
Why is this DLL (d3dx9_xx.dll) missing? For those who don’t know…
Now, the problem is, this DLL is a DirectX system DLL and Microsoft forbids you to directly bundle this DLL in your game/application installer. If you do so you are in violation of their EULA. As per their EULA you need to run the DirectX installer via your installer so that the Microsoft DirectX installation will copy this DLL into the system32 directory (system32 under WINDOWS). Microsoft will change the name of this DLL for pretty much every release of their DirectX SDK. So a game linking to say April release of the SDK will need say d3dx9_28.dll, another game linking to July release will need d3dx9_31.dll, and other one linking to Dec release will need d3dx9_32.dll and so on. If the d3dx9_xx DLL is absent on your system, the game/program will not work. Now, this applies verbatim to any game running on Windows, however under windows I have the game installer run the DirectX update installer which automatically updates the system with the correct d3dx9_xx.dll required for my game. No such luck via Wine.
I am new to Wine, but this is how I see it; since the MS EULA prevents me from bundling the d3dx9_xx.dll with the application, the only thing left to do is for the Wine end user to physically copy this DLL from a registered copy of windows or from the web (, don’t even ask me if it is allowed or legal, ) to the game directory.
Also when I ran the game with DirectX I noticed swimming artifacts and no trilinear filtering.
Comparison of the same scene:
OpenGL
DirectX9
But it ran. I guess I was wrong. Wine can run DirectX apps too.
Thanks Dan.