Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particle emitters don't always despawn when tank is empty, especially with low tank amounts. #6305

Closed
1 task done
VanCastar opened this issue Jan 31, 2024 · 1 comment · Fixed by #6306
Closed
1 task done
Labels
🐛 bug This is a bug impacting users

Comments

@VanCastar
Copy link

Is there an existing issue for this?

Describe the bug

When setting the particle emitter to be deleted when out of particles and having low amount in the tank (escalates at sub 10 amounts), the particle emitters don't get deleted but will stay active indefinitely until manually purged.

Steps to reproduce

Make particle emitters spawn with low tank amount and delete when tank is empty.
The amount of particle emitters will keep increasing and will on a longer run choke up all resources tanking the FPS.
Even when stopping the particle emitters spawning the lingering emitters are still there not getting deleted automatically.
You can manually delete the emitters though.
Check the amount of particles on scene with debug mode in editor.

Example program to the bug.
Lower the particle emitter tank value to get even more dramatic drop in performance, 1-3 particles in the tank drops the performance in about 10 seconds.
BugTest.zip

GDevelop platform

Desktop

GDevelop version

5.3.188 (editor full version: 5.3.188-13cf9b1d0b1ad06da2fff21ff366886922081b9c, core version: 4.0.99-0-release)

Platform info

*OS (e.g. Windows, Linux, macOS, Android, iOS)* Windows 10 / 11

Additional context

No response

@D8H
Copy link
Collaborator

D8H commented Jan 31, 2024

Thank you for reprorting this and for the test project.

The issue happens when a particle lifetime is less than 1 frame (0.017 seconds at 60 fps). The issue needs to be fixed but you should probably use a value of at least 0.05 seconds (3 frames at 60 fps or 1 frame at 20 fps) otherwise the particle would not really be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug impacting users
Projects
None yet
2 participants