turns change slower and slower as the game progresses
Moderator: Oberlus
turns change slower and slower as the game progresses
Hi,
I have the same problem with the game, regardless of version: right now I'm testing build 0.45 (2015-08-03.af01c2f) - as the game progresses, the turns tend to change slower and slower
over time, just like the game needed more and more time to calculate data between each turns.
I can provide any log that you need, but please tell me what to do.
Thank you for making this unique game!
oh, I'm running Windows 8.1 64bit, and pretty powerful laptop (will give all specs if needed).
I have the same problem with the game, regardless of version: right now I'm testing build 0.45 (2015-08-03.af01c2f) - as the game progresses, the turns tend to change slower and slower
over time, just like the game needed more and more time to calculate data between each turns.
I can provide any log that you need, but please tell me what to do.
Thank you for making this unique game!
oh, I'm running Windows 8.1 64bit, and pretty powerful laptop (will give all specs if needed).
Re: turns change slower and slower as the game progresses
That's exactly what's happening, and there isn't much you can do about it, except playing on smaller maps, against fewer opponents, lower planet density. What are the typical setup options you're playing with (map size, number of AI, etc.)?Ghoster wrote:the turns tend to change slower and slower
over time, just like the game needed more and more time to calculate data between each turns.
Re: turns change slower and slower as the game progresses
Currently I'm playing on 200 systems, medium starlane frequency and medium planet density, AI = 5.Vezzra wrote:That's exactly what's happening, and there isn't much you can do about it, except playing on smaller maps, against fewer opponents, lower planet density. What are the typical setup options you're playing with (map size, number of AI, etc.)?Ghoster wrote:the turns tend to change slower and slower
over time, just like the game needed more and more time to calculate data between each turns.
What settings do you recommend?
Re: turns change slower and slower as the game progresses
If your laptop is that good, it shouldn't be causing a huge amount of lag on those setting, I could play games through with that relatively easily on my much older laptop, and we've had a number of improvements to processing over time.Ghoster wrote:Currently I'm playing on 200 systems, medium starlane frequency and medium planet density, AI = 5.Vezzra wrote:That's exactly what's happening, and there isn't much you can do about it, except playing on smaller maps, against fewer opponents, lower planet density. What are the typical setup options you're playing with (map size, number of AI, etc.)?Ghoster wrote:the turns tend to change slower and slower
over time, just like the game needed more and more time to calculate data between each turns.
What settings do you recommend?
Basically, every turn, and whenever you queue something in the production panel, the game has to check through various effects to work out what's going on and update your display, we're aware that there are issues on production screen regarding updating the map and similar. If there are too many things to process, this can take longer than is ideal so you get lag.
First thing I always found useful, reduce the total number of ships you have flying by scrapping old obsolete designs, you benefit from reduced upkeep costs and thus new ships are cheaper and it seemed to speed the game up for me.
I also prefer to play on Low planets as each population centre you own requires processing time and I like bigger maps, that would help a bit but a 200 system map shouldn't be causing excessive problems for a decent machine.
The other thing of course is how much slower, what is to one player an acceptable waiting time is to others an interminable wait, maybe I'm just more patient? It's bound to slow down as the game gets bigger, not much can be done to stop it completely, especially given one of the project goals is to make all the content easily customisable which requires referring to source data and similar, are we talkiing minutes, seconds or just noticeably slower but not in an annoying way?
Also, although it doesn't seem to affect it dramatically, turning off gas field rendering and possibly starfield rendering in the galaxy graphics options can produce improvements for some.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: turns change slower and slower as the game progresses
Well, you be the judge:MatGB wrote: If your laptop is that good, it shouldn't be causing a huge amount of lag on those setting, I could play games through with that relatively easily on my much older laptop, and we've had a number of improvements to processing over time.
Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
16 GB RAM
GeForce GTX860M
and the lag becomes huge in my oppinion.
Ok.MatGB wrote: Basically, every turn, and whenever you queue something in the production panel, the game has to check through various effects to work out what's going on and update your display, we're aware that there are issues on production screen regarding updating the map and similar. If there are too many things to process, this can take longer than is ideal so you get lag.
First thing I always found useful, reduce the total number of ships you have flying by scrapping old obsolete designs, you benefit from reduced upkeep costs and thus new ships are cheaper and it seemed to speed the game up for me.
I also prefer to play on Low planets as each population centre you own requires processing time and I like bigger maps, that would help a bit but a 200 system map shouldn't be causing excessive problems for a decent machine.
It is utterly annoying and it progresses as the game goes on. It's bearable after 100 turns and becomes 20-25 seconds after 400 turns. Is it as the game had more and more data to process as the game progresses. The laptop starts to constantly cool itself on higher fan rotation mode. Even the sound starts to stutter on end of every turn cycle (when next turn is about to become active). It happens just the same way, no matter whether I use built-in graphic processor or the GTX860M.MatGB wrote: The other thing of course is how much slower, what is to one player an acceptable waiting time is to others an interminable wait, maybe I'm just more patient? It's bound to slow down as the game gets bigger, not much can be done to stop it completely, especially given one of the project goals is to make all the content easily customisable which requires referring to source data and similar, are we talkiing minutes, seconds or just noticeably slower but not in an annoying way?
MatGB wrote: Also, although it doesn't seem to affect it dramatically, turning off gas field rendering and possibly starfield rendering in the galaxy graphics options can produce improvements for some.
Re: turns change slower and slower as the game progresses
on a quadcore 3.5 ghz SSD it takes several (5) seconds between turns on a default 150 system game and the fan spins up , at turn 300 or so
Re: turns change slower and slower as the game progresses
That is certainly fine in general. My desktop stats are pretty similar, though I guess they had to keep your processor speed down to minimize heat. Mine is an i7-4770K @3.5 GHz, and I commonly play 300-500 systems with 10-20 AIs. If the per turn delay was 20 seconds at turn 400 though I probably wouldn't really think twice about that.Ghoster wrote:Well, you be the judge:
Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
16 GB RAM
GeForce GTX860M
This thread got me a bit curious for details, so I made a testgame with 200 systems, most things on medium except no monsters, 6 empires (AI, my empire did nothing but observe) , and plotted the times to turn 300-- it really ramps up towards the end. Keep in mind this is AI -only, and the lead was up to 2k PP per turn at the end, well ahead of the others and probably was still just cranking out a ton of ships. The basic problem is that there gets to be just so many objects interacting. I think we had gotten rid of all processing behavior that led to N-cubed processing times, but maybe it was just n^4, and there are surely still at least some N^2 logN behavior, and then also ships are being created at a faster rate as well (killed at a faster rate, too, but I think the creation rate rises faster).
Anyways, it was surprising to me to see just how steep it the curve got there, perhaps sometime someone could follow up on it more to see which effects are making the most trouble, etc.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: turns change slower and slower as the game progresses
I think the basic problem here is the way our scriptable effects framework has been designed. To provide maximum flexibility, basically each object can influence/interact with each other object. So, the algorithm has to walk through each effectsgroup of each universe object, tech, special etc., and each of them can potentially affect each universe object.Dilvish wrote:The basic problem is that there gets to be just so many objects interacting. I think we had gotten rid of all processing behavior that led to N-cubed processing times, but maybe it was just n^4, and there are surely still at least some N^2 logN behavior
Now, my math skills are quite humble, but AFAIK this means there is absolutely no way to get below n^2 behavior. Which consequently leads to curves like the one above, I don't see a way to avoid that (other than to completely redesign the entire effects mechanism, which does not sound particularly appealing... ).
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: turns change slower and slower as the game progresses
Not necessarily; some effects only act on the source object with a relatively simple modification, and in that case the time to execute should be nearly constant per effect / source object, so roughly linear in the number of objects producing those effects, or maybe nlogn if there are some lookups in ObjectMaps involved in the preprocessing. There will still be other cases with higher order dependence on numbers of objects, though.Vezzra wrote:To provide maximum flexibility, basically each object can influence/interact with each other object. So, the algorithm has to walk through each effectsgroup of each universe object, tech, special etc., and each of them can potentially affect each universe object.
Re: turns change slower and slower as the game progresses
I think your math skills are good enough to have heard about the distributive property.Vezzra wrote: So, the algorithm has to walk through each effectsgroup of each universe object, tech, special etc., and each of them can potentially affect each universe object.
Now, my math skills are quite humble, but AFAIK this means there is absolutely no way to get below n^2 behavior.
Code: Select all
1*1 + 1*2 + 1*3 + ... + n*1 + n*2 + ... + n*n = (1+... + n) * (1 + ... + n)
Generally, you have some complexity O(g*n) where g is the number of "groups" of operations you perform which may be smaller than O(n) (e.g. O(1) as in the example above).
Now in FO, g = O(n) so the asymptotic behaviour wouldn't change. I do not feel qualified enough to discuss whether this would still provide measurable performance boost (or is even compatible with current implementation) to e.g. cache all effects that affect all planets/ships of an empire/species ...
Last edited by Morlic on Wed Aug 05, 2015 11:28 am, edited 1 time in total.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: turns change slower and slower as the game progresses
Oh my goodness, I knew that people working on such game are brainy...but still...wow...
Anyways, if would you find mathematical solution to make the code more efficient, that would be freakin' revolutionary for this game.
I don't think AI's are the problem. If I eliminate 1 of 3 from the game, the "processor eating" proccess still goes on and on.
I'm on turn 450 and waiting time for next turn varies from 5-6 seconds to 106 seconds (counted!). Craziness.
Anyways, if would you find mathematical solution to make the code more efficient, that would be freakin' revolutionary for this game.
I don't think AI's are the problem. If I eliminate 1 of 3 from the game, the "processor eating" proccess still goes on and on.
I'm on turn 450 and waiting time for next turn varies from 5-6 seconds to 106 seconds (counted!). Craziness.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: turns change slower and slower as the game progresses
You might not appreciate the current state of the code, but compared to how long the effects calculations used to take, there have already been quite dramatic improvements / optimizations.Ghoster wrote:Anyways, if would find mathematical solution to make the code more efficient, that would be freakin' revolutionary for this game.
One thing you could do is start up FreeOrion, go into the options UI tab, and turn on verbose logging. Then load a saved game that currently take a long time (by your standards) to process a turn, and end turn. Then quit, and find the .log files, zip them up and attach to a forum post. They might be quite large, so preferably delete them all before starting, make sure to start the game anew, and play just one turn. It will probably take extra long to process the turn, but the log files should have some potentially useful timing info in them. Saving the game in XML format and attempting to post might also be helpful, though the file might be too big for the forum to allow it to be attached.
Re: turns change slower and slower as the game progresses
I can understand you well. When I try to follow some discussions here, I often feel like Sam in this strip: http://freefall.purrsia.com/ff300/fv00215.htm. "It's really simple" - "Yeah, right."Ghoster wrote:Oh my goodness, I knew that people working on such game are brainy...but still...wow...
You have seen nothing yet, though. Take a look at some of the discussions of our AI folks for example. Oh my...
Hm. That's odd. Usually turn execution times don't vary that much.I'm on turn 450 and waiting time for next turn varies from 5-6 seconds to 106 seconds (counted!). Craziness.
Re: turns change slower and slower as the game progresses
the amount of systems could also be brought down to 100
I find 150 to be on the high side already to manage manually (gets boring and tedious in the endstages), but then again, space is vast so.
more threading of the turn calculations may be possible.
I find 150 to be on the high side already to manage manually (gets boring and tedious in the endstages), but then again, space is vast so.
more threading of the turn calculations may be possible.
Re: turns change slower and slower as the game progresses
Thank you very much, I'll be sure to do it. Always glad to make an even small contribution. I appreciate the work done, don't get me wrong. But it's just still not close to the state to provide a prolonged, comfortable gameplay. But I still play thoughGeoff the Medio wrote:You might not appreciate the current state of the code, but compared to how long the effects calculations used to take, there have already been quite dramatic improvements / optimizations.Ghoster wrote:Anyways, if would find mathematical solution to make the code more efficient, that would be freakin' revolutionary for this game.
One thing you could do is start up FreeOrion, go into the options UI tab, and turn on verbose logging. Then load a saved game that currently take a long time (by your standards) to process a turn, and end turn. Then quit, and find the .log files, zip them up and attach to a forum post. They might be quite large, so preferably delete them all before starting, make sure to start the game anew, and play just one turn. It will probably take extra long to process the turn, but the log files should have some potentially useful timing info in them. Saving the game in XML format and attempting to post might also be helpful, though the file might be too big for the forum to allow it to be attached.