Change of Turn Speed Very Slow - Need Help Please

Marshall_Placid

Chieftain
Joined
Jan 4, 2007
Messages
9
This is not a tech problem, per se.

I am playing on a 40 x 25 (which is 160 x 100 tiles; or 16,000 tiles), with 44 players, in Emperor level.

When I "end turn", the game takes about 60 to 70 seconds to change the turns.

Does anybody know how to speed this up?

I realize that the larger the map size, the slower it is. Also, more player equals longer change of turn speed.

I want to know if there are OTHER things I could change, besides the map size and player count, to speed up the change of turn speed.

I know the CPU speed is a factor. I am going to purchase a faster CPU.

I also turned down my graphics to the lowest possible detail level.

What I am asking is... are there specific coding in the .py files or Python files that causes this slowdown?

Or any other suggestions?

It is much appreciated.
 
Yes, I have a i7 920 CPU with 9GB DDR3 RAM.

Before, 2 weeks ago, I had a dual core 2.66 RAM.

The increase in turn speed was amazing.

It went from 2 minutes to 60 seconds on all the games. Basically, it halved the speed.

So, the "game changer" factor was the CPU. It was not the graphics card or the RAM.

Just the CPU. I guess it is the AI calculating the moves, etc.

So, if you want, you can overclock your CPU to achieve the gains in Clock speed.

Or, you can upgrade.
 
As for the cause, Marshall_Placid is probably right. Assuming you have Quick Combat (no battle animations) turned on or aren't watching a bunch of AI battles or unit moves, then the graphics won't be much of a factor. The high turn time is the CPU doing the "thinking" for the AIs.

There are, however, a few technical changes you could make. Turn times just aren't that much of a factor for me, so I haven't bothered doing these myself. Therefore, I cannot say how much time you might save. The changes are simple but drudgery work.

1. Disable all of the Python callbacks in XML/PythonCallbackDefines.xml. These are all 0 by default, so unless you've enabled some of them in the past, there's nothing needed here.

2. Remove all the CvUtil.pyPrint() calls from Python/CvEventManager.py. Almost every event logs a message with details of the event. This is great for debugging, but it's pointless if you're just playing. This could add up to considerable time during AI wars because it writes to disk each time.

Of course, work on a copy of the file in your CustomAssets folder (keep the same folder structure). Again, I have no idea how much time this will save you. If you find it to be significant, I'm sure others would much appreciate your efforts. If you use a good text editor such as Notepad++ and know regular expressions, you could do this in a matter of minutes I expect.

3. Create your own DLL with Python event calls removed. If you're only concerened about playing un-modded games, you don't need the Python events at all. You can skip step #2 and just remove all the calls to the event reporter interface. This requires some C++ knowledge and ability to compile the SDK.

In the end, buying a faster CPU would give you significantly better results than these small tweaks above.
 
I read somewhere that the biggest culprit was the pathfinding algoritm civ4 uses, the longer range units have, the worse it gets.

Has anyone ever considered breaking up the pathfinding algoritm into steps, ex. if a unit has 8 moves, let move 4 stop up, and move 4 again.

This would probably dumb down the ai quite a bit, but the game gets almost unplayable even on smaller maps when the ai gets loads of units in the middle to late game (on the higher difficulties, ai doesnt mind defending cities with 150+ units).

For the multiplayer mod I'm working on, I've been doing a number of stupid things (more than trippled upkeep, increasing costs on all unitclasses) to limit the amount of units in the game for this reason alone.
 
You can't touch pathfinding at all since it is locked in the EXE. You can try to override that with the DLL and a custom written pathfinding algorithm, but chances are yours will be slower AND dumber, unless you know how to write pathing algorithms professionally.
 
Back
Top Bottom