Hi all. I am trying my hand at a little Bomberman clone and I’ve hit a bit of a snag with the explosions.
So I have a pool of 145 “explosion” prefabs. The prefab is a Particle System and simulates a small explosion that lasts about 1 second. I pool them at the start of the game, disable them, and then pull them from a queue when they’re needed.
Essentially, when a bomb explodes, I measure the distance to the next block (based on the power of the bomb), and then reposition a bunch of the explosions and then enable them. Then once their animation plays, I disable them, and chuck them back in the queue. I’ve attached an image below to show how it looks.
One bomb is fine; so is two or three. But when there are 4 players, that can drop 9 bombs each, that can explode up to 9 spaces, in all directions… it seems to be a little too much for Unity. I don’t have much experience with the particle system in Unity, but judging from the massive frame-drops I am getting I can only assume I am doing something very wrong.
So I’d just like some advice! How would you recommend I program an explosion system like this? One that can explode 1-9 blocks in 4 directions, at varying distances. Should I render an explosion in Blender, and just use that instead of a particle system? Is there a way I can achieve this effect by just using the 1 particle system? Any and all input is welcome, thanks!
