It looks like you're new here. If you want to get involved, click one of these buttons!
As a continuation of my tilemap experiments, I'm going to try to get some lighting going on it. First test will be to get a simple light like those in the lighting tutorial surrounding my player so I can only see a little bit of the underground world around the player.
I haven't done anything yet other than look over how the lighting tutorial works, but I have a general question about how to handle lights in a large map. So, the character light is easy because in my setup, the character is always at the center of the screen. I'd like to be able to place lanterns in the map to light up various areas. Of course, these light sources may or may not be on the visible part of the map. I think one way to do this is to look at any light sources in the world (these would probably be regular orx objects) and determine if their location is visible on the screen, and if so, update an array of available lights with the appropriate light color, position, radius, etc. This assumes a setup with a static array of lights similar to the tutorial approach. That would limit the number of lights in a scene to whatever size the array is, and would maybe require some prioritization if there are too many light sources in the scene.
Having never tried to do something like that, I'm wondering if that is a sound approach, or is there some more standard way of handling this that makes more sense. Any advice or suggestion is welcome.