After our last playtest impressions update we mentioned that we have done some tweaking on our existing custom particle effects seen in Mechwarrior : Living Legends. These optimizations aim specifically at those players that are having issues while in intense combat with sudden graphic lag.To understand what has been done here a quick example on how a particle can look like:
<Particles Name="Smoke_high"> <Params Count="20" ParticleLifeTime="1.75" Texture="textures/sprites/smoke_white_tiled1.dds"/> </Particles>
As you can see it is using XML syntax for particle definitions. While looking at our existing particles we noticed that although looking good with our parameters assigned there was room for optimizations for lower end system. We are mainly looking at the count parameters. It defines how many particles of the same kind will be played. In this example we are talking about 20 particles that together make up a small cloud. In order to get more frames per second for other settings we just reduced the particle count for most of our effects. Other effects have been adjusted in other ways to get better performance without making them look weird. To allow multiple settings for one particle we spliced it up into 3 different definitions:
<Particles Name="Smoke_low"> <Params Count="5" ParticleLifeTime="1.75" Texture="textures/sprites/smoke_white_tiled1.dds" ConfigMin="Low" ConfigMax="Low"/> </Particles> <Particles Name="Smoke_medium"> <Params Count="10" ParticleLifeTime="1.75" Texture="textures/sprites/smoke_white_tiled1.dds" ConfigMin="Medium" ConfigMax="Medium"/> </Particles> <Particles Name="Smoke_high"> <Params Count="20" ParticleLifeTime="1.75" Texture="textures/sprites/smoke_white_tiled1.dds" ConfigMin="High" ConfigMax="VeryHigh"/> </Particles>
Easy, isn’t it? We took our existing particle and created 3 new ones based on that called Smoke_low, Smoke_medium and Smoke_high. Each has it’s own set of parameters but the main change in this example is the reduced particle count. In order to tell the engine what particle should be played when it is triggered we added the ConfigMin and ConfigMax parameters. The rest is done by the engine.As we already posted a little insight on how this will affect performance here some more detailed test results by our own Alpha Tester Xermalk. Thank you for taking the time to test through some of those effects!
At first glance you will see that all results show a slight improvement on the FPS in-game when set to Low from Very high. The Base FPS is the frames per second when standing in-game waiting to fire the effect (our baseline). Now we fire the particle effect listed and compare the lowest FPS against our Base FPS. All particles showed at least minor improvements on the frametime. As these tests were done with only one vehicle and under controlled environments we are sure you will see quite some performance improvements during intense combat with several thousand effects being played over a short period of time!
As a side note: The examples given above are very simple extracts from our particle effects. These effects can get rather complicated in XML and that made it hard to get the optimized without losing the actual look even when running the same settings as before. Re-organizing all these effects takes time and will be a continuous process throughout the mod development. We will add all future effects with proper configuration specifications to ensure gameplay will stay the same when you chose your setting.
Last but not least some video material for you to directly compare both particles: