Slow AI turns

Andvare

King
Joined
Sep 14, 2007
Messages
788
I love the gigantic earth map (even though there are too many resources), and pretty much only play that. The map is a bit large, and becomes quite slow in the end, so I saw that AND advertised being faster, and here I am.
But though my own turns are quick and responsive, the AI turns have become excruciatingly slow, far slower than "vanilla" ROM.
So my question is, is there any sub-addon that could be causing this slowdown?
 
I'm not sure what you mean...

The amount of time your turn takes depends on how long you take. The game doesn't control that. If you sit and leave your computer for an hour, your turn will have taken an hour. AND doesn't change that...

As for the AI, the time they take to complete a turn takes seconds, less usually.

I'm not sure what you are talking about? Is the time in-between turns slow? What? Can you clarify what you mean?
 
Sure.
It's the time in between turns that is unusually slow.
Vanilla ROM didn't have the same problem.
 
Sure.
It's the time in between turns that is unusually slow.
Vanilla ROM didn't have the same problem.

I'm not trying to insult you; it's just that this is mathematically impossible.

A New Dawn is at least 50% faster (in respect to turns) than vanilla RoM. I can't vouch for any other modmods of RoM in the modmods forum, but I know that if you use RoM & AND, you will have a faster game.

As for why it is impossible, I discussed the RoM slowdown problem in this thread a few months back. Since Zappara was/is unwilling to make SDK changes, I began the task of fixing the problem. That was the earliest beginnings of A New Dawn.

If you doubt me, you can test the game speed for yourself. Get a clean copy of Rise of Mankind 2.9, and load a standard size game on normal speed. Start a timer, and use AI Auto Play (Control-A) to let the AI play for 100 turns. When the AI finishes, clock the time. Install A New Dawn 1.70beta3, and repeat. I will guarantee that A New Dawn is at least 50% faster.
 
A New Dawn is at least 50% faster (in respect to turns) than vanilla RoM.

This is true. RoM, no matter how great the mod is, would be almost unplayable due to the fact, how slow it is, especially on bigger maps/more civs. Beside the fact of many other great improvements, we should thank you Afforess zillion times for speed optimalization.

Andvare: you can't compare RoM/AND to Vanilla.... Taking content/features into consideration, I would say, RoM/AND is MUCH bigger and MUCH more complicated game. For example, tech tree is probably 4 times bigger in the MOD, than it used to be in Vanilla.

Not to mention that you play on gigantic maps, while Vanilla offers huge size as maximum.

No contest.
 
I'm not trying to insult you; it's just that this is mathematically impossible.

A New Dawn is at least 50% faster (in respect to turns) than vanilla RoM. I can't vouch for any other modmods of RoM in the modmods forum, but I know that if you use RoM & AND, you will have a faster game.

As for why it is impossible, I discussed the RoM slowdown problem in this thread a few months back. Since Zappara was/is unwilling to make SDK changes, I began the task of fixing the problem. That was the earliest beginnings of A New Dawn.

If you doubt me, you can test the game speed for yourself. Get a clean copy of Rise of Mankind 2.9, and load a standard size game on normal speed. Start a timer, and use AI Auto Play (Control-A) to let the AI play for 100 turns. When the AI finishes, clock the time. Install A New Dawn 1.70beta3, and repeat. I will guarantee that A New Dawn is at least 50% faster.

As I said, I have tried a clean install of ROM (not 2.9 though), and it was choppy in the late game. AND isn't choppy like RoM is, when it's my turn, but really slow between turns.
I wouldn't ask the question, if it wasn't there.
It's really strange. I can't find a reason for the slowness. I'll try to reinstall it, as I didn't install all the components, so perhaps some there is some conflict somewhere.

This is true. RoM, no matter how great the mod is, would be almost unplayable due to the fact, how slow it is, especially on bigger maps/more civs. Beside the fact of many other great improvements, we should thank you Afforess zillion times for speed optimalization.

