GML How to make fog or clouds in 2d game without being cpu intensive


Hi Guys,

I am trying to make some 2d fog/clouds like a kind of hurricaine effect in my 2d platformer.

Problem is I've tried many ways, and all are lagging the game on low end devices.

My guess is it's due to the gpu trying to blend the fog sprites over large areas of the app surface, but if I use gpu_set_blendable(0) then it has no transparency, and alpha_testref(128) version looks terrible too.

I tried particles. I even made a system that uses draw_sprite_part so it only covers the app_surface but it still lags the game.

Any ideas welcome?


...Hmmm... ...trying to think! - just to check, have you also maybe tried the basic 'partial image alpha' drawn sprites method, at alpha 1?

ie. already tried drawing at alpha 1, but using reduced alpha image data for the 'fog' source sprite(s) themselves, in case it's possibly better for performance?
Last edited:
How big are the fog sprites? How many fog sprites do you need to be onscreen at the same time? What do you mean by "hurricane effect" - like are we talking a bunch of object instances running some sort of logic and then drawing a ton of small fog sprites, just a big cloud sprite across the screen, or something else? What do you consider to be a low end device?