Turn Slowdown After ~100 Turns / Combat Oddities
Moderator: Oberlus
Turn Slowdown After ~100 Turns / Combat Oddities
Hmm, after a very few turns (probably 1 or 2 hundred) the game gets REALLY slow between turns. It takes 2-3 minutes for it to go from one turn to the next and CPU usage skyrockets. Also, a problem I noticed from the previous version, where the map dragging gets stuck (you're not holding down the mouse, but the map is still moving) when you minimize the game, causing the CPU usage to go up, is still present.
Other than that, it's great, a definite improvement.
Other than that, it's great, a definite improvement.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: What's still needed for v0.4?
Please attach a save file (zipped) and the .log files in the directoryZGruk wrote:Hmm, after a very few turns (probably 1 or 2 hundred) the game gets REALLY slow between turns.
discussed on this page: http://freeorion.org/index.php/Config.xml
Ideally, make new log files by loading a game and ending turn once such
that it takes a long time, then quitting the game.
If files are too big to attach, you can use an upload site and link to them.
Likely there's a particular building or tech that was completed that has a condition test that it much slower than the others. We'd need to identify which that is. You might also look at saves just before turns get slow, to see if there's something new you're producing or researching around that time.
Re: What's still needed for v0.4?
Here is the zip file. I wasn't sure which log file, so I put all of them in.
I'll work on pinning down when it got slow at some point.
I'll work on pinning down when it got slow at some point.
- Attachments
-
- FreeOrion.zip
- (293.84 KiB) Downloaded 66 times
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Turn Slowdown After ~100 Turns
Turns out the problem is that AI empire 2 has over 800 items on its production queue, and it's taking ~5 seconds to simulate 500 turns of that queue in order to estimate completion times for those items, and those estimates are done multiple times per turn.
Edit: I added a timer and loop abort to halt simulating future turns on the queue after 0.1 seconds, which reduces turn times to a bit over 20 seconds for me with that save, most of which is not taken up doing anything production-queue related.
(Also, the save was on turn 632 - somewhat more than "1 or 2 hundred" ...)
Edit: I added a timer and loop abort to halt simulating future turns on the queue after 0.1 seconds, which reduces turn times to a bit over 20 seconds for me with that save, most of which is not taken up doing anything production-queue related.
(Also, the save was on turn 632 - somewhat more than "1 or 2 hundred" ...)
Re: Turn Slowdown After ~100 Turns
It was turn 632 that I sent you, but the turns had been slow for some time. I can't say exactly when it started.
I thought something might be wrong with the AIs. I sent ships to conquer them, and even when the ships had high health (80-100) they were completely destroyed within 2-3 turns, sometimes when there were no defending ships.
I thought something might be wrong with the AIs. I sent ships to conquer them, and even when the ships had high health (80-100) they were completely destroyed within 2-3 turns, sometimes when there were no defending ships.
- eleazar
- Design & Graphics Lead Emeritus
- Posts: 3858
- Joined: Sat Sep 23, 2006 7:09 pm
- Location: USA — midwest
Re: Turn Slowdown After ~100 Turns
I'm not sure how much the AI currently does. I've conquered a couple AI homeworlds with the recent version and no similar weird effects.
I wonder if the AI has researched stealth tech and you simply can't see the ships that are beating you. My conquests came after turn 100, before anybody is likely to have much stealth.
I wonder if the AI has researched stealth tech and you simply can't see the ships that are beating you. My conquests came after turn 100, before anybody is likely to have much stealth.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Turn Slowdown After ~100 Turns
If that's happening, it's not a problem with AIs, but with the combat mechanics; the AIs play by the same rules as the human player. Someone else reported a similar problem with illogical combat losses, but didn't provide a save file when asked. If you could provide a save that replicates this, and specify exactly which system / battle to examine, that would be helpful. It would be more helpful if this was reproduced in as small a galaxy with as few planets, system, and empires as possible.ZGruk wrote:I thought something might be wrong with the AIs. I sent ships to conquer them, and even when the ships had high health (80-100) they were completely destroyed within 2-3 turns, sometimes when there were no defending ships.
Re: Turn Slowdown After ~100 Turns
Just a thought: Maybe the AI has researched "System Defense Mines", and there is a bug in the effect execution code resulting in more than the supposed 2 damage/turn applied to invading ships.ZGruk wrote:...I thought something might be wrong with the AIs. I sent ships to conquer them, and even when the ships had high health (80-100) they were completely destroyed within 2-3 turns, sometimes when there were no defending ships.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Turn Slowdown After ~100 Turns
Have you observed that sort of bug, or are you just guessing?Vezzra wrote:Just a thought: Maybe the AI has researched "System Defense Mines", and there is a bug in the effect execution code resulting in more than the supposed 2 damage/turn applied to invading ships.
Re: Turn Slowdown After ~100 Turns
I don't think so. This happened with two separate AIs one of which was fairly non-aggressive in technology research. (At least they only had Mark Is and the others had Mark IIs and they had very few ships.)Vezzra wrote:Just a thought: Maybe the AI has researched "System Defense Mines", and there is a bug in the effect execution code resulting in more than the supposed 2 damage/turn applied to invading ships.ZGruk wrote:...I thought something might be wrong with the AIs. I sent ships to conquer them, and even when the ships had high health (80-100) they were completely destroyed within 2-3 turns, sometimes when there were no defending ships.
Re: Turn Slowdown After ~100 Turns
Just guessing. It came to my mind when I read that this apparently happened even in undefended systems. First I thought that might be just that, the AI having researched System Defense Mines. But then I checked and saw that the damage dealt is only 2/turn, that can't bring down ships with 80-100 health in 2-3 turns. So I wondered if it might be the System Defense Mines tech nonetheless, with a bug in the effect execution code doing more damage than intended... well, as I said, just a thought.Geoff the Medio wrote:Have you observed that sort of bug, or are you just guessing?
- eleazar
- Design & Graphics Lead Emeritus
- Posts: 3858
- Joined: Sat Sep 23, 2006 7:09 pm
- Location: USA — midwest
Re: Turn Slowdown After ~100 Turns
The AI is very incomplete. I haven't followed the development of it very carefully in the last couple months, but i doubt the AI can design it's own ships. The Mark i, ii are pre-designed ships, which may have been the best prebuilt designs that included the tech the AIs had.ZGruk wrote:I don't think so. This happened with two separate AIs one of which was fairly non-aggressive in technology research. (At least they only had Mark Is and the others had Mark IIs and they had very few ships.)Vezzra wrote:Just a thought: Maybe the AI has researched "System Defense Mines", and there is a bug in the effect execution code resulting in more than the supposed 2 damage/turn applied to invading ships.ZGruk wrote:...I thought something might be wrong with the AIs. I sent ships to conquer them, and even when the ships had high health (80-100) they were completely destroyed within 2-3 turns, sometimes when there were no defending ships.
Last edited by Geoff the Medio on Tue Jan 24, 2012 11:34 pm, edited 1 time in total.
Reason: removed blank lines in quotes
Reason: removed blank lines in quotes
Re: Turn Slowdown After ~100 Turns
Here is a save demonstrating the illogical combat problem. Look at the battle which occurs between turns 155 and 156 at Honeydew.
- Attachments
-
- FreeOrion_Human_Player_Terran_0155.zip
- (49.46 KiB) Downloaded 60 times
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Turn Slowdown After ~100 Turns
I think what's happening is that since planets are essentially invulnerable during combat, a planet with nonzero defense gets dozens of rounds of free combat shots at enemy ships in its system. The planet can be attacked by the ships, but the only effect is to reduce the planet's construction meter, which doesn't affect its ability to continue battle. The planet's attacks against the ships, however, do damage and may destroy them, as is often seen.
Re: Turn Slowdown After ~100 Turns
I've checked the logs, that is exactly what's happening. The weird thing is that the planet's defense meter shows up as 0 in the UI, although the planet actually has defense 5. And that's weird because all the other meter values of the planet are displayed correctly, so it can't be insufficient detection on the attacker's part. Or does the defense meter have a different visibility than the other meters?Geoff the Medio wrote:I think what's happening is that since planets are essentially invulnerable during combat, a planet with nonzero defense gets dozens of rounds of free combat shots at enemy ships in its system. The planet can be attacked by the ships, but the only effect is to reduce the planet's construction meter, which doesn't affect its ability to continue battle. The planet's attacks against the ships, however, do damage and may destroy them, as is often seen.
On a side note, there are some other weird things I noticed when examining the combat log: Battle rounds where the colonized planets in the system attack the uncolonized ones, battle rounds where ships attack the uncolonized planets in the system, ship part stats not showing up correctly (mass driver 1 damage as 0, ROF as 0?).