Page 1 of 2

Why the game is slow? Does more hardware help?

Posted: Tue Jun 17, 2014 2:29 pm
by Caoster
I'm trying to figure out what is the primary limiting factor in this game. Scrolling around the map is incredibly slow as things pop in and out of view. Next turn is also slow, much slower then it should be.

Enough hardware can eventually make up for a lack of optimization of software. I recall the example of the company that spent several thousand man hours to cut the memory footprint of their application in half, only to realize that double the ram in their servers only cost 50$. This game is now 3 years old. Hardware advances. At some point in the distant future, hardware might make this game less slow. But I am not sure what the limiting factor is.

I thought it would be data access to the hard drive(I am using an Samsung 840 Pro SSD, with a i7-4770K). And that has helped a ton, but next turns still take 30+ seconds to a minute.

Any thoughts or suggestions on where the bottleneck arises. Or should I just wait for general across the board improvements?

Another 5 years should make this game run very fast, once we are all running PCI-Express based SSDs. But maybe there is a good enough solution in the mean time?

Has anyone else tried throwing more hardware at this?

Posted: Tue Jun 17, 2014 4:56 pm
by Kensai
Unfortunately, I think it is an inherent limitation of the engine. At this point, I am not sure because it is coded in Delphi and not a "faster" language, but there is definitely an issue with large database games like PON. Other AGEOD titles are really fast to have their turns processed, but they are much much smaller in scope (possibly only battle). In fact, if you do one of the scenarios of PON that are not campaign, it is pretty fast.

PON on a faster engine would have been formidable. We could also debug it faster. That said, I think the most important aspect is memory. Do you have enough of it? 8+MB?

Posted: Tue Jun 17, 2014 7:13 pm
by loki100
you're right that improved hardware will end up solving the problem.

I usually use a 3 year old laptop and turn processing is ok, but also do some returns on a more modern PC and notice a huge improvement.

1.03 saw quite a bit of optimising, but the core problem is the game engine has to do a lot each turn. Have a look at the log files and you'll see this. Some of that is (good) design decisions, so for eg PoN doesn't use Victoria's fake 'world market' and instead all transactions are 1-1 between states. Better simulation but a cost in processing time.

Also if you script your own events, delete them from the files when they are over, every event needs to be checked every turn to see if it is due to fire (or has fired).

Posted: Tue Jun 17, 2014 7:55 pm
by Templer
Caoster wrote:...next turns still take 30+ seconds to a minute...

At what date you get this numbers?

Posted: Tue Jun 17, 2014 9:36 pm
by Kensai
Certainly the game becomes slower as long as you move forward in time. The main game situation file accumulates junk that slows down he entire playing after 20-30 years of play. This is a game of 1000+ turns in the grand campaign!

Posted: Wed Jun 18, 2014 1:01 am
by CapitanPiluso
Playing Grand Campaign Ottomans side, 1852 : my PC (CoreDuo, 2.8GHZ, 2GBRAM, W7) needs 7 to 10 minutes from turn to turn...the game is very interesting but I gave up.

Posted: Wed Jun 18, 2014 1:23 am
by H Gilmer3
Yeah, I have to admit, if my turns took 7 to 10 minutes, I would not play. I have an OK computer, but nothing special but turns seem to go "ok". The furthest I have played was the GC 1850 to 1871 and my turns were something like the 30 seconds to a minute. I can live with that.

Posted: Wed Jun 18, 2014 7:38 am
by Caoster
Kensai wrote:Unfortunately, I think it is an inherent limitation of the engine. At this point, I am not sure because it is coded in Delphi and not a "faster" language, but there is definitely an issue with large database games like PON. Other AGEOD titles are really fast to have their turns processed, but they are much much smaller in scope (possibly only battle). In fact, if you do one of the scenarios of PON that are not campaign, it is pretty fast.

PON on a faster engine would have been formidable. We could also debug it faster. That said, I think the most important aspect is memory. Do you have enough of it? 8+MB?


I'm running 16GB of DDR3. I had assumed the slowness came from data access speed, and not raw processing requirements. As such, I figure speeding access to and from the hard drive is probably the big speed up. (Each AI faction has to calculate its moves each turn, those moves written to disk, then a combine action calendar created and processed. This seems to requires a substantial amount of both reading and writing to disk, more than raw number crunching. But I could very well be completely wrong.

