----------------------------------------------------------------------------ID: One Step Beyond:892465698
Groups: general
Author: Hanarra [2]				13-Apr-1998 13:08:18

 -- Mudlib/light (LONG:) --
Mudlib/light (LONG:)
I'm glad to see some responses to my note :)

First, I'm not advocating a more 2.4.5 style mudlib, but in fact, wishing
for a mudlib that allows easier interfaces for things.  Yes, 90% of all
the stuff can be derived from standard objects, in all probability, but
it really is the other  10% that makes the place unique and interesting.

For example, the room object is rather nice, though I think a little
too bulky.  Fortunately the use of defining your own functions, or using
closures, makes for easy custom things.  Really, what you want, and pretty
much have is this...
   What it looks like, Details(or vitems), exits, doors, objects
Plus some extras if you choose
   custom daystate messages

Now, here are the things that get complicated.  And this is what caused
problems in the ancient mudlibs.  First, objects had no consitency.
If two people coded a ladder, each ladder would probably not work in 
the other wizards domain.  The same goes for spells and skills.

It is very important to have a master list of all skills, and an easy
way to check for success.  For example,
   this_player() -> CheckSkill( SKILL, DIFFICULTY );
but really thats all you need to know to use skills, obviously guilds
would need to use routines to set/advance/lower the skill levels 
also.  

For magic, its important to have a master list of 'effects', and have
these queryable also, for example
   this_player() -> CheckEffect( FLYING );
   this_player() -> CheckEffect( WATER_BREATHING );

Also, all effects won't neccesarily be caused by a spell, but in this
way things become more consistant.

Some other things would be a master list of certain types of objects,
such as ladders, shovels, etc.  Maybe also have a property for the
material type, such as gold, silver, wood, cloth, etc.  Obviously you
dont need ot have all types, but enough to keep some consitancy between
things.  For example, a fireball might destroy clothing.

But in the end, it is all a matter of design, which is quite different
from a mudlib.  In essense, the mudlib gives the tools to design a system,
but a mudlib by itself is way to generic, you need standards.

Keeping a simple interface to check for magic, skills, effects, etc,
will make coding easier, and provide for much easier use of such
niceties.

Some things I was thinking of, particularily light.

The current light system has basically, a integer level of light in the
current environment.  Depending on what you race MIN/MAX cansee levels
are, this effects when you can see or not.  
However, there are many problems with this system, I believe, because
of the addative effect of light sources.

Lets assume this, light level 1 is standard light level (default).  This
means a human can see.  Lets say a dwarf can see at light level -5.
This just doesnt make much sense, because say you set the light level
in the room to -5 (you want the dwarf to see, but the human needs light).
Now, the human brings in a torch, but lets say the torch only adds 2 light.
Well, that doesnt make much sense, because with a torch you should be able
to see no matter how dark it is.

Now, lets say you bring in 20 torches, now it is far to bright for many
ppl to see, but they are only torches!  This doesnt make sense either.

The problem is, dark is dark, there is no negative dark.  And no matter
how dark it is, one light souce will let you see.  Second, two light 
sources do not really make the entire room twice as bright, neither
do 20 make it 20 times as bright, as far as being able to see goes.
(in essense, you may see more of the room at once, but with one torch
you just need to move about the room to look at individual things)

So, what is the point of racial limits and variable light levels.
Well, the point, as I saw it was to allow some races to see in the dark,
and others to have problems seeing in daylight, etc.

Now, I ponder what this really adds to the game, as torches and sunglasses
seemed to be readily available to fix the problem.  Not only that, what
does it really add, other than an annoyance.

I seem to feel that there should be two variables involved if one really
wants this racial ability.  You have the light system we have now, which
is mostly about light sources.  Then you have an 'ambient' light level
defined to a room.  The ambient light level is basically a non-propogating
default light.  Basically, if the light sources are greater than 1, then
then one can see, if the light sources are 0 or less, you cant.

