Alternatives to particles for weather?

  • I've got an autorunner game and i'm using particles to create rain. When testing my game on mobile, it runs OK but there is some stuttering going on. I then tested my game after removing the particles and it seemed to improve performance somewhat.

    I've read the article on here regarding particles and it's not really recommended to use particles on mobile phones due to frame rate being limited as it is.

    So i was wondering if there is another way round to creating a weather effect without affecting the frame rate as much? I'd appriciate any help on this.

    I've provided a capx with the particle effect i'm using in my game if that helps.

    Thanks

  • Use a tiled background object filled with a repeating pattern...a tile that looks like rain or snow.. then cover the whole screen with it and use events to make it scroll and loop on itself to create an infinite loop of falling rain or snow... then if need be, use looping animated sprites for an effect of rain hitting the floor...but not too many of them..

    The important thing=no collision detection and not a ton of objects to keep track of.

    I hope this helps,

    Cheers,

    Mike Parent

  • You could do it like this

  • Thanks for the replies. I'm a little confused on your suggestion, mainly because i'm a beginner still and i'm learning as i go along. Could you show me an example of what you're refering to?

    Lordshiva1948 Thanks for the example, it actually looks pretty cool, as if the rain drops are on the screen. It's a little too much for my game though I'm just looking for something simple like my example with particles. Would you be able to provide an example replicating the rain in my capx?

  • What Brashmonkey meant was a single "tiled background" object put over the screen with a looping animation of raindrops done maybe in Photoshop or After Effects. It could be a bit more work to do than using a particle system, but wouldn't require much memory to render.

  • Will this do?

  • , never thought about a solution like that one. I was having the same trouble. Using particles for rain was making FPS drop to 20. I'm going to try your method.

    Cheers

  • Lordshiva1948 That example uses particles, i'm looking to avoid using that Thanks for taking the time to help out though.

    Hasuak Thanks, it's bit more clear (not that there was anything wrong with Brashmonkey's explanation). Haven't had a chance to try that but will give it a go and see how i get on.

    Looking through some of the tutorials, i have found one thats helped.

    scirra.com/tutorials/767/animated-falling-snowflakes-with-sine-behavior

    I've managed to create rain with this tutorial (thanks Bl4ckSh33p) even though it's for snow, I've tweaked it for rain.

    I've provided a capx of what i've done, is this OK to replace particles in terms of improving perfomance and memory usage?

    Thanks

  • Just an update, after testing the rain on my game, it starts to stutter quite badly for me, and this is while testing on my PC browser. It never used to stutter like that when testing with particles so I'm presuming that the way I've done it in the capx I just posted isn't a good way to go about it...

  • This should do it I hope

  • Lordshiva1948 Thanks, this will work great

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Most welcome. We are here to help so, no problem anytime

  • Try this example.

    Sorry for my english, but i hope, you understand my comments in the .capx

  • Cherico Thanks for the capx. Comments are great, really helped out

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)