Posted: Wed Jun 18, 2014 8:11 am
by Kensai
They both play role. Indeed the game juggles a lot of small files in and out of the RAM and to the HDD/SSD. With 16GB of an adequately fast memory and a solid-state drive you must be more than ok. If you don't get process times of less than 2-3 minutes (maybe even 1), especially in the beginning-mid of the game, then you have a seriously malconfigured or unoptimized system. I have my turns processed in these time frames with a much older and less powerful system than yours.

Is these 2-3 mins long already? Yes, but it is definitely not unplayable, especially if you activate background processing and have a browser to play when the game processes your turn. You will be processing more than a game's year (24 turns) each hour or so of play. Most time is consumed giving orders anyway. ;)

When you say you get 30 secs of processing, it's eye watering for most of us!!

Posted: Wed Jun 18, 2014 11:12 am
by Egg Bub
Something which puzzles me, although I understand the turn-processing lag, why do certain buttons on the interface seem to lag also?

Posted: Wed Jun 18, 2014 1:28 pm
by Templer
CapitanPiluso wrote:...PC (CoreDuo, 2.8GHZ, 2GBRAM, W7) needs 7 to 10 minutes from turn to turn...the game is very interesting but I gave up.

The same here.
Pride of Nations is such a fantastic game (in theory) that I take grudgingly the currently in version 1.03e included bugs. Should there ever the currently still active bugs be eliminated, then I would also accept turn times of 7-10 minutes.

Right now, I don't! :mad: .

Posted: Wed Jun 18, 2014 9:45 pm
by Jim-NC
Egg Bub wrote:Something which puzzles me, although I understand the turn-processing lag, why do certain buttons on the interface seem to lag also?


There was some sort of weird "bug" or change in 1.04, that caused certain buttons to lag really badly. Not sure why this happened. Even in earlier builds, the F4 button lagged for some reason (again, not sure why, but it does).

Posted: Wed Jun 18, 2014 10:08 pm
by Christophe.Barot
1.04 is a special problem - Pocus tried to implement more info for players (lack of info was a recurrent criticism) but it resulted in lag, unbearable for my cpomputer -+ which makes game unplayable for me

therefore I had to reinstall game, staying at 1.03e version

I think the lag will be fixed (with or without additional info) next version

Posted: Wed Jun 18, 2014 11:31 pm
by CapitanPiluso
Kensai wrote:Is these 2-3 mins long already? Yes, but it is definitely not unplayable, especially if you activate background processing !

Sorry but, what is background processing ?
Thanks

Posted: Thu Jun 19, 2014 7:48 am
by Kensai
It is an option in the settings to have the game use the CPU even if the game is in the background. This way, when your turn is being processed, you can have a browser open and read history, play Sudoku, chat with friends, whatever. The beauty of turn-based games is that you are not in a hurry, thus why not take advantage of it? :)

Posted: Thu Jun 19, 2014 6:38 pm
by czert2
CapitanPiluso wrote:Playing Grand Campaign Ottomans side, 1852 : my PC (CoreDuo, 2.8GHZ, 2GBRAM, W7) needs 7 to 10 minutes from turn to turn...the game is very interesting but I gave up.


Upgrade to 8gb ram, it will greatly help and memory is realy cheap these days.

Posted: Tue Jul 01, 2014 1:11 am
by CapitanPiluso
czert2 wrote:Upgrade to 8gb ram, it will greatly help and memory is realy cheap these days.

Sadly my motherboard only supports up to 2 GB,but I plan to buy a new one in the near future and i will give this a try.Thanks

Posted: Wed Jul 02, 2014 3:01 am
by H Gilmer3
I need to run some tests to see how long my turns are. Sometimes you think it is a certain length and you are way off one way or the other.

Posted: Fri Jul 11, 2014 8:07 pm
by H Gilmer3
Ok, I had never timed a turn. My turn is May of 1853. I'm playing Prussia and the turn took 3 minutes and 35 seconds to run. It seemed long when watching the clock! I always thought it was quicker than that, but it is 1/2 the time of the 7 minutes posted by CapitanPiluso.

I guess if I play this all the way out, I'll be getting really long process times in the 1900s.

Posted: Sat Jul 12, 2014 6:40 am
by HerrDan
I never had problem with long turns, but in any case I think that in the 1880 scenario (the one I would advice everyone to play since it's much better than the grand 1850 campaign) the turns processing is slightly faster, I've never had any problem with 7 minutes+ of turn processing and my computer is quite modest (2gb ram).

Cheers.

Posted: Mon Jul 14, 2014 5:06 pm
by Tuoweit
Here's something that I noticed helps with the between-turns processing time: Before ending your turn, move the map view to an "empty" part of the map (undiscovered Africa is best). I usually run with the debugging information turned on, which shows how much time is spent rendering, and on busier parts of the map the game appears to spend a significant fraction of each second (e.g. 20-25ms * 20 fps) on this rendering instead of (I assume) actually processing the turns.

Posted: Thu Jul 24, 2014 5:04 pm
by Egg Bub
Can one of the devs please clarify what is the limiting factor for turn-processing times? Would one of the new Intel Pentium dual-core CPUs running at (say) 4.2 GHz be quicker/faster than my current i5-2500 at 3.3GHz?

Posted: Thu Jul 24, 2014 9:20 pm
by fred zeppelin
Egg Bub wrote:Can one of the devs please clarify what is the limiting factor for turn-processing times? Would one of the new Intel Pentium dual-core CPUs running at (say) 4.2 GHz be quicker/faster than my current i5-2500 at 3.3GHz?


I have as top-line a system as you can get, and nothing really helps. The engine is universally slow.

Posted: Thu Jul 24, 2014 10:42 pm
by Caoster
Tuoweit wrote:Here's something that I noticed helps with the between-turns processing time: Before ending your turn, move the map view to an "empty" part of the map (undiscovered Africa is best). I usually run with the debugging information turned on, which shows how much time is spent rendering, and on busier parts of the map the game appears to spend a significant fraction of each second (e.g. 20-25ms * 20 fps) on this rendering instead of (I assume) actually processing the turns.


I have been suspicious that something like that was at least part of the culprit for a very long time. The graphics and rendering seem to be very non-optimized and redundant. Even just scrolling around and zooming are massive hits to a system. It would not surprise me if the rendering engine was slowing down the turn processing.

Posted: Mon Jul 28, 2014 1:27 am
by CapitanPiluso
Before giving it all up, I bought the 1880 Campaign hoping a decent turn result.
To my surprise, turn 0 only took....20 minutes....lol :mad:
Tried to upload here the host log but couldn `t due to the file size.
Reading the host log, the turn started at 12:06:06 and ended up by 12:27:57 so the next step is to forget PON at all.

Regards.

Posted: Mon Jul 28, 2014 2:00 am
by HerrDan
...

Posted: Mon Jul 28, 2014 2:01 am
by HerrDan
CapitanPiluso wrote:Before giving it all up, I bought the 1880 Campaign hoping a decent turn result.
To my surprise, turn 0 only took....20 minutes....lol :mad:
Tried to upload here the host log but couldn `t due to the file size.
Reading the host log, the turn started at 12:06:06 and ended up by 12:27:57 so the next step is to forget PON at all.

Regards.


That's hard to belive! Oh my...that must be a problem with your pc or something, because the first turns here in the 1880 scenario are always around 2 min at most. Try to zip the files and attach it to your comment here on the forum.

Posted: Mon Jul 28, 2014 10:13 pm
by CapitanPiluso
[quote="HerrDan"]That's hard to belive! Oh my...that must be a problem with your pc or something, because the first turns here in the 1880 scenario are always around 2 min at most. Try to zip the files and attach it to your comment here on the forum.[/QUOTE

Uploaded Main log, any help will be great
thanks

Posted: Tue Jul 29, 2014 1:12 am
by HerrDan
In this case it's better to also post a save game file, in any case I noticed some errors there in your log, but we all need more feedback about it, which version you are playing, what's your pc specs and so on...

I'm not a developper, so I can't help much, but if you post here, when the devs have some spare time they can help you find out what's wrong. It's very important to post such things so that they then can be fixed.

Posted: Tue Jul 29, 2014 12:35 pm
by leaddernoir
Hey HerrDan, I was just wondering what your thoughts are regarding WWI within the 1880 scenario (if you have gotten that far)? Does PON model this conflict well, etc? Thanks in advance :)