-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cossacks/American Conquest Game Speed Problem (Multiplayer) #116
Comments
Ah damn, American Conquest was just unlocking the primary surface only once and then kept it unlocked and didn't call any ddraw functions anymore (that's why the log is so tiny with this game)... maxgameticks can't really do anything in this case. Where can I get that "CPU Throttle Tool"? |
Not sure, like i said there are some, but i must say i don't like the idea of Capping my CPU for a game :-) https://gsc-game.com/index.php?t=downloads&ss=299&s=patch (this is a DDraw.dll, which seems(?) to fix this, but got graphic bugs lol) |
Hm, it seems that some source of Cossacks got leaked and there "GetTickCount","QueryPerformanceCounter" and "QueryPerformanceFrequency" is called. I more think that they use "QueryPerformanceCounter" and "QueryPerformanceFrequency", cuase this 2, as far as i know, are depending on the CPU Speed. Can you hook them and adjust them? If you make them low, it should be visible in American Conquest, cause they both use the same engine. |
Hm...okay this games are just weird as hell. Seems like it uses "GetTickCount" combined with a 20ms WndProc Timer. "QueryPerformanceFrequency" wont be called at all...just "QueryPerformanceCounter" once. I tr it myself with the source, if i can hook "GetTickCount" and calc it lower. Perhaps that works...but im not sure. EDIT: Okay, hooking "GetTickCount" and adjusting it DOES impact the MP gamespeed. I tried make the fake_GetTickCount, but the result was, that the game was too slow or getting out of sync. I guess the problem is, that the game is using it for nearly updating everything. So rendering, movement speed etc. But the impact of GetTickCount does effect Singleplayer too, so it seems the right way to get it done, but i couldnt find a good way to do it. |
Okay, when i make every 8 call to "GetTickCount" a 1ms Sleep it's realtiv okay from the game speed. But this value depends on the PC speed too. Perhaps you can find a way to combine it with your maxgameticks. |
I had a look into the ddraw.dll you linked, seems to be a official one (it's even signed) but I couldn't see anything that could slow down the game. Did you check if it solves the problem? If it works then it might be better to investigate more on that one first. I couldn't reproduce the bug on my own yet, still have to set up a multiplayer test game somehow |
The gamespeed problem only comes in multiplayer. But i tested with the DLL, it got some graphic problems sometimes and its not really working. |
Ah damn.... I guess the only proper fix would be a game patch TBH I created a new branch where it inserts a Sleep call every 17ms, maybe it's worth a try. You need to add "sleep=1" into ddraw.ini, might have to try a value between 1 and 16 to find out what works the best |
Hmm nah the Sleep seems not to work. The only thing which seems to work is hooking GetTickCount, like i already said and did myself. The Steam version of American Conquest got there own DirectDraw Emulator, so your DLL dont work there. And for Cossacks exists a community github revamp version (cause the source seems to got leaked some years ago for bugfixing lol), which seems to work. This is how i got atleast a CD version of it to work atleast a bit better. Seems to work for the Cossacks CD version too.
|
Yeah, I saw your fix., I just wanted to create a more generic solution that I could add so it can used for other games as well. I still haven't tested a multiplayer game yet but I'll have a look into it later |
Hi! I am trying to implement this fix myself, and have been looking forever for a way to slow down Cossacks in multiplayer. Which file did you add your code into? |
@puffdelore Here with the newer official patch (2010) Here with the older offfical patch (2008) I don't have a multiplayer setup to test it right now, but I think it did work without having to change any settings. But you could slow down the game even more if needed via "cnc-ddraw config.exe" -> "Compatibility settings" -> "Limit game speed" |
@FunkyFr3sh |
I've just been toying around with it a bit and it looks like the official patch is the reason for some of the bugs you reported. And as it turned out, the game speed limit was not working. Here's a test build I made, the game speed limiter is working now (higher value = faster game speed, default = 250) Note: Make sure you remove the file named "dplayx.dll" from your game folder |
In American Conquest: Fight Back single player skirmish games, when the map size is set to Huge, the game hiccups for a split second every 20-40 seconds or so. No idea if this has anything to do with cnc-ddraw because the game won't run normally without it. P.S. The jinc2-dedither shader works miracles on the water, shadows and even a bunch of landscape set pieces in this game! P.P.S. Today American Conquest: Fight Back is played online with a modified executive. You might want to look into that. Quoting from the game’s discord:
|
@FunkyFr3sh |
I don't know about you guys, but my game didn't work. Every time I started it, the screen changed, and I went into black-loading mode. Then, after a couple of seconds, the game crashed and reported an error. I tried to run it through a PC on Windows 10. I tried everything that was recommended on the Internet, such as a display mod for old games, launching with admin rights, changing to Windows 7 compatibility, and so on. |
Did you check the wiki already? If it still doesn't work upload me a log file, link: #44 |
Hi there,
I got a question which directs to Cossacks/American Conquest. This games are somehow detecting the CPU speed in network games and adjust the game speed on the lowest CPU speed in a MP game. With your "maxgameticks" option i cant really adjust that, cause it seems it's using a different API to detect it. Do you think you can find a solution for that?
So far the only thing i know, is to get a CPU Throttle Tool to scale down the CPU and then play the game.
If your interested, can you look into it and see if you can make something with your DLL there?
It's not important, cause the other graphic things are working with your DLL, so it's just a extra fix.
The text was updated successfully, but these errors were encountered: