LIGHTING SYSTEM ON GRIDMAP Lighting system is based on phong illumination model developed in early 1980's :). Light value on a gridmap depends on three values: 1. Ambient light (sun/moon/stars) 2. Diffuse light (torches and such) 3. Specular light (reflected light .. or maybe we don't want to code mirrors :> ) The algorithm for calculating the light (or darkness) intensity is: I = I_ambient + I_diffuse + I_specular Let's make some example for the lighting scale: I = +40: magical brightness +30: bright daylight +20: cloudy weather or indoors +10: torch light 0: twilight (one can barely see) Negative values are total darkness where players are unable to see without being able to see in the dark. We need to have some kind of lighting map in the gridmap code to speed things up. VISIBILITY In the gridmap players may see as far away as has been allowed by the code unless: 1. There is some obstacle that prevents direct line of sight 2. There is some obstacle that reduces the visibility Visibility is assigned some fixed value (100 for example) and is decreased in every grid square light travels through. For example wilderness would reduce the visibility value by 50, which would allow seeing through two squares of wilderness. ++ Dazzt @ 29.03.1998