Now add ambient light, this could be some value between 0 and 100.
Each race would have a min/max ambient light to see.  So take this
for example. (theoretical values)
           MIN  MAX 
   Dwarf   10   70
   Elf     20   90
   Human   30   90

Now, to use this, assume NO LIGHT SOURCES, if the ambient light
level is 0, nobody can see, if it is 10, the dwarf can see, and
if it is 40, all three can see.  If the ambient light is 100, it
is far too bright for anyone, if it is 80, well, its too bright
for the dwarf.

Now, the basic rules is this (in this order). 
   if the ambient level is too high, then that race cant see. 
   if there are no sources of light, then check the minimum
      ambient light to see if that race can see
   if there are sources of light, anyone can see if the sum of the
      light sources is greater than 0.

This allows people to define rooms, and say what the ambient light
level is, which allows for what races can see in the room.  It also
allows the ambient light level to be set for daylight, if it is
too bright.

In reality, however you are only simulating several cases
1) how dim is this dark room, so who can see
2) how do lightsources in the room affect the ability to see
3) how bright is daylight, and who can see in it

In my opinion, the ambient light technique could be used to provide the
best solution, with minimal problems,  when designing a room, you can
set the ambient light to the level you desire, to make it bright/dim
enough for certain races to see by default.  Then, lightsources really
negate all effects of darkness.  It is however a problem reducing the
real bright cases, but this is a downfall of being able to see in the
dark.  In any case, anyone should be able to see in an indoor room that
has light in it.  The only time it should ever be too bright is outdoors,
or with strong magic.  The only time a lightsource should not have
an effect, is if you have negative lightsources in that room.

For most adventuring purposes, you should only need a torch or a 
lantern to see in the dark.  Why take it so much further?

In the end, such as on NF, all the light penalties and advantages
are basically removed with sunglasses and lanterns, so I don't think
it really adds to the game much anyway.


In summary, I am advocating SIMPLE ways to query magic effects, skills
and common type items and materials.  Also, I am asking for some thought
into how complex the light system needs to be, and how having a complex
system enhances the game.

-Hanarra

You told Hanarra: Why shouldn't negative lightsources have effects? Think
   darkness spells.
> [news] Softbyte enters the world.
[general] Softbyte: hi.
tell hanarra Except for the bad additivity of lightsources, and that our light system has an biased scale, where is the big difference in your suggestion?
You told Hanarra: Except for the bad additivity of lightsources, and that our
   light system has an biased scale, where is the big difference in your
   suggestion?
> [general] Thon: hi Softie :).
Hanarra tells you: hmmm, the idea is this
Hanarra tells you: you have light, and ambient light
Hanarra tells you: in the absense of lightsources (pos and neg) a  room has an
   ambient light level
[news] Aldrana leaves the world.
Hanarra tells you: ambient light levels are not propogated
Hanarra tells you: if the light sources are at 0, the ambient light level
   tells if you can see or not
Hanarra tells you: if the ambient light level is high (for daylight, example),
   then you cant see if it is too bright
Hanarra tells you: so mostly, if the ambient light is too bright you cant see
Hanarra tells you: and if there are no lightsources, then the ambient light
   level tells how dim it is, which means you see according to your race
tell hanarra Hmm. I am in a room and am blinded by the too brigh ambient daylight. Somebody comes in with a torch. Am I still blinded by too bright light?
You told Hanarra: Hmm. I am in a room and am blinded by the too brigh ambient
   daylight. Somebody comes in with a torch. Am I still blinded by too bright
   light?
> Hanarra tells you: yes, because basically the ambeint light and lightsources
   are independent of eachother
Hanarra tells you: the ambient light is usually used to determine if its too
   bright, or else to determine what should happen if there are no light
   sources
[general] Softbyte waves.
[news] Softbyte leaves the world.
Hanarra tells you: the problem it intends to correct is that no darkness
   prevents a torch from letting you see (non magical)
