[with Video] How can I prevent these fps drops

Hey,

please help me, I am new to Unreal Editor and not yet familiar with all the possibilities.
I would like to create a tile based top-down game in which you can place bombs (currently most similar to bomberman).
Moving, placing bombs, I have no problems, but when I want to draw the explosions, the fps go to ground.

The best way to see this is in the video: explosion fps problem - YouTube

In the first part I took the explosion from the Content Starter Pack. In the second part I removed everything from the explosion except the fireball, the performance has improved, but it doesn’t look so nice anymore.

The important thing is that I want to have an explosion on every tile, which is form-fitted, so a huge one unfortunately doesn’t work because it could cover other, not affected tiles.

Can anyone give me tips on what I could / would have to change to not get FPS drops? If several bombs explode, the whole game slows down and of course it shouldn’t be like that :slight_smile:

Thanks in advance

Hi, first of, your FPS are generally low even without the explosions. What hardware are you targeting, mobile or desktop?

With the explosions your FPS go down due to the pixel shader cost of the explosions (so the bigger the screen portion is that the explosion covers, the higher the cost). Since the explosions use translucent materials that means their cost will add up when overlapping. So if you have one explosion, then you pay a certain cost, if you have two explosions covering the same pixel you pay the cost for both, … (if you would have opaque materials then if they would overlap, then you only pay the cost for the material that is on top but nothing for all the materials that are below, with translucent materials you pay the cost for all materials that are overlapping this pixel added together).

Since you need to keep the materials translucent, you have several options that I can currently think of:

(1) reduce the screen portion that is covered by the explosion, so make the explosion smaller

(2) reduce the number of explosions you spawn, so before you spawn a explosion particle system, check beforehand if there was “recently” triggered an explosion in “close” proximity, if so do not spawn an additional one

(3) reduce the complexity of your explosion particle system, so that you get less overlapping translucent meshes/particles

Thank you for your answer.

Yes my FPS are not very good, i’m not sure what is a “normal” value for them in the editor. When I load the StarterMap from StarterContent/Maps, my frames are at 55. Maybe my system is to weak, but on the other hand, when my game runs smooth on it, it should on much other also ^^

I was already thinking about your second solution, but at the moment I hav no idea how to handle that.

I thought I could add each spawned emitter location into an array and check before spawning if there is already this position in this array.
Problem with that is, that i would need a second array with the emitters is, checking if they are still valid to remove the from the emitter and location array.
But this array have to be run through every tick, so i’m sure this is not so good for the performance :confused:

Is there an easier way to check if there is already an emitter on this field? (Because it’s all tile-based, the position of the emitters on the same field would be identical).

Another idea would be to change the graphics looks like toons, so i could change the explosions to solid materials, then it should, according to you, also be less frame dropping :confused:

Another thing not to gawk at is reducing the pixel size of the images used to generate the effect.
you definitely do not need a 2k texture to render a 10px wide image.
Changing the size may not be a lot of savings, but its still savings.

That said, the drop in fps must be a result of (or a combination) of draw calls and shader instructions.
meaning. How many particles does the smoke use? Can that be reduced? Are they GPU particles? Same for explosions.

Also, assuming that your system uses Cascade, maybe making a new one in niagara could lead to a more performant effect .