Andvare: you can't compare RoM/AND to Vanilla.... Taking content/features into consideration, I would say, RoM/AND is MUCH bigger and MUCH more complicated game. For example, tech tree is probably 4 times bigger in the MOD, than it used to be in Vanilla.

Not to mention that you play on gigantic maps, while Vanilla offers huge size as maximum.

No contest.

I never compared ROM to BTS. That would be like comparing fast food to a gourmet restaurant. While it's still filling and fast, it is a bit bland, boring and with fewer choices.
When I said "vanilla", I meant the unmodded RoM.
 
I never compared ROM to BTS. That would be like comparing fast food to a gourmet restaurant. While it's still filling and fast, it is a bit bland, boring and with fewer choices. When I said "vanilla", I meant the unmodded RoM.

Yeah, sorry, my mistake.
 
I have noticed this myself, so i tried to get a little test going, since i had two similar saves, one in RoM/AND (1.70 Beta3) and the other in vanilla RoM.

Here's what i found:

Vanilla RoM Save:

Large Earth2 Map, Epic Speed, ~18 civs present
Industrial Era, 36 cities (my own, about 127 world wide)

Time between turns: Varies from 20-40s

RoM + AND 1.70Beta3 Save:

Large Pw2 Map, Epic Speed, ~18 civs present
Industrial Era, 29 cities (my own, about 100 world wide)

Time between turns: Varies from 1m:20s-2m

Reading this post actually got me to go back to vanilla RoM to check out the speed and i was surprised to see it go faster, it could be a fluke instance since i dont exactly have a lot of games to do head to head tests on atm, but that's what i got so far. :(

I can provide both saves if needed.
 
My findings from the first 10-20 turns is that RoM takes 4-10 seconds, while AND takes 5-10 times that, 30-60 seconds.
(very inaccurate measurements, but that shouldn't matter, as the difference is too great)
Same exact map/starting location/actions.

This is with a standard AND instalment.

I'll try to go through different AND game options next to see if I can identify any culprit.
 
There is possibility that while AND improves code it at the same time adds new buildings/units etc. with included addons.

ruskyandrei did you run AND with only Better Rom mod turned on or any other mods were there as well?
 
I was running AND with (from the log):

{Required Files} {Realistic Diplomacy} {Seafaring } {Larger Cities} {Lead From Behind} {Event Images} {No Storms} {Mega Civ Patch} {Better RoM} {Forest UI} {Blue Marble Terrain} {Better RoM Artwork} {Airbase Range} {Civic Diplomacy}

Custom

Not sure what "Mega Civ Patch" is actually, dont remember installing anything like that.
 
I have noticed this myself, so i tried to get a little test going, since i had two similar saves, one in RoM/AND (1.70 Beta3) and the other in vanilla RoM.

Here's what i found:

Vanilla RoM Save:

Large Earth2 Map, Epic Speed, ~18 civs present
Industrial Era, 36 cities (my own, about 127 world wide)

Time between turns: Varies from 20-40s

RoM + AND 1.70Beta3 Save:

Large Pw2 Map, Epic Speed, ~18 civs present
Industrial Era, 29 cities (my own, about 100 world wide)

Time between turns: Varies from 1m:20s-2m

Reading this post actually got me to go back to vanilla RoM to check out the speed and i was surprised to see it go faster, it could be a fluke instance since i dont exactly have a lot of games to do head to head tests on atm, but that's what i got so far. :(

I can provide both saves if needed.

My findings from the first 10-20 turns is that RoM takes 4-10 seconds, while AND takes 5-10 times that, 30-60 seconds.
(very inaccurate measurements, but that shouldn't matter, as the difference is too great)
Same exact map/starting location/actions.

This is with a standard AND instalment.

I'll try to go through different AND game options next to see if I can identify any culprit.


After reading both your posts, I decided to test things for myself. I ran some test games using exactly the same map (I generated it, saved it as a worldbuilder save, and re-used it).

Here are the results
Rise of Mankind 2.9(w/o A New Dawn) 100 turns: 2:06
Rise of Mankind 2.9(w/o A New Dawn) 200 turns: 6:32

A New Dawn 1.70beta3 (Recommended Settings) 100 turns: 2:32
A New Dawn 1.70beta3 (Recommended Settings) 200 turns: 7:46

A New Dawn was running about 10% slower. So I went and started profiling turn times (with special DLLs, you can turn on engine profiling, which will identify the length the longer functions and code takes to compute). I found that one of the key time consumers was CvPlayer::canTrain(). What that function does is check if units can be built for each player based on civics, the unit limits, techs, and other player-wide criteria. It doesn't take a ton of time to compute, but was being used over 1000 times a turn, in the early game (Late game, it's used > 10,000 times a turn... :eek:). I cached the values. (I made the game calculate once per turn for each unit, saved the results in memory, and the game checks the memory instead of recalculating each time. Much Faster.)

I ran profile tests again on the same scenario as before,

A New Dawn Beta4 (Recommended Settings) 100 turns: 2:10
A New Dawn Beta4 (Recommended Settings) 200 turns: 6:10


So, while it didn't speed up the early game a ton (only a few seconds difference, within error margins, so effectively, the same times), the late game was slightly faster than RoM, and significantly faster than the previous A New Dawn.

I've been doing this a lot lately, Identifying places where the game should cache values in memory instead of recalculating them. Generally, this doesn't speed up the early game any, since the early game hardly uses these values at all, but by the late game, there should be a considerable difference in turn times. Rise of Mankind will slow down immensely in the late game due due to it's use of python callbacks.

One last note here, some irony:
The reason why Rise of Mankind 2.9 feels so much faster than 2.81 is that I submitted a lot of code to improve game-speed to the RevDCM team, and that code got included in Rise of Mankind 2.9. (RoM 2.9 is ~15% faster than 2.8 because of it). I'm competing against myself. ;)
 
It also means that AND is more RAM intensive than RoM, and that could be part of the reason for my problems, as I have recently had some faulty RAM that I haven't replaced yet.

Thanks for the help.
 
It also means that AND is more RAM intensive than RoM, and that could be part of the reason for my problems, as I have recently had some faulty RAM that I haven't replaced yet.

Thanks for the help.

you want 3GB non-faulty RAM 32-bit for AND, if 64-bit then 6GB that's to get max speed out of AND
 
One last note here, some irony:
The reason why Rise of Mankind 2.9 feels so much faster than 2.81 is that I submitted a lot of code to improve game-speed to the RevDCM team, and that code got included in Rise of Mankind 2.9. (RoM 2.9 is ~15% faster than 2.8 because of it). I'm competing against myself. ;)

More irony: We were all sure that AND is faster than RoM and stated so all over the forum. So latest findings left us, as we say in Poland, with bald heads :lol:
 
More irony: We were all sure that AND is faster than RoM and stated so all over the forum. So latest findings left us, as we say in Poland, with bald heads :lol:

The good news is that it will be faster once again. It's actually quite an achievement, considering I was using a recommended install of AND. I'm sure Lite AND would have kicked RoM's butt.
 
One last note here, some irony:
The reason why Rise of Mankind 2.9 feels so much faster than 2.81 is that I submitted a lot of code to improve game-speed to the RevDCM team, and that code got included in Rise of Mankind 2.9. (RoM 2.9 is ~15% faster than 2.8 because of it). I'm competing against myself. ;)
Your post was interesting to read. :) There was couple changes that I made in RoM 2.9 that also increased turn speed: the storm system was "cut down" ie. maps don't usually spawn them at the game start (only random events) and the number of starting players was decreased on giant/gigantic map sizes.
 
I'm not sure this is exactly on-topic but I put RoM+AnD on 500 turn auto play (windowed mode) and watched Win7 resource monitor.

Civ4 was only using 1 CPU (i have dual-core). Is there anyway to get the game to use both? I'm sure that would speed things up a lot.
 
Back
Top Bottom