Up to Main Index                           Up to Journal for October, 2017

                   JOURNAL FOR THURSDAY 19TH OCTOBER, 2017
______________________________________________________________________________

SUBJECT: Some more thoughts on lighting
   DATE: Thu 19 Oct 23:47:57 BST 2017

In my previous journal entry I mentioned the idea of visibility, light and
darkness. Implementing visibility can be either very simple or incredibly
complex.

The Java version of WolfMUD used a very simple light implementation. Locations
by default they were all assumed to be lit areas. Some locations could be
flagged as being dark. A player in a dark, unlit location could see nothing
around them, not even exits. If a player was carrying a light source, lit if
necessary, they could see as normal in a dark location.

The simple implementation had a major flaw. If multiple players were in a dark
location, but only one player had a light source, only the player carrying the
light source could see. I’m surprised nobody reported this slight omission.

A more advanced implementation can be as complex and realistic you want to
develop it. For example, multiple players with torches should illuminate a
location more than a player with a single candle. A slightly glowing item may
go unnoticed in a lit area, but stand out like a sore thumb in an unlit area.
In dim lighting you can see your surroundings but might not have enough light
to read anything. If you are in a dark location and there is an exit to a lit
location you should be able to see that exit if not any others others.
Extending this, should you be able to see the outline of a closed door if you
are in the dark and the room beyond the door is lit?

Then we get into the complexities of inside and outside. When outside is it
day or night, overcast, full moon, raining, misty or foggy? If you are inside
is there a window or door to let light in if you have no other light source?
Is there light outside to be let in? It might be night outside, overcast and
no moon. The environment could also change — a door closed, clouds cover the
sun, rising fog, sun rise, sun set, or an eclipse.

There is also the amount of light available to take into consideration. A
player with a torch should be able to vie a room at a glance, while a player
with a candle may have to scour and inspect the same room. If it’s a bright
sunny day and you light a torch outside it’s not going to get any brighter. If
you are in a dark location with a lit torch and someone else lights a torch
it’s not going to make much difference to the level of lighting but would
increase the volume of light available. Should we take the volume of light
into account? Should a large fire illuminate adjacent locations? Should we
worry about the difference between ambient light and direct light?

Adding lighting can touch many aspects of game play. At the moment I’m not
sure how far I’ll take lighting, but it will be more advanced than the
previous, simple implementation.

Only 12 days left till Halloween… /\oo/\

--
Diddymus


  Up to Main Index                           Up to Journal for October, 2017