Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looking at both of your ideas, they would both work. The first could be solved by making the particles slightly bigger and using fewer of them. The fewer particles that the phone has to process the better as each particle moves dynamically and thus many calculations per frame tick.</p> <p>Your second option I feel would be better, as there is no/little processing time (simply calculating how far through the "explosion" it was and selecting the appropriate frame. However there is also the trade off that all your explosions will look very similar. If you could post some of your code (how many particles you're using, how often explosions happen, roughly how many explosions are happening simultaneously) that would be helpful. I had a similar issue a while back, but with a much simpler particle effect and I solved it by just rendering one particle effect and moving it to everywhere that it was being shown each frame</p> <p><strong>Edit 1:</strong> Ok, so I think what you are looking for is a particle effects pool. You basically allocate a set number of particle effects beforehand instead of creating them as needed as I believe you may have. By reusing objects from a fixed pool instead of allocating and freeing them individually you can save a lot of memory and processing. I tried what I believe you've done on my Desire HD and got about 22 fps with 12, 1 second 100 odd particle effects on screen at once. Then pooling them I got about 25. It's not exactly shockingly good but every little helps. Also reducing particle count even to about 75% isn't all that noticeable and saves you A LOT of frames!</p> <p><a href="http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/ParticleEffectPool.html" rel="nofollow">Particle Effect Pool Libgdx JavaDoc</a></p> <p>Sorry I couldn't help more!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload