Jump to content

Fast forward particles


Inazuma
 Share

Recommended Posts

Hi eveyone,

Just realised how powerful Phaser's particle system really is. I've set up an emitter to create a continuous 'snow' effect for my game's main menu background. I was wondering though if it was possible to make the particles 'fast forward' a couple of seconds when I load the game.

What I mean is, how can I make it so that when the user switches to the main menu state, the particles are already all over the place as if the emitter had been running for a couple of seconds.

Instead of the state starting off like this:

58e1608a6b498_Screenshot(4).thumb.png.3edd009f0bf02fe9cac6b540005191f1.png

How can I make it start like this, with the particles already everywhere:

58e160942aa9f_Screenshot(3).thumb.png.556726fde03549becbb90e3587f27cb1.png

Thanks for your help!

Link to comment
Share on other sites

Simplest way is just to scatter the particles at the start. It depends a little on how your emitter is set up, but I think you can

  • set the emitter area to the whole game canvas
  • call explode with lots of particles (but not all; save enough for flow, below)
  • set the emitter area normal snowfall (maybe the top edge of the canvas)
  • call flow

If you need a true simulation instead (like if particles have acceleration or drag), that could probably be done.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...