- Home /
How to improve mobile speed with particle systems?
So, I am working on an awesome 3rd person FPS game in Unity where your goal is to kill zombies, robots, ect. Whenever you shoot the enemies a particle system of blood shoots out for half a second. It ran fine on my Mac, but whenever I ran the game on an actual device, I noticed it would tend to lag whenever the particle system went off. Everything else ran fine.
How could I get the particle system to create less lag?
Thanks!
Oh, I'm also running this app on my IPod touch, 4th generation.
Answer by techshaman · Aug 22, 2013 at 06:36 PM
Two comments here without knowing any specifics:
How are you creating the particle effects for blood? If the particle effect is instantiated when the enemy is hit, you will have an unavoidable pause in gameplay. Instead, you should be using Object Pooling and build your game objects ahead of time.
If you are already pre-caching your objects, you may simply have too many particles in the particle effect. Often times I see particle effects with thousands of maximum particles - this is usually a waste. You can generally achieve the effect you want at a low particle count with some tweaking.
Thank you man! i had a glowing torch with 1000 particles and it's was sooo slow on mobile devices, now with just 2 particles and some tweaks, it's fast as it needs to be :-)
Your answer
Follow this Question
Related Questions
Accessing local system ( File Browser ) 2 Answers
Buttons take time to be fully charged at startup 0 Answers
Particle systems affecting performance in build. 0 Answers
IL2CPP Bug on android 0 Answers
Alternative to SendMessage()? / Mobile Optimization 1 Answer