Hi,
I’ve bought I few months ago the ParticleStorm plugin. I’ve used it for different smaller particle effect and it works like charm, until I’ve created a bit heavier confetti particle animation.
I’m using around 200 particles, and done a test with 20 repeats. Confetti particle effect works really great in first 2 repeats, keeping FPS steady above 50. But each next repeat is consuming more & more performance, causing FPS drop to below 20, which of course kill my effect. Does anyone know what would be reason for it?
I’ve already checked if there would be a case where it would create new particles on every repeat, but no, total number of particles stays steady on 200.
This is my code:
On game start I’m executing this method only once:
emitter.seed(200);
And then this is my particle config object:
let confettiUpRight = { image: GetAsset.Atlases()['BonusWheel'].getName()[0], animations: { 'confetti1': { frames: { start: 0, stop: 24, prefix: 'confetti_', suffix: '', zeroPad: 3, startFrame: 0 }, frameRate: 12, loop: true }, 'confetti2': { frames: { start: 0, stop: 24, prefix: 'confetti_', suffix: '', zeroPad: 3, startFrame: 10 }, frameRate: 12, loop: true }, 'confetti3': { frames: { start: 0, stop: 24, prefix: 'confetti_', suffix: '', zeroPad: 3, startFrame: 5 }, frameRate: 12, loop: true }, 'confetti4': { frames: { start: 0, stop: 24, prefix: 'confetti_', suffix: '', zeroPad: 3, startFrame: 3 }, frameRate: 12, loop: true }, }, play: [ 'confetti1', 'confetti2', 'confetti3', 'confetti4'], lifespan: { min: 3200, max: 4000 }, scale: {min: 0.4, max: 0.6}, rotation: { min: 0, max: 190 }, alpha: { value: 1.0, control: [{x: 0, y: 1}, {x: 0.6, y: 1}, {x: 1.0, y: 0}] }, velocity: { initial: {min: 4.0 * SlotConfig.gS, max: 6.0 * SlotConfig.gS}, radial: { arcStart: 5, arcEnd: 60 }, control: [ { x: 0, y: 4.0 }, { x: 0.05, y: 5.35 }, { x: 0.15, y: 0.6 }, { x: 1, y: 0.3 } ] }, vy: { delta: 0.12 * SlotConfig.gS }, hsv: { min: 0, max: 360 }, };
And emitter config looks like:
let cfgConfettiUpRight = { total: 200, repeat: 20, frequency: 5000, zone: circleZone };
So the only possible thing that could cause performance drop is if the ParticleStorm is creating new Animation object on every repeat? Could it be?