r/howdidtheycodeit • u/oddbawlstudios • Dec 10 '21
How did they code lighting for older games?
Like, I want to know how nintendo handled lights for the zelda games. Surely it wasn't just like a global setting to make the specific rooms dark, and then check if link is holding a light and if he is then light up a specific part using radius, is it?
34
Upvotes
36
u/TehSr0c Dec 10 '21
there was no lighting in the snes games, the game used a different tileset for dark rooms (with saturated colors) then drew black over everything that was supposed to be dark. The lantern radius was simply just a mask where the black wasn't drawn.
4
u/Putnam3145 IndieDev Dec 10 '21
They put a black layer on top and the lamp removes it. Same way the X-ray scope works in Super Metroid.
10
u/obiwac Dec 10 '21
You need to be more specific about which game you're talking about, or no one can be of any help.