Brad Wardell's views about technology, politics, religion, world affairs, and all sorts of politically incorrect topics.

So tomorrow is my first day on GalCiv III.  It’s been a long break for me.  It’s very nice returning to my baby.  GalCiv III is the first GalCiv game I didn’t design or get to spend much time on. 

A few observations

The engine is fancy

I basically have unlimited memory to work with.  However, it uses a lot of memory.  This isn’t terribly surprising given how complex the ships can get.

image

But it is still a problem. 

I spent a little bit of time with this.  If we require DirectX 11 and leave the DirectX 10 folks behind, we can, literally, halve our memory use in texture compression.

The Job System needs to be updated

GalCiv III’s engine is both its strength and its weakness.  The strength is that it has incredible potential as a 64-bit, multi-core, high performance engine.   The weakness is that these features can (and are) abused.

A high performance engine means it has the ability to be really really fast.  But there’s another way of looking at it: It’s also very very forgiving of non-performance tuned code.

image

Not all cores are created equally. Notice that one of them is pegged.  Now, imagine if you’re playing a 2-core CPU (like a laptop). This would be an issue.

A few examples is that there are a lot of calls for high precision timers in the gameplay code when, in fact, we only need the current time in seconds.  Things like that add up faster than you might think.

Performance Tuning

image

Before I can even contemplate writing AI code for GalCiv III, the performance has to be a lot better.  I can’t afford to wait 30 seconds between turns.  It’s late game AI performance that needs help.  But I can’t spend 3 days playing a game to make a few changes.  The turn times have to get drastically faster.

Now, mind you, even today, GalCiv III is, to my knowledge, the fastest 4X at doing turns.  That is, late game, waiting 30 seconds for 20 players on a large galaxy to do their thing is actually pretty impressive.  But it can be a lot better.

And so that’s what I did yesterday and today: I made it a lot faster. A lot faster.  Loading up the game is about half the time it was.  Turn times are about a quarter the time they were.  But there’s a caveat to my performance tuning:  If you’re running 2 cores, you won’t notice any difference.  If you have 4 cores, you’ll probably notice.  If you have 8 cores, it’s massively better.  That’s because I solved many of these problems through improving the task system.

Instead of an AI player going through all its ships one at a time to do its pathfinding, I just split it off into the N-1 cores at a time to do it.  That is, if you have an 8 core PC, it’ll do 7 ships simultaneously. 

Just warming up

Don’t get too excited.  My check in (which you should have shortly) should make the game faster and more stable and use a lot less memory.  But this is nothing.  This is one day’s worth of effort. There’s a ton of low hanging fruit.

If I hadn’t checked in an update to Ashes of the Singularity: Escalation (if you don’t have it, do me a favor and go get it! <G>) to update their high level units, I’d have been able to fix that damn animation on loading thing that bugs the hell out of me (the galaxy should spin smoothly but there’s a call in its thread that sucks up too much CPU at a time).

This is for the base game

I will be getting to the expansion pack AI as well.  But I want the base game’s AI and general performance to reach a place that are more satisfying.

That’s all for now.


Comments (Page 1)
2 Pages1 2 
on Nov 22, 2016

Will take that excitement to the dungeons, and teach it some proper manners! Otherwise, pretty happy to hear about a brave new and optimized tomorrow!

 

Tend to cut down on AI opponents presently, in order to experience the glory of an enormous universe! On a steam driven device from times forgotten, granted! But it can deal with all of the above, so there is that.    

 

on Nov 22, 2016

Don't you have engineers in your company that can handle performance improvement? Or is that a "CEO's privilege"?

on Nov 22, 2016

Almost sounds like you are enjoying yourself.

That's good to hear

 

on Nov 22, 2016

hedetet

Don't you have engineers in your company that can handle performance improvement? Or is that a "CEO's privilege"?

Brad is talking about the AIs only. Don't forget that CariElf just rejoined the team and she is a performance improver extra-ordinare.

on Nov 22, 2016

Turn times of 1/4 what they were is a dream come true!

on Nov 22, 2016

I noticed you talked about cores, but I have a four core system with eight threads. A thread is supposed to work like a core. Shouldn't we also use extra threads. 

on Nov 22, 2016

admiralWillyWilber

I noticed you talked about cores, but I have a four core system with eight threads. A thread is supposed to work like a core. Shouldn't we also use extra threads. 

 

I am pretty sure that is what Frog is also referring to. For the purposes of optimizing the game a thread is essentially the same as a core. Look at his rig, its a 6950K which is 8 cores+8 virtual ones for 16 threads. 

on Nov 22, 2016

It is very noticeable that the game is not using my 8 cores massively like I think it should.  I am looking forward to the new performance graphs for my I7-5690 chip even more than the amazing turn time improvements.  Mostly, it is the idea that all that added efficiency can be harnessed for more and more better AI.  My geek excitement levels are peaking again!

on Nov 23, 2016

First, so happy Brad has taken this over.  I recall being bummed when early on we learned that he was not involved with the design and development of GalCiv3. Not that it isnt a good game now but his absence showed in the final product both in features and performance.

 

Second, forgive my ignorance but where does one find a 8 core computer?  Specifically, in a gaming laptop?  I thought I was doing good with a quad core Razer Blade.

 

on Nov 23, 2016

hedetet

Don't you have engineers in your company that can handle performance improvement? Or is that a "CEO's privilege"?

This was my thought exactly, why hasn't this game been optimized prior to 18 months after release?  Either way, I'm happy Brad's back and can't wait for the changes he proposes.  Can't wait to see the differences.

on Nov 23, 2016

I don't think an 8 core chip on a laptop is a good idea.  First, you need a reason beyond gaming.  For almost all gaming, you want a 4 core processor with individually higher processing rates.  It is speed that runs demanding games, not core capacity.  An 8 core will only be useful for certain games, like GalCiv that will use the cores for "thinking" not just moving pixels around.  That is a real limited list of games.  GalCiv maybe the only one in production so far. Even Civ6 doesn't do it.  (I had hopes.)  The 8 core desktop I have is actually designed for some video editing stuff, and its ability to run GalCiv on 8 cores is just a happy secondary benefit.

I don't know about other multicore chips, but this I7-5690 is quite the heat generator.  It is rated at a base 145 watts worth of heat generation at normal usage.  And it will only get hotter if GalCiv figures out how to abuse those cores.  I have a water cooled system so I can do a little overclocking, but even without the overclocking the chip needs a lot of cooling.  Laptops don't have that kind of cooling, can't have that kind of cooling, not without being a bulky heavy monster you wouldn't want to lug around.

A quick search didn't find anything useful on the availability of such laptops.  If it did, I would advise against such an arrangement myself, unless you are a real tinkerer ready to do some serious bleeding edge technology pioneering for very limited usage cases.

on Nov 23, 2016

Seilore


Quoting hedetet,

Don't you have engineers in your company that can handle performance improvement? Or is that a "CEO's privilege"?



This was my thought exactly, why hasn't this game been optimized prior to 18 months after release?  Either way, I'm happy Brad's back and can't wait for the changes he proposes.  Can't wait to see the differences.

I'd guess it's one of those things that are considered very low priority from a commercial POV due to the low amount of players who would actually be affected by such improvement, hence a "CEO's privilege" to put the engineering hours into what is essentially an indulgence.

on Nov 23, 2016

erischild

I don't think an 8 core chip on a laptop is a good idea.  First, you need a reason beyond gaming.  For almost all gaming, you want a 4 core processor with individually higher processing rates.  It is speed that runs demanding games, not core capacity.  An 8 core will only be useful for certain games, like GalCiv that will use the cores for "thinking" not just moving pixels around.  That is a real limited list of games.  GalCiv maybe the only one in production so far. Even Civ6 doesn't do it.  (I had hopes.)  The 8 core desktop I have is actually designed for some video editing stuff, and its ability to run GalCiv on 8 cores is just a happy secondary benefit.

I don't know about other multicore chips, but this I7-5690 is quite the heat generator.  It is rated at a base 145 watts worth of heat generation at normal usage.  And it will only get hotter if GalCiv figures out how to abuse those cores.  I have a water cooled system so I can do a little overclocking, but even without the overclocking the chip needs a lot of cooling.  Laptops don't have that kind of cooling, can't have that kind of cooling, not without being a bulky heavy monster you wouldn't want to lug around.

A quick search didn't find anything useful on the availability of such laptops.  If it did, I would advise against such an arrangement myself, unless you are a real tinkerer ready to do some serious bleeding edge technology pioneering for very limited usage cases.

 

To derail about cores: >>... My current system is having motherboard failures.  will RMA the ram and hopefully that fixes my issues with it. However next year I will be taking my 2k in Tax returns to build a new system <specifically for Gal Civ III> and was eyeing the older but beefier, 6850K (6core/12 threads) this is overkill for most but I think that some of the newer games (Gal Civ II and Civ VI) will both be better optimized for such and that CPU coupled perhaps with a GTX 1080 should carry me faster with those Insane maps with 50 Ai. DDR4 along with the newer SSD interface M.2 (500gig) and thing should be zipping along nicely! 

 

Cheers again to Brad for telling us whats going on. 

 

I would like to point out that I dearly love Paul (and all his very hard work on our game) and hope he is still working on/with Brad on Gal Civ III. 

on Nov 23, 2016

MyViewsAndMuse

Second, forgive my ignorance but where does one find a 8 core computer?  Specifically, in a gaming laptop?  I thought I was doing good with a quad core Razer Blade.

 
E6 not the I's

on Nov 23, 2016

Seilore


Quoting hedetet,

Don't you have engineers in your company that can handle performance improvement? Or is that a "CEO's privilege"?



This was my thought exactly, why hasn't this game been optimized prior to 18 months after release?  Either way, I'm happy Brad's back and can't wait for the changes he proposes.  Can't wait to see the differences.

Lol.  

Of course the game's been optimized over the past 18 months.  But we all have different thresholds of what represents "good enough".

Go play some Civilization VI and come back and tell me about long turn times and long load times.  They had a massive budget and the game has immensely long turn and load times with a fraction of the data we have to deal with.  The reality is, slow turn times, slow load times and great AI don't affect game sales. 

BTW, I'm not doing optimization.  I'm doing architectural re-design which is a very different thing.

In every industry there are specialists.  At the risk of being even more unprofessional, there's no one else in the game industry with more experience than I have in this area.  I've been optimizing and doing AI for longer than any other person (over 20 years in the industry doing this).  It's a non-trivial thing.  I wrote the very first commercial multithreaded computer game. And that was mainly because so few developers care about that kind of thing.    

 

2 Pages1 2