Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF0.91.8??/lighting code ideas
> [Mark and Brian discuss lighting]
> 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.) [...]
>
> There should then be some perception level. Perhaps below 50 it is just
> darkness. [...]
I assume by darkness you mean blackness? If speed weren't an issue graphically
I think we could achieve a fascinating effect by using a gamma graded color map.
Basically for every legal color in a crossfire pixmap (I think there's currently
28 or so?) we allocate say 4 gamma values, then choose the appropriate gamma based
on the light intensity in a given square. If we use a percentage scale we could
break the choice of gamma into quintiles, i.e. 0%-20% intensity is black, 20%-40%
the lowest gamma value, 80%-100% full intensity. This would make it possible for
certain creatures could be nearly invisible in low light conditions if colored
appropriately (like a panther in a dense jungle). Beware the Grue...
> 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.
This touches on another feature of Crossfire which I think could use some
work--namely map scale. I see (primarily) 3 scales in existing maps, which I'll
term building, city and world. These seem to correspond (roughly) to 10, 100,
and 1000 feet per square. Adding a scale attribute to a map would enable
lighting code (and perhaps spell ranges?!) to be adjusted based on where
the user is (i.e. a torch should not light the entire left half of the
continent, but it should light a whole room.) This raises another question...
why is it always daytime in Crossfireland?
--Ken
+------------------------+-------------------------------------+
| Ken Woodruff | "In every jumbled pile of person |
| woodruff@cadence.com | there's a thinking part that |
+------------------------+ wonders what the part that isn't |
| Disclaimer: What tote | thinking isn't thinking of." |
| bag full of $20 bills? | --They Might Be Giants |
+------------------------+-------------------------------------+