Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

  1.  
    Hi,
    I post a previous message but now it's ok.
    But my program got too many lags :/ I create a deathzone on all my scene (so all particles are dead but still laggy...)
    So my question is quite simple : How can I delete a particle when its variable isDead is true ?
    Because I have 400 particles per ghost and I've max 4 ghost at the same time on my stage and it's very slow...

    Maybe it's cause by the Blurfilter : GetRenderer().addFilter(new BlurFilter(2, 2, 1)); but I think it's not only that or not that.

    If you can help me :D

    Good night !
    • CommentAuthorRichard
    • CommentTimeNov 8th 2011
     
    If a particle is marked dead (particle.isDead is true) then the system will remove it on the next frame update. You don't have to do anything to remove the particle.
  2.  
    ok, thanks to your fast answer :D

    So I think it's the blurfilter function which is the problem :/ I need this effect but I don't know how to optimize it é_è
    • CommentAuthorRichard
    • CommentTimeNov 15th 2011 edited
     
    Is your bitmap renderer as small as possible? Making the renderer's canvas smaller is the most effective way to optimise the filters.
    • CommentAuthorhaoyutang
    • CommentTimeNov 24th 2011
     
    I met same problem before, I start the emitters again and again and found that the performance was going lower.
    My solution is: (I did below steps before each start())
    1. call killAllParticles() for each emitter.
    2. remove the emitters from the renderer.
    Hope it helps :)