Click here to Skip to main content
15,888,330 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
The game itself is Dawn of War: Soulstorm. Vanilla runs alright, but when running mods (which make a significant difference) framerates of even below 10 aren't unheard of. That's due in great part to the old game engine (dated 2004, which itself is a modified version of a 2001 game engine) and how it handles fx and poly rendering. Logically, it isn't multithreaded, yet puts a 100% load on the first core on even the newest high end cpu's (while delivering a very choppy framerate).

With that "intro" out of the way, my idea is to put together a .dll that enables multithreading on Dawn of War: Soulstorm and (theoretically) boosting performance at least a little, and load it through a custom made/modified d3d9.dll (to not modify the Soulstorm executable's dll import list, thus allowing people who have the game on Steam to use this).

The problem I've run into is well, my lack of technical knowledge on the matter mostly, and I haven't been able to find a dumb enough "THIS HOW YOU MAKE MULTITHREAD DLL" tutorial. I'm aware I should've been looking into more beginner-ish stuff though, most likely overestimated myself again. This isn't editing lua by instinct (worked for me about 50% of times! xP).
Posted

1 solution

You can't make existing code multithreaded without significantly changing the original code: there is no way to "add a DLL" and have that "magically" affect existing compiled code - multithreading doesn't work like that.

If you have the original source code for the game, you *may* be able to add multithreading to it (depending on what it is written in) but you can't add it to an existing EXE file from outside.
 
Share this answer
 
Comments
PsykoTenshi 3-Mar-14 16:03pm    
Oh. Well that doesn't come to me as a big surprise, Dawn of War is one of the least modding-friendly games that can be modded, so this isn't much of a change of pace.

Is there *anything* that can be done from outside the .exe to improve how it performs? Besides throwing more cpu at the game and not running cpu-intensive applications while playing it that is.
I've already found a couple tricks to improve it a bit (here http://forums.relicnews.com/showthread.php?264797&p=1045332747#post1045332747 ), but none affects framerate, "just" loading speed and crash prevention (other two recurrent issues with Dawn of War mods). Plus these tweaks require to edit the .exe, making these improvements unavailable for Steam users :/
OriginalGriff 3-Mar-14 16:14pm    
:laugh:
I think you have pretty much found the answer: throw CPU and RAM at it!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900