I think you guys are gonna want to see this video

I think 1 UPT will slow things down a lot. In my experience the performance roughly matches Civ 4 on release, so... give it 5 years and all our computers will be good enough to handle it!

I wonder how much Civ 5 is actually parallelised. I wouldn't be surprised if it's nothing much more complicated than having the graphics and animation handled by one thread, while another handles the AI. The trouble is that parallising the AI is not an easy task as each step in a turn can potentially greatly influence the next step in the turn. There are things you can split off (city deciding which tiles to use, for example) but I would imagine that the nastiest bit of the AI is pathing and combat, and that's not pretty to do efficiently in parallel. If one of the units discovers, for example, a massive enemy army the other units being calculated in parallel need to know about this, or we end up with an AI that looks stupid. There are things you could do with parallising a single AI which might produce good results, but nothing that would be easy in terms of initial programming or in terms of maintainability.

One thing that could be fairly easily done is city states. It'd be fairly easy to work out in the city state phase which city states could influence other city states then parallelise them in such a way that no mutually influencing states would be running at the same time. How much performance you'd see from this is not obvious, especially as there might be gotchas in the implementation as I imagine CS use the same functions as normal civs in a lot of places.

There are many places where small level parallelism might be possible, however it's often the case that this isn't actually worth doing. You actually need to send a reasonable chunk off in a parallel unit for any significant benefit to be seen.

BTW: Save game crashed for me. I've been getting that a lot with Civ 5 though. Hoping the patch will fix that...
 
There isn't much that is parallelized. You can use perfmon on your computer to observe both the process and the individual threads within the process.
 
If Firaxis were to take the route Bohemia Interactive has, they have all the capabilities at their fingertips to re-manage data stream code to max out dual core threads, AND quad core threads, AND hexacore threads. BIS has a team that's only 1% the size of Firaxis, yet their game and code-based is probably 1,000x more complex than anything Firaxis is doing. In ArmA you can't just edit a few files in Python, XML and be off to work like you can in Civ. And since BIS can control thre threading so finely now (note: they started with an engine that could not manage four cores - note Arma2's ~ 1,000x more complex than Civ V... then Civ V programmers could do it too... unless they don't know what they're doing OR didn't hire/train an expert in parallel processing on x86 x64.

To lay down how it should work.

* Thread #1 = Worker movement
* Thread #2 = Military movement
* Thread #3 = Build queue
* Thread #4 = Diplomacy

You break these down, and Even if all AI iv have to wait to take their turns, you've made time turn faster by a factor of 4! That is huge! Not 4x faster, but a full factor of 4. You've then reduced the turn time by rather large 25%-75%

It would be very nice if it was that simple. But ask yourself, how can you do any decision about worker/military/build order before you know your diplomacy?
You can't, if you don't know that if you are gearing for a war or not you just can't move your soldiers/workers or set any build queues. And that goes for all four of these. You need to know where your military is before moving workers etc. Multi threading is not so simple that you just could put tasks like that for each core. If you could, you still would need to be calculating all three million paths for military on one core while other is calculating on diplomacy and then decide which one of those three million pre calculated military movements would be the right one to execute. Simply waste of time, not processor time but time that the programmers could use better, like fixing bugs.

Also my phenom X4 at 2.5 GHz can get up to 75% at all cores. So the game does use more than 2 threads at some times. Not too well, but it can. Some times rarely it just freezes for ten or twenty seconds, then it takes 100% at one core and other three are idling, seen that many times from running task manager at second monitor. Maybe you cant see that on faster CPU:s, but with this old chunk it sure uses at least some power.

I'm not concerned about the load times, but the oblivious bugs that must have come up at beta phase, like the resource trading bug and the 69-limit. I really feel like I was a beta tester that didin't get paid for it but rather had to pay for testing the game.

Edit:
Also the Ai is so damn awful at fighting on sea that all the maps other than pangea are pretty much useless with out mp. AI:s just bring out their troops embarked for you to pick up one by one with any ship that you might have built.
 
did you try the savegame?

performance kills this game... even if teh game was so poor as it is, if you waited few seconds for turn ends, than you could at least waste more time thinking about silly strategies on how to challenge yourself to win (ie 1 city in normal game on deity), artificial restrictions of various kinds etc... but the performance as it is at the moment, simply does not allow the game to be played on large/huge maps past medieval times. It's a nail in the coffin.
 
You propably said that to the above poster. But I tried the the save and it took about one minute and forty seconds to finish the turn. Usually at that point I would need ten minutes to run my turn,(so couple of minutes waiting wont do much) but because the city limit I can't play games like that.
 
well if you are geting half the time the OP, that is certainly interesting... there may be something more to this end game lage than just basic hardware requirements.
 
Well my system is certainly inferior to the the rig that op is holding. I have the game installed on intel 80 GB SSD. With phenom cpu and 4 GB of ddr 2 memory. Now I have run it twice and it takes about the same 1:40 to finish the turn. It might also have some randomness. or maybe more :). If it has, it is going to be near impossible to make any worthwile benchmarks for this game.
 
