particle explosion effect?

justinodunnjustinodunn Member, PRO Posts: 226
edited February 2014 in Tech Support
how to make a particle explosion effect (when actor is touched, trigger particles)? like when you pop a balloon?

Comments

  • DuesDues Member Posts: 1,159
  • Thunder_ChildThunder_Child Member Posts: 2,343
    I don't use the particles behavior. What I do is create an actor called debris.

    I make my debris actor interpolate alpha to 0 in 1 second, move at random 1,359 degrees direction, destroy after 1.25 seconds, and I make the size of actor about 12x12.

    My ship shoots a bullet (actor) at an enemy (actor). I set my bullet actor (When collide or overlap with "enemy", spawn actor "debris"). I spawn about 8 debris actors per collide.

    So...when the bullet hits an enemy, it will spawn 8 debris actors in random directions for 1 second. Nice effect
  • justinodunnjustinodunn Member, PRO Posts: 226
    thats a lot of effort then! haha thanks ill check it out
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited February 2014
    I use particle effects all the time for explosions, works great.
  • justinodunnjustinodunn Member, PRO Posts: 226
    I use particle effects all the time for explosions, works great.
    How do you do that?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Rule:

    when touch is pressed
    timer->for 1 second
    fire your particles

    you need to put the particles in a timer so they only fire off once.

    hope that helps.
  • justinodunnjustinodunn Member, PRO Posts: 226
    Cheers! let me try that :)
  • Thunder_ChildThunder_Child Member Posts: 2,343
    Well, I used an actor for debris because I seemed to have some drag on game using particles...I also like it because I can save that particular setup and can just copy and paste to other game builds. It didnt seem like a lot of work. It took me about 5 minutes to figure it out. 8-}
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    I think I'm just a particles fan, they can be fun to play with. :)
  • quantumsheepquantumsheep Member Posts: 8,188
    Well, I used an actor for debris because I seemed to have some drag on game using particles...I also like it because I can save that particular setup and can just copy and paste to other game builds. It didnt seem like a lot of work. It took me about 5 minutes to figure it out. 8-}
    You should always use what you're comfy/happy with, so if it works for you, that's great!

    This is me using particles in an upcoming game:



    The system I use is to have a 'hit' actor. This actor is non moveable, and there's just one in a scene. So, no spawning and no moving.

    When an alien is hit, a couple of things happen:

    The 'alienhit' variable becomes true.

    When alienhit is true, the enemy that was shot makes its self position x and y = the global variables AlienX and Alien Y.

    Then three things happen to make the explosion itself:

    A) On the 'hit' actor is a rule that says 'When alienhit=true' change self x and self y to AlienX and Alien Y.

    B) Do your particle thing.

    C) make alienhit = 0


    I use particles because they are a nice, cool looking and optimised way of making explosions.

    @Thunder_Child You could even use one of those 'debris' images within the particle system itself - just one - and alter its rotation randomly, for example. That might look good and be less of a burden on your games as you're not using 'spawn'.

    QS =D
  • Thunder_ChildThunder_Child Member Posts: 2,343
    @quantumsheep nice game play. Monochrome...me likes. Ill tinker with particles again. My game has a lot going on. I felt particles made it lag a bit. I will say particles work great for thrust from a ship. B-)
  • quantumsheepquantumsheep Member Posts: 8,188
    edited February 2014
    @quantumsheep nice game play. Monochrome...me likes. Ill tinker with particles again. My game has a lot going on. I felt particles made it lag a bit. I will say particles work great for thrust from a ship. B-)
    Thanks you.

    I'm worried this seems like shameless self promotion - but it's relevant to the topic, honest!

    My game Air Supply - Infinite I feel shows a little of what you can do with particles:



    The explosions, and most importantly the changing backgrounds, are all done with one actor using particles depending on different variable states.

    The images for each particle are about 512x512 - so pretty large. I'm throwing about 6 out in very brief periods, constantly.

    I did consider doing this with just spawning or looping images but it was too much of a drain on the performance.

    It worked for that particular game - I guess the take-away is that if the way you do it works fine, then carry on!

    If you're having performance issues, then using particles is one possible answer!

    QS =D
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    @quantumsheep, love the black and white platformer that looks really cool and fun.
  • quantumsheepquantumsheep Member Posts: 8,188
    edited February 2014
    @quantumsheep, love the black and white platformer that looks really cool and fun.
    Thanks - there's a thread for it here: http://forums.gamesalad.com/discussion/64132/quantumsheep-presents-air-supply-sos-save-our-sheep-coming-soon-ish#latest

    I was only posting to show an example of particle explosions.

    I LOVE them :D

    QS =D

    EDIT: I'd just like to add, that spending a little time with a blank project and the particle behaviour may surprise you. It'll make you smile too!

    Experiment with it - I think you can do some lovely things with it, while also keeping an eye on how your game performs :)
  • Thunder_ChildThunder_Child Member Posts: 2,343
    @quantumsheep

    2 things..

    1. Did you make the game mechanics for Air Supply or is that an adapted "planet hop" template? Love the gameplay video.

    2. Love your screename. I inagine little sheep jumping in and out if existence at a plank scale between parallel d-brane universes. Pretty deep man...pretty deep....
  • quantumsheepquantumsheep Member Posts: 8,188
    @quantumsheep

    2 things..

    1. Did you make the game mechanics for Air Supply or is that an adapted "planet hop" template? Love the gameplay video.
    It was based on @StormyStudios planet hop demo - which is free on his website. All I took was the central idea as the bare bones and expanded on that quite a bit :)
    2. Love your screename. I imagine little sheep jumping in and out if existence at a plank scale between parallel d-brane universes. Pretty deep man...pretty deep....
    I also travel in time!

    But I already told you that next week!

    QS =D
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    lol
  • Thunder_ChildThunder_Child Member Posts: 2,343
    Just think...for each of us....in a parallel universe....we all made Flappy Bird. Hehe. Had to drop Flappy in there somewhere.
  • Thunder_ChildThunder_Child Member Posts: 2,343
    I went full Flappy !
Sign In or Register to comment.