• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3D How to make one color glow.

V

Vikom

Guest
Hi!
I'm thinking about good ways to make night windows.
I've been thinking about a solution with windows of two colors. The windows of the first color have lighting enabled same as the building has. The windows of second color have the lighting disabled, so they glow.
I think this could be achieved with shaders but I've never been working with them and I have no idea how to do anything with them.

Thanks for any answers.
 
W

Wraithious

Guest
An easy way you could do it without shaders is by following this simple video tutorial on lighting, then when you make your window sprite have 2 sub images, one with your normal window and the next with your night window, and in the draw event of your window object check if it is night, or alternatly if image_single=1, before drawing the lighting effect
 

samspade

Member
Hi!
I'm thinking about good ways to make night windows.
I've been thinking about a solution with windows of two colors. The windows of the first color have lighting enabled same as the building has. The windows of second color have the lighting disabled, so they glow.
I think this could be achieved with shaders but I've never been working with them and I have no idea how to do anything with them.

Thanks for any answers.
I also recommend shaders, but if you want a simpler, but much less flexible, solution you could look through this page and some of the related functions:

http://docs.yoyogames.com/source/da...g/color and blending/draw_set_blend_mode.html
 
V

Vikom

Guest
Thank you!
The blend mode looks like something that could work and not be hard to use.
 
Top