[SOLVED] Particle System

smithroat

  • *
  • Posts: 37
In my game I want to create a particle system that creates snow particles randomly at the top of the scene and gently pushes them to the ground for my snowball fight game. I want it to snow constantly. Please help.

« Last Edit: February 03, 2013, 12:03:51 am by smithroat »
Smithroat

Meestar

  • Posts: 652
In my game I want to create a particle system that creates snow particles randomly at the top of the scene and gently pushes them to the ground for my snowball fight game. I want it to snow constantly. Please help.

Check out my demo on StencylForge under games.  Its called "Mee - Rain"  Download it and check out the scene behavior.  If you need help modifying it, lemme know.
PM me if you require help.  I'm always glad to help out!

smithroat

  • *
  • Posts: 37
In my game I want to create a particle system that creates snow particles randomly at the top of the scene and gently pushes them to the ground for my snowball fight game. I want it to snow constantly. Please help.

Check out my demo on StencylForge under games.  Its called "Mee - Rain"  Download it and check out the scene behavior.  If you need help modifying it, lemme know.

Hey Dude! It works! but the snow keeps running into the tiles at the top of the scene so it doesn't fall. It just builds up at the top.

« Last Edit: February 02, 2013, 07:05:52 pm by smithroat »
Smithroat

Tuo

  • *
  • Posts: 2469
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Meestar

  • Posts: 652
In my game I want to create a particle system that creates snow particles randomly at the top of the scene and gently pushes them to the ground for my snowball fight game. I want it to snow constantly. Please help.

Check out my demo on StencylForge under games.  Its called "Mee - Rain"  Download it and check out the scene behavior.  If you need help modifying it, lemme know.

Hey Dude! It works! but the snow keeps running into the tiles at the top of the scene so it doesn't fall. It just builds up at the top.
You have to open your snow actor, click on physics, click on the Advanced tab and set Disable Physics to Yes.
PM me if you require help.  I'm always glad to help out!

smithroat

  • *
  • Posts: 37
In my game I want to create a particle system that creates snow particles randomly at the top of the scene and gently pushes them to the ground for my snowball fight game. I want it to snow constantly. Please help.

Check out my demo on StencylForge under games.  Its called "Mee - Rain"  Download it and check out the scene behavior.  If you need help modifying it, lemme know.

Hey Dude! It works! but the snow keeps running into the tiles at the top of the scene so it doesn't fall. It just builds up at the top.
You have to open your snow actor, click on physics, click on the Advanced tab and set Disable Physics to Yes.

I turned off all physics but they still didn't move. I added a "Push [last created actor] [gently] towards (xDir:[0] yDir:[1] at force [5]" block and it worked! But the game dropped from 60fps to 4 fps. How do i fix this? I tried recycling the particles but it only increased fps to 12. I changed the code to where when particles leave screen "kill last created actor". Fps is still averaging at 12 fps.

« Last Edit: February 02, 2013, 09:30:34 pm by smithroat »
Smithroat

Meestar

  • Posts: 652
Post on Forge and I'll see what your doing wrong and help you out however I can.
PM me if you require help.  I'm always glad to help out!

smithroat

  • *
  • Posts: 37
Post on Forge and I'll see what your doing wrong and help you out however I can.

Its in forge under behaviors. just called "Snow".
Smithroat

Meestar

  • Posts: 652
Post on Forge and I'll see what your doing wrong and help you out however I can.

Its in forge under behaviors. just called "Snow".

Okay, first off NEVER use two always in the SAME behavior.  Adds unnecessary lag.  2nd, your kill code should be a separate behavior attached to the snow actor.  A more efficient version is:
Always:
  if (Y of self) > (Scene Height)
     kill self

EDIT: Also, using set y-speed to 1 might be better than slide.

« Last Edit: February 02, 2013, 09:52:39 pm by Meestar »
PM me if you require help.  I'm always glad to help out!

smithroat

  • *
  • Posts: 37
Post on Forge and I'll see what your doing wrong and help you out however I can.

Its in forge under behaviors. just called "Snow".

Okay, first off NEVER use two always in the SAME behavior.  Adds unnecessary lag.  2nd, your kill code should be a separate behavior attached to the snow actor.  A more efficient version is:
Always:
  if (Y of self) > (Scene Height)
     kill self

EDIT: Also, using set y-speed to 1 might be better than slide.

Its just building up at the top now and not killing the snow when leaves screen.
Smithroat

Meestar

  • Posts: 652
Check StencylForge for Mees - Snow.  Set your behaviors up just like those.
PM me if you require help.  I'm always glad to help out!

smithroat

  • *
  • Posts: 37
Check StencylForge for Mees - Snow.  Set your behaviors up just like those.

EDIT: SWEET DUDE! I GOT IT TO WORK!!!! Thanks a lot man!!!! The only problem that still remains is that it's still dropping my fps from 60 to 12.
Smithroat

Meestar

  • Posts: 652
Its important to keep the y speed at about 30, otherwise you will have that lag.  Another way is to use the "Do every x seconds" code instead of the always to create actors, but that's a little less realistic in my opinion.
PM me if you require help.  I'm always glad to help out!

eraser88

  • Posts: 5
hi there , is the snow particle demo game still up . i couldnt find it in stencylforge . thanks