I've found some interesting things going on late game.

My recent epic game I was getting lag about mid game(375). It was the same as my normal speed(250). about 50% way through the game seems to be happening instead of turn number.

At this point I get lag spikes and you can see animations freeze for a long time (1 full minute). I decided to delete some navy units as this lag started when sending out navy to find wonders and the more map revealed, the most lag increased. After deleting navy the lag was the same.

I then deleted all workers and my 1 minute lag spike was gone completely. I even couldn't find one of my worker and the lag spike was still one full minute. deleting that last worker caused a full 1 minute lag spike itself.

Now my turns takes 35 seconds waiting for AI stuff, but I have no workers to improve tiles. not that I need any right now as I'm so far ahead.

Here is a link to my saves both with workers and without so you can see the difference.

http://forums.civfanatics.com/showpost.php?p=9802937&postcount=49

also, I can see in the OP video all the lag spikes occuring for the Civ AIs in the game(the citiy states go by quickly), but no lag on his phase of the next turn phase (just after barbs turn or CS if no barbs as I see none) for me, when I get the mini lag spikes during the AI Civ's phase, I can see task manager reporting not responding and ony one core being used. It seems like there is some coding bugs for the not responding to show up.

anyway, hoping patch comes soon. or at least a mini patch to fix some things.
 
Ok a couple of things what exactly are FRAPS? (some people said having a quad core means that fraps are no problem but I'm still curious as to what they are) and has anyone tried the mods that only let each civ have 1 or a certain limit of workers? and is it worth bothering with?
 
Ok a couple of things what exactly are FRAPS? (some people said having a quad core means that fraps are no problem but I'm still curious as to what they are) and has anyone tried the mods that only let each civ have 1 or a certain limit of workers? and is it worth bothering with?

FRAPS is a two part utility.

First, it is a benchmark program to measure how frames of video are being displayed by your video card every second. Or frames per second (FPS). It is a novellty thing to let you know how your system is running or if it's running well enough for a game you want. 45 average FPS is a good measurement. It depends on screen size as well, as larger dksplays take longer to draw.

second, it's a video capture device. Kind of like your DVR to record your favorite TV shows for later viewing, except it's for your computer. It work well for most games and other applications.

Here's a link if you want to check it out.
http://www.fraps.com/
 

Wow, what a slow comp, something must be wrong with his system and running fraps don't help. I can't believe how much faster my well maintained Althon 64 X2 5200 with 3GB RAM, Vista 64 and NDIVIA 9600GT 1GB DDR3 is. He is playing on a huge map, I don't play on maps that size but the game is maxed out on my system and runs speedy. Takes about 2 sec a turn on my comp. I am wondering if the game also runs faster in DX9 mode, seems so.
 
Wow, what a slow comp, something must be wrong with his system and running fraps don't help. I can't believe how much faster my well maintained Althon 64 X2 5200 with 3GB RAM, Vista 64 and NDIVIA 9600GT 1GB DDR3 is. He is playing on a huge map, I don't play on maps that size but the game is maxed out on my system and runs speedy. Takes about 2 sec a turn on my comp. I am wondering if the game also runs faster in DX9 mode, seems so.

I'm going to assume you're just kidding around trying to bait me. Using nothing even remotely comparative.
 
Perhaps someone with such fast turn times on huge maps can prove it by uploading a video in a similar style? I do not believe for one second that even with a powerful computer would you be getting 2 second turn times with a savegame like that.
 
I think the key passage in the post in question is "I don't play on maps that size". The question of Dx9 vs Dx11 could be worthwhile testing though. Although there's other evidence hinting at a worker AI lag, it wouldn't hurt to explore other possibilities as well. Imho. :)
 
Hi,

I just want to point out 1 thing that has been repeated many times in this thread which is very WRONG!

The number of units can not be the real slowing down factor with respect to the case you all are disccusing...

There are 2 factors:
1. The number of units
2. The amount of codes/logics to go through in order to decide where to send a unit or what a unit should do.

For 1., you all are taking computer CPU power as slow as humn brain power. Let me tell you this, you will need to have more than 1 million units on the map to really see an performace impact.
It is the 2. that is the actual cause of the slow down problem.

If 2. is badly coded, then each unit will take lot of decision making time, that cause adding 100 units seems to be a big matter. (but adding 100 unit isn't a real big issue for CPU to go through.


Programmers (if any of you is one) I mean

FOR nUnit = 1 to N
// Call: a routine to determine what happen/where to move a unit in this turn
WhatToDo(aUnit[nUnit])
NEXT

there won't be a differrence if N is 1 or 10000 in the above codes, it is the time WhatToDo() routine takes per iteration... see my point?
If WhatToDo() is really optimized, which means it takes very little time, then you will need to increase N to say 20 million (20,000,000) in order to feel a lag.

Btw: (I would like to add the below)
Chances is their path finding routine, or a routine that gives all possible tiles a unit can be reallocated has bugs or there are codes that call it inefficiently.
Otherwise that must be the routine that gives all possible tasks a unit can be assigned has bugs.

The above are my guesses, anyway, I suppose they are good one.
 
Hi,

I just want to point out 1 fact that has been repeated many times in this thread which is very WRONG!

The number of units can not be the real slowing down factor with respect to the case you all are disccusing...

There are 2 factors:
1. The number of units
2. The amount of codes/logics to go through in order to decide where to send a unit or what a unit should do.
I'm a programmer, and you're wrong. No matter what each unit has to do, doubling the number of units is going to make it take (at least) twice as long. Probably more. Of course optimising the inside of the loop is going to make it faster, but so is more units. You're never going to optimise the inside to zero, and it's always going to be a trade-off.
 
workers must be it... I wander what did they do to that guy who was hired to write worker routies :D

if it is as simple as that, that may be the true big improvement after the patch.

I've found some interesting things going on late game.

My recent epic game I was getting lag about mid game(375). It was the same as my normal speed(250). about 50% way through the game seems to be happening instead of turn number.

At this point I get lag spikes and you can see animations freeze for a long time (1 full minute). I decided to delete some navy units as this lag started when sending out navy to find wonders and the more map revealed, the most lag increased. After deleting navy the lag was the same.

I then deleted all workers and my 1 minute lag spike was gone completely. I even couldn't find one of my worker and the lag spike was still one full minute. deleting that last worker caused a full 1 minute lag spike itself.

Now my turns takes 35 seconds waiting for AI stuff, but I have no workers to improve tiles. not that I need any right now as I'm so far ahead.

Here is a link to my saves both with workers and without so you can see the difference.

http://forums.civfanatics.com/showpost.php?p=9802937&postcount=49

also, I can see in the OP video all the lag spikes occuring for the Civ AIs in the game(the citiy states go by quickly), but no lag on his phase of the next turn phase (just after barbs turn or CS if no barbs as I see none) for me, when I get the mini lag spikes during the AI Civ's phase, I can see task manager reporting not responding and ony one core being used. It seems like there is some coding bugs for the not responding to show up.

anyway, hoping patch comes soon. or at least a mini patch to fix some things.
 
I'm a programmer, and you're wrong. No matter what each unit has to do, doubling the number of units is going to make it take (at least) twice as long. Probably more. Of course optimising the inside of the loop is going to make it faster, but so is more units. You're never going to optimise the inside to zero, and it's always going to be a trade-off.

Actually hclass has a point. He is not stating that number of units is not a factor at all, which is fairly clear if you read the post carefully (unfortunately you cut off his quote which is a bit unfair). He is saying it is not the main factor that is the cause of the lag. In other words, the problem is not the large number of units on large maps. Larger number of units on large maps just reveals the problem more obviously.

The 2nd point he speaks of is where there is something going wrong in civ5. There is, in my view, most probably a very poorly optimised or just plain bugged step in the worker logic that is causing an insane number of loops.

I bet if Firaxis revealed the SDK source tomorrow, one of the programmers/modders on this site would find the problem on the same day.
 
Top Bottom