GMS 2.3+ Top Down Tile Lighting

Im working on a turn-based rpg and im planning on doing a lighting system but still haven't figured out how I'm going to do that. Is there anyway to do lighting from tiles? I could make objects and do the lighting from that but it would make stuff like cliffs a little complicated?
 
Just to be sure: do you mean something like this:

That could possibly work for what im doing, but I was thinking just like general atmospheric lighting. Like cliffs and buildings leaving shadows or torchlight or a day/night/season cycle. I guess I'm asking if there's a way to treat a tileset as an object?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
That could possibly work for what im doing, but I was thinking just like general atmospheric lighting. Like cliffs and buildings leaving shadows or torchlight or a day/night/season cycle. I guess I'm asking if there's a way to treat a tileset as an object?
Yes it's possible. My lighting engine Aura can use tiles to generate shadows. Basically, you can use the layer tilemap functions to get positions of "filled" tiles and then use that to calculate what's blocking and what's empty for your lighting. Aura uses this information to generate shadow polygons that are then drawn to a surface and merged with the lighting (which is also drawn to a surface). The combined output is drawn to yet another surface which is then drawn to the screen. I believe the member @Jobo has a free lighting asset that works on the same principle, but I don't know if it's adapted for tiles and not objects... should be fairly easy to fix it for tiles though.
 
Yes it's possible. My lighting engine Aura can use tiles to generate shadows. Basically, you can use the layer tilemap functions to get positions of "filled" tiles and then use that to calculate what's blocking and what's empty for your lighting. Aura uses this information to generate shadow polygons that are then drawn to a surface and merged with the lighting (which is also drawn to a surface). The combined output is drawn to yet another surface which is then drawn to the screen. I believe the member @Jobo has a free lighting asset that works on the same principle, but I don't know if it's adapted for tiles and not objects... should be fairly easy to fix it for tiles though.
That sounds great! I'll try that out !
 
Top