Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Help needed] How to create a screen overlay from a single image?  (Read 1811 times)

0 Members and 1 Guest are viewing this topic.

Dark-Hylian

Silence
[Help needed] How to create a screen overlay fro...
« on: February 21, 2010, 10:37:18 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 370
Using the bottom right image, the cloud overlay, used in Minish Cap, how would one create an overlay like in the game, where the clouds drift slowly over the screen? Or, would there be any easier ways, or other methods that anyone else prefers? If so, I would appreciate your input, as it would help a lot. If anyone has any suggestions or answers, I should be glad to hear them.
Logged
  • Dawning Hour
Re: [Help needed] How to create a screen overlay...
« Reply #1 on: February 22, 2010, 01:23:45 am »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
The most simple of ways(but will give you some graphical issues) is setting one up as one of the 8 backgrounds in a room for Game Maker.  You can apply scrolling in both horizontal and vertical.  However, the only way to get the backgrounds to display is to select the "front" option.  This will put the background in front of EVERYTHING.  Presents a problem for menus and HUDs.

You could also use the background functions found in the GM help file.
Since GM starts backgrounds and tiles in room editing at layer 1000000, simply set the background to a lower number layer such as 999999 for simplicity reasons.

Draw it and in a step event for a controller object, just add/subtract x and y variables according to how fast you want it to scroll.

That is what I can remember.  Have not reinstalled GM7 yet so I can't bee 100% sure.
Logged
  • Super Fan Gamers!

Ventlo

ZOMBIE KILLIN' SPREE
Re: [Help needed] How to create a screen overlay...
« Reply #2 on: February 27, 2010, 11:03:03 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 60
When you are making it as a sprite, you have to set the Opacity lower
making the you able to see the character through your overlay.

P.S. if you press alt + Print Screen
Logged
BLOOD, GORE, LANGUAGE!- Everything a gamer needs... :3

ptd

Re: [Help needed] How to create a screen overlay...
« Reply #3 on: February 28, 2010, 12:11:02 am »
Make an object with -9999 (or whatever puts it under the HUD and above everything else) depth. In the draw event, use draw_sprite_tiled_ext to draw the overlay sprite tiled with a low opacity, and in the step event you can do x-=1; y-=1;, however fast/slow and in whatever direction you want the clouds to drift.

I'm not sure if this'd be an issue, but if having an object travel further and further outside the room uses up an exponential amount of memory, just have something like "if x<128(or whatever the width of the overlay is){x=0}" at the end of the step event's code, and do the same with y and the overlay's height.
Logged

DJvenom

super-sage
Re: [Help needed] How to create a screen overlay...
« Reply #4 on: February 28, 2010, 12:44:55 am »
  • Colbydude was here.
  • *
  • Reputation: +7/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2898
draw_set_blend_mode(bm_add)
draw_background_ext(overlay_fog,x,y,1,1,0,c_white,0.5)
draw_set_blend_mode(bm_normal)

^^ in draw event if you have regged version ^^
Logged
I do art
I ermmm... DID do art
I do art

Ventlo

ZOMBIE KILLIN' SPREE
Re: [Help needed] How to create a screen overlay...
« Reply #5 on: March 01, 2010, 03:13:17 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 60
Quote
draw_set_blend_mode(bm_add)
draw_background_ext(overlay_fog,x,y,1,1,0,c_white,0.5)
draw_set_blend_mode(bm_normal)

^^ in draw event if you have regged version ^^
Make an object with -9999 (or whatever puts it under the HUD and above everything else) depth. In the draw event, use draw_sprite_tiled_ext to draw the overlay sprite tiled with a low opacity, and in the step event you can do x-=1; y-=1;, however fast/slow and in whatever direction you want the clouds to drift.

I'm not sure if this'd be an issue, but if having an object travel further and further outside the room uses up an exponential amount of memory, just have something like "if x<128(or whatever the width of the overlay is){x=0}" at the end of the step event's code, and do the same with y and the overlay's height.
Using the bottom right image, the cloud overlay, used in Minish Cap, how would one create an overlay like in the game, where the clouds drift slowly over the screen? Or, would there be any easier ways, or other methods that anyone else prefers? If so, I would appreciate your input, as it would help a lot. If anyone has any suggestions or answers, I should be glad to hear them.

Perfect!: ;)
Logged
BLOOD, GORE, LANGUAGE!- Everything a gamer needs... :3
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.09 seconds with 49 queries.