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

Re: CF0.91.8??/lighting code ideas



 The idea of arrays for light seems pretty good.  The best would would be
to mirror the line of sight rules - each map has an array associated with it.

 For the light array, you may actually want 2 arrays - one to represent
permanent light sources, and the other to represent non permanent sources.

 For the permanent array, it would be pretty simple - for all squares being
illuminated, set the value to true.

 The non permanet would be similar.  EAch time a light source changes
(either as player moves, or because it burns out), a funciton is called up
update that secondary array.  There are still complexities - what happens
when two players are standing next to each other and move away - that
entire area needs to be recalculated (you just cant set the fringe area
that the light source moves away from to 0's, as somethign else might
be illuminating it.)

 Scale:  This is true.  The problem is what is a decent solution?
Obviously, it should take much longer to walk between towns than shops.
But being multiplayer, you can hardly expect the player to spend 2 hours
to wander between the towns, with him moving once a minute.  A single
player game has the advantage that each time the player moves, the game
to say however minutes passed based on the scale (might take an hour
to move one square in the wilderness, 1 minute to move a space inside
a building..)

 Scale in crossfire certainly isn't realistic.  I just have not yet seen
a good way to handle it.