FreeOrion

Forums for the FreeOrion project
It is currently Sun May 26, 2013 9:36 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Turn Slowdown After ~100 Turns / Combat Oddities
PostPosted: Mon Jan 23, 2012 5:37 pm 
Offline
Space Krill

Joined: Mon Jan 23, 2012 5:29 pm
Posts: 7
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.


Top
 Profile  
 
 Post subject: Re: What's still needed for v0.4?
PostPosted: Mon Jan 23, 2012 7:24 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7899
Location: Vancouver, BC
ZGruk wrote:
Hmm, after a very few turns (probably 1 or 2 hundred) the game gets REALLY slow between turns.
Please attach a save file (zipped) and the .log files in the directory
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.


Top
 Profile  
 
 Post subject: Re: What's still needed for v0.4?
PostPosted: Mon Jan 23, 2012 11:56 pm 
Offline
Space Krill

Joined: Mon Jan 23, 2012 5:29 pm
Posts: 7
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.


Attachments:
FreeOrion.zip [293.84 KiB]
Downloaded 6 times
Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 2:49 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7899
Location: Vancouver, BC
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" ...)


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 5:15 pm 
Offline
Space Krill

Joined: Mon Jan 23, 2012 5:29 pm
Posts: 7
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.


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 5:57 pm 
Offline
Design & Graphics Lead
User avatar

Joined: Sat Sep 23, 2006 7:09 pm
Posts: 3693
Location: USA — midwest
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.

_________________
—• Read this First before posting Game Design Ideas!
—• Design Philosophy

—•— My Ideas, Organized —•— Get an Avatar —•— Acronyms —•—


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 6:59 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7899
Location: Vancouver, BC
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.
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.


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 8:39 pm 
Offline
Programmer and Packager
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 769
Location: Sol III
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.

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.


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 9:03 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7899
Location: Vancouver, BC
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.
Have you observed that sort of bug, or are you just guessing?


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 9:14 pm 
Offline
Space Krill

Joined: Mon Jan 23, 2012 5:29 pm
Posts: 7
Vezzra wrote:
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.

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.


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.)


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 9:19 pm 
Offline
Programmer and Packager
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 769
Location: Sol III
Geoff the Medio wrote:
Have you observed that sort of bug, or are you just guessing?

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.


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Tue Jan 24, 2012 10:30 pm 
Offline
Design & Graphics Lead
User avatar

Joined: Sat Sep 23, 2006 7:09 pm
Posts: 3693
Location: USA — midwest
ZGruk wrote:
Vezzra wrote:
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.
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.
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.)

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.

_________________
—• Read this First before posting Game Design Ideas!
—• Design Philosophy

—•— My Ideas, Organized —•— Get an Avatar —•— Acronyms —•—


Last edited by Geoff the Medio on Tue Jan 24, 2012 11:34 pm, edited 1 time in total.
removed blank lines in quotes


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Sun Jan 29, 2012 5:51 pm 
Offline
Space Krill

Joined: Mon Jan 23, 2012 5:29 pm
Posts: 7
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 8 times
Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Sun Jan 29, 2012 8:35 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7899
Location: Vancouver, BC
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.


Top
 Profile  
 
 Post subject: Re: Turn Slowdown After ~100 Turns
PostPosted: Sun Jan 29, 2012 9:43 pm 
Offline
Programmer and Packager
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 769
Location: Sol III
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.

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?

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?).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group