Campaign Optimisation
#1
Posted 08 September 2011 - 06:53 PM
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
Posted 08 September 2011 - 09:46 PM
#8
Posted 09 September 2011 - 06:52 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.
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
Posted 09 September 2011 - 07:01 PM
#10
Posted 09 September 2011 - 07:07 PM
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.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.
#11 Guest_bobby B bobby B_*
Posted 09 September 2011 - 07:55 PM
#12
Posted 09 September 2011 - 11:57 PM
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!You get it when it's done (unless you want it before all the glitches have been ironed out).But when do we get it!
Trust me, it'll be well worth the wait .
Don't take anything I say seriously, EVER!
#13
Posted 10 September 2011 - 01:15 AM
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.One question about planets: Are planets now standardized in size or they still vary depending on data?
#14
Posted 10 September 2011 - 11:33 AM
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!
#15
Posted 10 September 2011 - 03:02 PM
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 passion, there is serenity. There is no death, there is the Force.
#16
Posted 10 September 2011 - 03:27 PM
#17
Posted 10 September 2011 - 05:09 PM
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
Posted 10 September 2011 - 05:58 PM
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 passion, there is serenity. There is no death, there is the Force.
#20
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
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users