Hanarra tells you: and even a match will let you see a room for a limited time
tell hanarra Hmm. I reality, a torch will let you see more than just a match, and 10 torches more than one.
You told Hanarra: Hmm. I reality, a torch will let you see more than just a
   match, and 10 torches more than one.
> Hanarra tells you: yes, but the idea is that with one torch, you may have to
   walk from part to part to see different things
Hanarra tells you: and with 10, you can see all at once, but nevertheless, you
   are still able to see everything
Hanarra tells you: with only one torch
Hanarra tells you: in other words, i can be in my pitch black room, and give
   me a book of matches i can look at anything in the room, i just have to
   move about more
Hanarra tells you: for most purposes, any light source will defeat non magical
   darkness
tell hanarra Hard to simulate here.
You told Hanarra: Hard to simulate here.
> tell hanarra And how to hook in magical darkness?
You told Hanarra: And how to hook in magical darkness?
> Hanarra tells you: negative light sources
Hanarra tells you: negative ambient light
Hanarra tells you: i have not really worked out all the details
tell hanarra Actually, your idea is close to what mica suggested :-)
You told Hanarra: Actually, your idea is close to what mica suggested :-)
> Hanarra tells you: but it allows such things as
Hanarra tells you: you have a dark room, and a dwarf and a human are in it
Hanarra tells you: you have a glowing alter (with amibent light set)
Hanarra tells you: the human can see the altar, but the dwarf can see
   everyting including the orcs hiding in the corners
Hanarra tells you: that is because the altar has an ambient light, so do the
   orcs
Hanarra tells you: but the human cant see the low level ambient light of the
   orcs (it is just heat/light)
Hanarra tells you: but can see the altar
Hanarra tells you: neither can see other stuff in the room, because it has no
   ambient light set
Hanarra tells you: but if anyone lights a torch, all will become apparant
Hanarra tells you: that kind of gives the idea
Hanarra tells you: on the other hand
tell hanarra (copies that into a file, go on)
You told Hanarra: (copies that into a file, go on)
> Hanarra tells you: the nightday sets the light on outdoor rooms
Hanarra tells you: at night, dark elves can see great
Hanarra tells you: sometime after morning, it gets to bright for dark elves
Hanarra tells you: or, you could have moon phases, which at the best moon
   phase, humans can see at night
tell hanarra You realise that your idea is not necessarily simpler than what we have now?
You told Hanarra: You realise that your idea is not necessarily simpler than
   what we have now?
> Hanarra tells you: no its not, but i think it makes it functional
Hanarra tells you: with current system, player just finds a way to adjust
   their visino
Hanarra tells you: in general, rooms just define the ambient light level
Hanarra tells you: (i mean, in usage)
Hanarra tells you: in implementation, its more complexity
Hanarra tells you: but as i see it now, the various racial light levels really
   isnt that effective
Hanarra tells you: due to addative problems
tell hanarra Yeah, no argument from my side to that.
You told Hanarra: Yeah, no argument from my side to that.
> Hanarra tells you: and to simulate light level with just one lightlevel
   variable is next to impossible
tell hanarra You see where the current complexity of the mudlib comes from? :-)
You told Hanarra: You see where the current complexity of the mudlib comes
   from? :-)
> Hanarra tells you: considering the fine level between elves and humans ability
   to see in the dark, with the massive amount of light you get in teh
   daylight
Hanarra tells you: oh yeah, its just i prefer a simpler interface
Hanarra tells you: if that makes sense, i mean, easier to use
Hanarra tells you: i can write a little more on this , but i have to finsih
   some work
tell hanarra Ok. I logged what you told me, so it won't be lost
You told Hanarra: Ok. I logged what you told me, so it won't be lost
> Hanarra tells you: the old 2.4.5 sucked, i admit it, and i couldnt have come
   close to writing a better mudlib than we have
