Limit number of particles on screen?

0 favourites
  • 2 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • To avoid slowdown and high CPU usage, how to limit them?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use the expression ParticleCount - from the manual:

    ParticleCount

    The number of particles the Particles object currently has. This is important to ensure you are not creating too many particles and slowing the game down; see the Optimisation section above. Note that due to the way Construct 2 expressions work, if you have multiple Particle object instances, this will only return the particle count for one of the instances - use a For Each loop to count multiple instance's total particle count.

    Set conditions for creating particles. For example, if the particle count is too high, either don't create the new particle, or delete older ones.

    This may result in some undesirable graphical effects though. It is probably best practice to plan ahead so you won't be able to get into a situation where you have too many particles on screen (by limiting the number of particles fired, setting the duration lower, or being creative with animated sprites.)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)