New tutorial added: Creating Particle Explosions

edited August 2012 in General discussions
Hi Guys,

Added a new tutorial to the wiki on making re-usable explosions using spawners and particles.

Hope you enjoy.

Tutorial 6: Creating Particle Explosions

Comments

  • edited August 2012
    Nice work, thanks, I'm sure that'll be helpful for a lot of people!

    Haven't had the time to read it all thoroughly, but I think the beginning is a bit misleading in the sense it's combining two techniques to react to inputs.

    If you listen to the event input themselves, you shouldn't have to use orxInput_IsActive()/orxInput_HasNewStatus as all the info is contained withing the event itself.

    If you want to use those 2 functions, you can do it from anywhere, including your main clock update/loop function and thus don't need to listen to the event itself.

    That's all for now, I'll come back with more feedback over the week end after reading everything more closely. :)
  • edited September 2012
    Oops yes you're right. I'll sort that out.

    A code review is definitely welcome when you get a chance.
  • edited September 2012
    Will try to do that tonight! :)
  • edited September 2012
    Ok, here we go! Everything else looks pretty good and there isn't much to say. Here are some nitpicking details though. :)

    - Not really a big concern but void ExplodeAt(orxVECTOR position) is doing an unnecessary copy of a vector, you can use a const pointer or a const reference instead.
    - No need to set a Position in your Exploder config as you're overriding it anyway.
    - Are you creating an Exploder every frame or once in a while? I'm asking as you might want to reuse the same object and simply tweak the explosion rate using wave info or by resetting the spawner. Not very important either. :)
  • edited September 2012
    Thanks for those... hmm ok I'll have to trawl through each of these and have a crack.

    The routine only creates an exploder per click. The spawner creates the sub-explosions. But once they die, they're destroyed.
  • edited September 2012
    Ah that's fine then, forget the last comment!
Sign In or Register to comment.