Jump to content


Photo

Campaign Optimisation


77 replies to this topic

#1 Ghostrider

Ghostrider

    Sith Lord of Campaigns

  • Project Team
  • 2,035 posts
  •  Phoenix Rising QA Lead; Manual Editor

Posted 08 September 2011 - 06:53 PM

Mod development is a double edged vibro-blade at times. Adding detail and expanding gameplay can have an effect on performance, and this has always been a challenge with campaign development, where you can’t just cram zillions of unarmed freighters around a trade planet to make it look real without making the PC sweat a bit.

The trick is to add enough units to make planetary defense fleets look and feel real, and to have enough variety that you each fleet is different, and yet balancing this with performance.

Several breakthroughs in the development process have made this a lot easier and add up to making a much better mod.

Firstly, PR looked at how the game engine works from a theoretical aspect. While we are unable to optimise the engine itself, we can optimise the data that the engine uses, and this has been done by eliminating unused XML data objects. So the Zann Consortium has been whittled down to a handful of pirate/independent units, corruption missions are gone and the interventions (the random missions that used to pop up) have been removed from the AI. Redundant GUI model code was also scrapped.

De-bugging also uncovers some unusual problems. During late V1.1 testing we discovered that someone had accidentally left a microscopic sized level 5 Starbase tucked under each planet in galactic mode, and removing this certainly made the graphics card a bit happier.

The other big change to V1.2 is the use of a config.meg file to wrap all the XML’s into a single package, which reduces hard-drive access time, and therefore improves loading times.

We also tried unplugging the AI completely (not just switching it off), but this made very little difference to performance, as some of the performance issues are inherent to EAW modding – so we work around as best we can.

For the campaigns themselves, there is a clear correlation between the number of units in play and degrading performance and simply capping the large campaigns to a maximum of 100 planets was a step in the right direction. However, the big breakthrough came in recent testing, when Evilbobthebob discovered that while large campaign files are certainly slower than small files, the really important factor is diversity. It’s better to have fleet of 50 identical frigates than a smaller fleet of 10 frigates, 10 bombers, 10 fighters and 5 freighters.

With this in mind we tested a new approach to fleet composition:
We can keep a huge stock list of available ships, but ensure individual fleets don’t have two different ships performing the same role, and keep the upgrade level consistent with the fleet.
For example, a smuggler world would have several YT1300b’s instead of a motley assortment of randomly upgraded freighters. This eliminates several unit variants in one go, but players are still attacked by a swarm of hard-hitting light freighters.
The next smuggler world might be poorer, but slightly more criminally minded and would have say HWK Medium Raiders for a slightly more piratical bias.
As a player you are met with a completely different foe, but the game engine is happy to only deal with one variant instead of six.

This approach has been applied across the entire mod, and while no two planets will have the same choices from what is now a large unit database, but the results work. In the last three months, all seven campaigns have been re-optimised (the Beta varsion) with this viewpoint and, if anything having fewer types of units in an individual fleet accentuates the differences between one planet and the next and makes the universe that much more interesting. And the performance benefits speak volumes as the CPU is better able to manage the galaxy.

The following test results were achieved on a 3.6GHz Quad Core - Alpha version early V1.2 testing, Beta version post optimisation

Loading Times (s)

Core Worlds (Alpha) 31
Core Worlds (Beta) 25
Inner Rim (Alpha) 36
Inner Rim (Beta) 21
Outer Rim (Alpha) 53
Outer Rim (Beta) 38
Operation Skyhook (Alpha) 51
Operation Skyhook (Beta) 40
Thrawn Offensive (Alpha) 50
Thrawn Offensive (Beta) 42
Galaxy Far Far Away (Alpha) 107
Galaxy Far Far Away (Beta) 60
Operation Shadow Hand (Alpha) 67
Operation Shadow Hand (Beta) 59

Max Frame Rate Per Second

Core Worlds (Alpha) 28
Core Worlds (Beta) 32
Inner Rim (Alpha) 24
Inner Rim (Beta) 36
Outer Rim (Alpha) 20
Outer Rim (Beta) 24
Operation Skyhook (Alpha) 18
Operation Skyhook (Beta) 23
Thrawn Offensive (Alpha) 17
Thrawn Offensive (Beta) 19
Galaxy Far Far Away (Alpha) 11
Galaxy Far Far Away (Beta) 18
Operation Shadow Hand (Alpha) 10
Operation Shadow Hand (Beta) 12

Average Frame Rate per Second (1 minute test)

Core Worlds (Alpha) 24
Core Worlds (Beta) 29
Inner Rim (Alpha) 18
Inner Rim (Beta) 28
Outer Rim (Alpha) 16
Outer Rim (Beta) 20
Operation Skyhook (Alpha) 15
Operation Skyhook (Beta) 21
Thrawn Offensive (Alpha) 14
Thrawn Offensive (Beta) 16
Galaxy Far Far Away (Alpha) 9
Galaxy Far Far Away (Beta) 15
Operation Shadow Hand (Alpha) 8.2
Operation Shadow Hand (Beta) 8.5

This translates to a 30% improvement on performance for all but the most complex campaigns, and as an added benefit, the new files proved to be smooth and responsive as one moved around the galaxy on all campaigns.

Overall, this means that medium performance systems should be able to play on Core Worlds, Inner Rim, Outer Rim and Operation Skyhook, while lower end PC’s should be able to play Core Worlds and Inner Rim.
And yes - it means that some laptops might be able to play Core Worlds at least, and mine is now used extensively for testing!

#2 evilbobthebob

evilbobthebob

    evilbobthemapper

  • Project Team
  • 2,304 posts
  • Location:USA
  • Projects:Phoenix Rising Maps
  •  Phoenix Rising Mapping Lead

Posted 08 September 2011 - 09:46 PM

To elaborate on the setup I tested with, I run Windows 7 64 bit, so have no worries about the mod running on that platform. You may see increased performance on Windows XP 32 bit because that is the OS EaW was designed for. The only compatibility setting I needed to use on my system was to run the mod as Administrator. It is important to note that running the mod in Windows XP compatibility mode will in fact reduce performance.

Phoenix Rising, head of mapping. Thanks to everyone who got us to the position below!
Posted Image


#3 Tropical Bob

Tropical Bob

    title available

  • Members
  • 1,348 posts

Posted 08 September 2011 - 11:15 PM

This all sounds awesome and all, but all I see right now is the word "beta".

#4 smashedsaturn

smashedsaturn
  • Members
  • 150 posts

Posted 08 September 2011 - 11:49 PM

any statistics about a 4Ghz quad? or should i push it higher :lol:
I cant wait :wub:

#5 Ghostrider

Ghostrider

    Sith Lord of Campaigns

  • Project Team
  • 2,035 posts
  •  Phoenix Rising QA Lead; Manual Editor

Posted 09 September 2011 - 07:07 AM

This all sounds awesome and all, but all I see right now is the word "beta".



Oh - we've moved on a bit since the optimisation. Further things have changed and tweaked and we have the "gamma" at the moment. It's the same performance level though. :cool2:

#6 Guest_Donald_*

Guest_Donald_*
  • Guests

Posted 09 September 2011 - 09:10 AM

But when do we get it!

#7 DaveAshton

DaveAshton
  • Members
  • 89 posts

Posted 09 September 2011 - 12:36 PM

But when do we get it!

You get it when it's done (unless you want it before all the glitches have been ironed out).

Trust me, it'll be well worth the wait :thumbsupsmiley:.

#8 Aizen Teppa

Aizen Teppa
  • Members
  • 206 posts

Posted 09 September 2011 - 06:52 PM

Well we should be really worried. There is still plenty of letters between G[amma] and Z[eta]. :evgr:

On a more serious note. My experience with 1.1 while running under XP, Vista and W7 is that Classic Theme of XP is best choice.

One question about planets: Are planets now standardized in size or they still vary depending on data? While I was running 1.1 on C2D standardized planets worked much better than scaled independently. (much less CPU time needed to calculate size and rotation)

#9 evilbobthebob

evilbobthebob

    evilbobthemapper

  • Project Team
  • 2,304 posts
  • Location:USA
  • Projects:Phoenix Rising Maps
  •  Phoenix Rising Mapping Lead

Posted 09 September 2011 - 07:01 PM

As far as I'm aware, the game should not perform any differently with individually scaled planets. Every one has an XML entry for scale that has to be loaded regardless of the number contained in it; animation for rotation is described in a very small file for each planet and is not calculated by the CPU on runtime. In fact, the planets should for the most part be rendered purely by your graphics card and not your CPU.

Phoenix Rising, head of mapping. Thanks to everyone who got us to the position below!
Posted Image


#10 DaveAshton

DaveAshton
  • Members
  • 89 posts

Posted 09 September 2011 - 07:07 PM

On a more serious note. My experience with 1.1 while running under XP, Vista and W7 is that Classic Theme of XP is best choice.

XP is probably still the best way to run PR if your system's running XP or Vista as its OS. However, if you're using Win7, don't run it in Windows XP compatibility mode. PR now runs very well on Win7 without needing to change anything except running it as an administrator.

#11 Guest_bobby B bobby B_*

Guest_bobby B bobby B_*
  • Guests

Posted 09 September 2011 - 07:55 PM

big fan just had the computer re built and got it back so i have to re down load PR but i cant wait to start playin again :) and even more excited that v1.2 is coming out been waiting for a long time to see a mod that i see as a great one :)

#12 Gumballthechewy

Gumballthechewy
  • Members
  • 49 posts
  • Location:Somewhere you've never heard of.

Posted 09 September 2011 - 11:57 PM

But when do we get it!

You get it when it's done (unless you want it before all the glitches have been ironed out).

Trust me, it'll be well worth the wait :thumbsupsmiley:.

I trust! The longer it takes the sweeter it will be when we get it! And also it won't be buggy and slow, loving the news about speed improvements by the way!

Don't take anything I say seriously, EVER!


#13 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 10 September 2011 - 01:15 AM

One question about planets: Are planets now standardized in size or they still vary depending on data?

That's been brought up for years by various people, but it's never made any sense to me. I don't know why it would work that way, and even if it did, rotation is the GPU's responsibility - a really basic one, at that. It's not like the GPU has much to do in Galactic as it is. Again, we eliminated those bugged star base models that were increasing the graphics workload by 600% per planet while unzoomed.

#14 Aizen Teppa

Aizen Teppa
  • Members
  • 206 posts

Posted 10 September 2011 - 11:33 AM

@ DaveAshton
I know that XP is best way, and W7 64b works perfectly well without any Compatibility Mode. I just made an observation. :)

@Phoenix Rising
Well thats is great. 600% bump. Now finally it is time to see VGA really pushed even in Gal-View

About planet size. When I had my old C2D setup it made massive difference (returning size=1.0) when loading campaign and during early stages of gameplay before everything lagged to hell. Maybe it was not fault of planet size/rotation per se. Maybe that was fault of those bugged things you just mentioned. It can't change fact that it was easy way to speed up game a bit (at least short term). Change which stayed until the end was that planets were easier to click and zoom in (when words were very closely packed together).

Anyway... Bring it on guys, bring it on! :xcahik_:

#15 skie9173

skie9173

    Rebel (not so) High Command

  • Members
  • 257 posts

Posted 10 September 2011 - 03:02 PM

ok simple question really but I just want to clarify for myself. You cut diversity among units sharing the same role (such as only having 1 type of anti-fighter transport in your example) but are you also cutting diversity of roles from planets too?

What I mean is will planets that should have large powerful garrisons (i.e. core worlds) will still have them?
Example:Rather then Kuat having 30 TIE Starfighters rank 4, 20 TIE Interceptors Rank 3, and 2 Imp Star Is, and 2 Imp Star IIIs. It might have 50 Interceptors Rank 2 and 4 Imp Star IIs?
Also, do notable pirate planets still have their really nasty named Dreadnoughts?

As always amazing work PR team, looking forward to playing!
There is no emotion, there is peace. There is no ignorance, there is knowledge.
There is no passion, there is serenity. There is no death, there is the Force.

#16 evilbobthebob

evilbobthebob

    evilbobthemapper

  • Project Team
  • 2,304 posts
  • Location:USA
  • Projects:Phoenix Rising Maps
  •  Phoenix Rising Mapping Lead

Posted 10 September 2011 - 03:27 PM

For more information on the nastiest pirate warships, check out this news post: http://forums.revora...ike-you-either/

Phoenix Rising, head of mapping. Thanks to everyone who got us to the position below!
Posted Image


#17 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 10 September 2011 - 05:09 PM

Aizen, I'm sure we can run a test on it at some point... I just can't understand it. Then again, no one really knows how Alamo works and it could be an unexplainable quirk.

Named illegal flagships are no longer; they've been replaced with the generic, non-named equivalent. Salvaged units are also toast. I wouldn't expect to see optimization as dramatic as the Kuat example, but that is the general idea on a smaller scale. Most of what's gone shouldn't be missed.

Edited by Phoenix Rising, 10 September 2011 - 05:10 PM.


#18 skie9173

skie9173

    Rebel (not so) High Command

  • Members
  • 257 posts

Posted 10 September 2011 - 05:58 PM

Ok gotcha. thanks for the answers.

another quick question/idea. Is it possible to manipulate the space station spawn/reinforcement scripts from vanilla into a means of spawning the frivolous immersion craft like unarmed freighters, that way their would be less in the galaxy map, but still some units for flavoring different trade planets? or would this still result in performance decreases, at least in tactical?

sorry my understanding of the modding process, and its limitations is minimal.
There is no emotion, there is peace. There is no ignorance, there is knowledge.
There is no passion, there is serenity. There is no death, there is the Force.

#19 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 10 September 2011 - 06:06 PM

Performance would be worse doing it that way than how we have it.

#20 Ghostrider

Ghostrider

    Sith Lord of Campaigns

  • Project Team
  • 2,035 posts
  •  Phoenix Rising QA Lead; Manual Editor

Posted 14 September 2011 - 07:17 AM

ok simple question really but I just want to clarify for myself. You cut diversity among units sharing the same role (such as only having 1 type of anti-fighter transport in your example) but are you also cutting diversity of roles from planets too?


No - planets maintain the diversity.
My fleet database contains at least 200 different fleet units (including variants) to choose from when populating defense forces, the question is which ones?
And how can I create an interesting and challenging fleet on Planet X, that looks different to Planet Y, and uses as few different unit types as is reasonable?

The rich and strategically valuable Core Worlds still have extensive fleets, but they are much less diverse than they used to be. It's all about what the planet does and its resources.
For example, Brentaal IV is in a critical strategic location at the join of to super-hyperroutes and is a military target as well as one of the galaxy's busiest shipping hubs. It has a significant fleet of trading and military vessels, while the slum world of Cal Seti has a small fleet of space pirates, renegades and outlaws. I've just re-balanced each fleet to have the same punch with fewer ships and less variation, eg drop from 15 different types of fleet units to 11 types of fleet unit.
You probably won't be able to tell the difference in battle, but the operating system surely does!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users