1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

whats the easiest way to create a "sandstorm" effect??

Discussion in 'Programming' started by pixeltroid, Apr 13, 2019.

  1. pixeltroid

    pixeltroid Member

    Jul 23, 2016
    Im talking about an effect like the one in the video starting at 17 seconds...

    I made a suitable image for a sandstorm and set it as a scrolling "foreground"... it looks fine but the problem is that it scolls over my HUD!
  2. dannyjenn

    dannyjenn Member

    Jul 29, 2017
    I think you're on the right track. You just need to draw the HUD after you draw the sandstorm. The easiest way to do that would be to put the HUD object on a layer above whatever layer the sandstorm is on.
    PlayerOne likes this.
  3. samspade

    samspade Member

    Feb 26, 2017
    Basically what dannyjenn said, but I would add that your sandstorm should be in a normal draw event and your HUD should be in a GUI draw event as it will (1) then draw over everything not in the GUI layer (e.g. the game world) by default and (2) you won't have to do a bunch of math to make things follow the view because they're in room space rather than hud space.
    dannyjenn likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice