Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF0.91.8??/lighting code ideas



 I should have a new release out by the end of the week, if not sooner.

 As for light sources:

 There other some other situations:

 1) Case where an indoor space is next to an outdoor space (window or
cave enterance).

 2) Light sources that the character is not carrying (torches on the wall,
for example.)

 A more general approach that would probaly be slower, but more interesting
would be for each space to have a light transfer value.  For example, if
you are in extremely dense bushes, any light source you are carrying isn;t
going to illuminate much (low transfer value.)  But if you are in a room
with white walls, ceiling, and floor, what little light you have will become
useful.  Things like walls would have a transfer value of 0, the
above white room would be 100 (Effectively no light loss), and things that
actually add illumination (torch on the wall) would be handled by some other
special value.

 Open spaces would still have a light value less than 100 (just to take
into account the distance.)  The dense bushes might have a value of 25.

 There should then be some perception level.  Perhaps below 50 it is just
darkness.

 This would also add in uses for varying intensity light sources.  If you are
carrying an arc lamp through those dense bushes, you will still have light
for a few spaces.  But a candle even in some open area won't do you much
good.

 The problem with the above is excecution speed.  It would add a lot of
atmosphere to the game, but might be too slow.  This could perhaps be
quickened up some by stating taht light transferrence values can not change,
and make the same true for any lightsource that is not carried.  In this way,
only when the player moves would all the light need to be updated (and
a call could be made to update the light when the players torch starts
to burn out, for example..)

 --Mark