Advertisement

lighting in variable layered maps...

Started by August 03, 2000 12:17 PM
-1 comments, last by Zimans 24 years, 4 months ago
This is probably gonna sound more like me ranting than a question, but it''s still sorta a question. Lighting can be a real pain can''t it. But it seems like a feature that just makes things look so much better. I''m currently working on my engine and I''ve come to a sort of wall as to how to handle lighting.. Not so much the implementation, such as vertex lighting or lightmaps etc. but lighting process itself and how it takes the map data into account.. Here''s the rundown as to how the system is setup. (If any of you know anything about how the SNES worked, this will seem similar) In my engine there are four layers of "map". The map itself is created as a four layer map and each layer is loaded into these layers. These "Map layers" can be turned on and off as the game progresses by scripting. (They also offer transparency, so layers with holes will see down to the layer below) Entities exist in each of these layers and can move from layer to layer. With the multiple layers entities can walk "under" stuff, cause it''s in a higher layer. Or a second floor of a building can "appear" because the layer was turned on. Entities also give off light, thats how lighting is done in this system. (plus the maps already pre-set ambient light) My dilema is how to handle the lighting calculations.. (not so much the math, just method) Should Light "fall through" from layer to layer, or should it be contained within the layer the light is located on.. If light falls through, then should ent''s that give off light in a disabled layer still be calced in-case they fall through, or should they be ignored completely.. Or should I ditch lighting completely.. (wich would make things a bit easier, as well as speed up my game since I can just blit tiles vs. drawing triangles with vertex lighting..) Both these approaches have there pros and cons, so I''m at an impasse... The other problem I face is that I need a litlle "inspiration", or help, on a bit of ray-tracing.. The map also contains a "Wall map", wich allows for light sources to hit a wall and stop. (Otherwise you get alot of concentric circles despite walls etc.) So i need to go "out" from the source until I hit a wall.. Right now I just fill the lightmap with values by chuggin through it with a few for loops and calc values. BTW, The "Light map" is an array of color values at tile corners across the screen (32 pixel tiles) used in vertex lighting.. I''m trying to keep my engine open-ended as to it''s methods so that different situations can be handled using the same system. Maybe I''ve answered my own question while ranting, but I''m just looking for the opinion/insight of other developers.. Basically "How would you do it?" or "If you were desiging a game to run on this system, how would you want it to work.." Thx, If you need more information say so and i''ll post. I''m gonna fix a few things in my engine and post a demo, hopefully in the next couple hours.. -Zims

This topic is closed to new replies.

Advertisement