Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 18 August 2012 - 06:07 AM
Posted 18 August 2012 - 06:32 AM
Posted 18 August 2012 - 06:42 AM
I think the OP wants something like when you break a few tiles off the cave roof, daylight floods into the cavern (with a direction depending on the time of day) and illuminates it a bit. You'd need to take into account geometry, or at least identify which tiles are "lit" and propagate that property to nearby tiles with a realistic diffusion algorithm (perhaps a sweep algorithm could work here if the world is divided in chunks)
Can't you just change the ambient light value depending on the surrounding tile types? If you walk into a cave, bring the ambient down to (16,16,16 or 32,32,32). You can even adapt that towards the whole game and always interpolate the ambient value based on terrain type and time of day.
Do you have specific cave tiles? Just do a check to see what type of tile the player is standing on. If grass tiles only appear outside, and cave tiles only appear inside a cave with cave roof tiles overhead, then it's an easy assumption to make.
“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”
Posted 18 August 2012 - 06:49 AM
Posted 18 August 2012 - 07:04 AM
Posted 18 August 2012 - 07:20 AM
Edited by dimitri.adamou, 18 August 2012 - 07:21 AM.
Posted 18 August 2012 - 07:49 AM
Edited by riuthamus, 18 August 2012 - 07:56 AM.
Posted 18 August 2012 - 11:05 AM
current project: Roa
Posted 18 August 2012 - 07:49 PM
Posted 18 August 2012 - 08:08 PM
I think I would use a trigger plane at the entrance, which controls the scenes ambience. As you approach the trigger, it activates and records your distance from the plane, as this distance decreases( you approach the entrance) , dim ambient... at a certain point, perhaps when you hit some -r distance from the plane, leave it alone, reverse it on the way out.
Posted 18 August 2012 - 09:25 PM
Posted 18 August 2012 - 11:45 PM
Posted 19 August 2012 - 12:22 AM
Posted 19 August 2012 - 12:01 PM
Posted 21 August 2012 - 02:36 AM
Posted 21 August 2012 - 06:19 PM
Posted 22 August 2012 - 03:14 AM
Posted 23 August 2012 - 10:09 AM
Edited by Lightness1024, 23 August 2012 - 10:44 AM.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.