• 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 Night windows

V

Vikom

Guest
Hi!
I plan having day/night cycle in my game, so it would be a shame to lack lighting windows at night.
I know the glowing stuff is made by disabling lighting before drawing the model. But what is the best way to make the windows?
So far, I've been using transparent windows and an inner glowing block inside. Since now I use more complicated models, this could be probably achieved by drawing the model once again with size "0.99".
I'd like to avoid this solution because of fear of decreasing FPS.

Is there any better solution?
I've been thinking about a shader that has enabled lighting for all colors except one specific but I'm not sure about the possibility + I have no experience with GMS shaders.
 
W

Wraithious

Guest
One idea would be you could use a white or light colored background_color (or varying it with code), cut out the window pane sections from the house sprite, and make the window panes as objects that adjust their alpha according to day and night.
 
V

Vikom

Guest
Honestly, I don't get it too much.
I think the background color is quite useless in 3D and windows as objects would slow down it even more, wouldn't they?
 
W

Wraithious

Guest
For the window pane objects it would only be 1 object, which would have multiple instances, but it should be small, like 10x20 pixels or something, the 3d method you're using, I would think, would have to scale and stretch them and set the image angle according to the angle and zoom your viewing the house at as you walk around the house I would think, as far as background color I have no idea why you couldn't use that, it would actually make your background images smaller in memory too because you'd cut out the part of the background where the house sits and the background color underneath would take care of your window lighting.
 
Top