[Done for V0.45] Better lighting management?

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
Paradak
Novice
Posts: 19
Joined: Thu Sep 21, 2006 5:16 pm
Location: Montréal, Québec, Canada

[Done for V0.45] Better lighting management?

Post by Paradak »

Hi GG and thanks for your great game engine!

How light is handled in RTC doesn't provide a good "gameplay" experience, for the following reasons:

a) Why have two spells in the game, Torch and Light, when one is enough, simply by casting it one more time? In the original game, Light was useful because, once you had it, you finally has access to great lighting conditions. Personally, I like to play games with brightness hypered to the roof, but I also like the idea that you do not immediately gain such things. With currently the effect of Torch stackable to that of the Light spell, this second spell becomes redudant/useless to the game.

In short: I liked that Torch did put a "limit" on the available lighting. I also liked that you had to take care of keeping enough mana in reserve in case your magic torch went out, because you could not cast Torch a tens of times in advance to make its duration hours instead of minutes.

b) The lighting spells durations become way too long BECAUSE the effects are fully stackable. I can "train for a while" and can EASILY cast Torch 20 times with a single mana-sleep-cycle of my 4 heroes and thus have enough lighting to last nearly the ENTIRE GAME. IMHO, this is the equivalent of completely removing that part of the game (i.e. handling your lighting).

c) Stacking of spells should not be infinite. After all, when you have a helaing potion in hand, casting more times the healing potion spell doesn't make a super-duper-potion, right? I think handling the lighting in the same way would provide a better gameplay experience.

*** So, I suggest handling lighting could be dealt with in this manner instead:

First, what the following questions must be answered:

(A) Is the DARKNESS spell to be really useful to the party in this game?

The answer should be yes, of course. Otherwise it is simply just bad game design to put in a useless game element in a game!

Given the nature of the darkness spell, it makes traveling in the dungeon really hard, thus the only way to make that spell useful is if it makes the party "less detectable" by the enemies. Enough so to justify the party being unable to see the walls!

Thus, the "Sight" and "Detection" ranges of most creatures should be directly affected by the lighting conditions. Under a certain light-level threshold, sight and detection ranges should start degrading, let's say linearly and by rounding up (to keep things simple) (but keep it to a minimum of one -- the spell is not "invisibility").

For example, if lighting is currently at 75% of the minimum threshold, and a monster detects at 5 squares, the monster will now "LIGHT_ADJUSTED_"detect at a range of 3.75 squares instead, rounded up to 4 squares.

In combat in darkness, the party is much less effective, bu so should be most monsters. The main advantage of fightng in darkness is thus that the player has MORE TIME TO REACT TO EVENTS (combat seemingly slows down). Also, mana regenerates a bit, so lengthening some battles will help in some situations. Amd magic is unaffected, thus a party with magic will have the upper hand against melee-only monsters. However, some monsters should have LOW-LIGHT VISION and/or even DARKVISION attributes so casting Darkness isn't always a good idea. But most monsters should rely on normal sight just like the party does.

All of this is quite simple to program and implement with only a few lines of code. In the lines of code where monsters try to see/detect the party, simply split "Sight Range" and "Dectetion Ranges" variables into Creature_Sight_Range, Light-Adjusted_Sight-Range, Creature_Detection_Range, and Light-Adjusted_Detection-Range variables, and determine Visibility_Effectiveness as a fraction of Current_Lighting_Level divided by Minimum Threshold, then if above 1.0 set to 1.0, then use this fraction between 0.0 and 1.0 to compute Current Lighting_ Values from Creature_ values and this fraction, rounding up to an integer. Adding LOW-LIGHT and DARK VISION attributes special qualties to monsters can be done later.


(B) How hard is it to go from light to darkness and vice-versa?

Usually, good gameplay should allow for the following:

- When a spell is cast, it is because the player needs it RIGHT NOW.
- A player controls his spells, so theoretically could be allowed to '"dismiss" his own magic in order to do the opposite. Dismissing would be inherently a given if the player tries to cast a spell effect which goes contrary to a previously cast spell.

According to this, Torch/Light magic should GREATLY ATTACK Darkness magic, and vice-versa. If I cast Light 10 times, it should not take 10 castings of Darkness to attain dark conditions, AND VICE-VERSA.


(C) What is the difference exactly between a LO version and a MON version of the same lighing spell?

For gameplay reasons, I recommend making the difference in light intensity between a LO Torch and a MON Torch relatively small. Otherwise, a game such as Dungeon Master where the party stays low level for a long time will tend to have "not enough lighting" at first, and when the party is high enough level to cast OH IR RA, the apparent lighting difference between using the Torch and the Light spell would not be sufficient to warrant its use.

Also, since the Light spell is already a "more powerful version of lighting", it also should not have any (if at all) difference between its LO and MON light intensity values.

The main difference, then, in the powers are in the DURATION of the spell effects. Durations should be linear accotrding to the power rune: it is not more cost effective to cast the biggest spell (duration-wise), it just saves on clicking for repeated castings.

Also, contrary to the original DM, the light spell should last long enough to be cost-effective useful (even if it costs more than Torch, its cost-per-minute-of-gaming should not be prohibitive).


(D) Just what kind of lighting stacking do we want?

Here is where opinions may diverge greatly.

Personnally, I'd make it so that casting a lighting spell stays simple enough to be programmable without pullng one's hair out, but create a behavior that keeps the "must manage lighting" element clearly inside the game (rather than during a one-shot wizard training session with one of the easiest sells), while making the player clearly see what happens as soon as he casts such spells. Thus, the super-simple-to-code "ine variable pool of lighting", as it currently seems to be defined in RTC, is simply not appropriate.

Keeping each casting of a lighting spell as a separate entity is also not very appropriate, because such list of objects to parse at every moment could become very long and bog the game down.



*** PROPOSED:

When cast, a light spell generates light at a constant rate, until such time X where its emitted light suddenly reduces at a relatively fast pace.

Like this:

(X axis is time, Y axis is light power)

--------------
--
--
--

Since constantly seeing the light go down in intensity is something that most player find bothersome i.e. the point of recast is not DURING the slope, but bery near the BEGINNING of the slope, then it is useless to make the slope vey long. It need be just long enough to let the player "feel that its light is going out" and "escape from danger to find a safe spot". Thus, the slope going from 100% to 0% should occur within seconds, not minutes. You play, when SUDDENLY' you see a slight light degradation, followed a few second later by another, and another, etc. Not the "you see a slight light degradation, and you can play for several minutes more before seeing another". The way a Torch or magical light should behave should be more like a candle: it generates constant light for a LONG time, then it starts to recuces its light and goes out quickly when its '"fuel" is fully expended.

Note that the torch object should be a bit more like this, too (but not as much as the spells).


eg. Instead of
Current: 100% = 1 minute, 75% = 2nd minute, 50% = 3rd minute, etc, 25% = 4th minute, out = 5th minute.
A Torch object should be more:
100% = 1-2-3rd minutes. 75% = 4th minute 50% = 4minute 20 seconds, 25% = last 20 seconds.
i.e. full light for most of the duration, then linear diminution over remaining time.
And for a Torch spell:
100% = first 4 minutes 45 seconds
75%-50%-25% = each 5 seconds for last 15 seconds.

(ok, I don't have the exact time durations values but you get the idea).


These things are very simple to code with a duration and a "max light" threshold.

So for example (using arbitrary values: 100% = enough light to feel comfortable, 50% = this is a bit too dark to be really useful, 200% = really bright, and 300% = way too bright).

Base Intensity Duration
LO Torch = 75% 2 minute
MON Torch = 125% 12 minutes
LO Light = 175% 1 minute
MON Light = 225% 6 minutes

Once the dration is elapsed, the intensity diminishes at a good clip, lets say for example - 1% per second.

(linear interpolaton for other spell powers)

Now, the "fun and hard" part is when "spell stacking" comes in.

Casting more spells should provide more light, right?
Yes, but only up to a certain point.

Casting more spells should provide light for longer, right?
Maybe, maybe not!

If we want the player to "manage" ihs light in-game, then the answer is more "no" than "yes".

But how can we compute this "easily"?

The proposed "solution":

Keep a list of light sources. Each has a given lighting power.
The effective lighting value is simply the square root of that power.
(try it with real torches or check your physics on the web!).

Casting darkness "destroys" a LOT of torch/light sources.

The clincher, is how to prevent the list from becoming too long, so as not to slow down the game?

Simply limit the number of active light source to some fixed low-number Any extra light source cast is then compared to the other ones, using the following formula: INTENSITY times SQRT OF REMAINING DURATION, and the "weakest energy" spell is removed from the list (or other appropriate equation). Note that remaining duration is "less important" than intensity.

Thus, a player may cast 4 LO torches to get double-the-light, but he won't get both x4 the light and x4 the duration at the same time (which is what occur with a unique "light pool" variable).

Also, I'd strongly consider that casting Torch or Light dispels all active Darkness, and vice-versa. Casting light after casting darkness and still not seeing anything is very frustrating, especially when those spells are cast in emergency situations. The player should be able to use these spells proactively during combat to escape, flee or avoid detection altogether, or to quickly bring the light back up to see just what the heck is attacking him. So a single LO TORCH dispelling all previously cast darkness spells could make sense, at least in a gameplay fashion.


Finally, in the event that light spells don't stack, make sure the durations are USEFUL to prevent having to cast the spells all the time, which also can be very frustrating.

I wonder myself, just HOW DID THE ORIGINAL ST GAME HANDLED LIGHT?


Optionally, this would require some extra code but would be well worth it:

- Make the TORCH item not light automatically but require a new item:
the LIGHTER The Light Torch command is used to light up an unlit torch held in the other hand. Putting the torch on the ground on in any inventory slot except a hand unlights it.
- Castingt the Torch spell requires that the character casting the spell having an unlit TORCH IN HAND (even a burnt-out torch). That torch gains a blue-fire aura just like a real torch, and works the same way.

Or, a bit more simple to code:
- Casting the Torch spell requires that the character casting the spell having a TORCH IN HAND (even a burnt-out torch). Whatever fire the torch had is overriden by the magical torch spell. That torch gains a blue-fire aura just like a real torch, and works the same way (if can even be removed and put back, albeit the spell's duration continues to elapse even when in inventory). When the magic torch goes out, after a lshort interval if the torch still has any capability it lits back up by itself (yellow fire).

This variant makes the torch spell useful, but require a character to use up one hand to light the party! Stacking torches for more light is possible, but require even more hands.

Pax.
---
L'imagination, c'est la mémoire du possible.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Wow! That's a hell of a first post! Welcome to the forums. :)

I don't have time to read it all now as I'm at work, but you should be aware that this discussion has been made several times and the current model is a compromise that most people are happy with. While you have some good points in there, a lot of what you've written is not new as it's all been discussed in other threads, so please get into the habit of searching the forums for similar topics before posting. Thanks.
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Post by Daecon »

The answer should be yes, of course. Otherwise it is simply just bad game design to put in a useless game element in a game!
GOR rune, anyone? :roll:
Child of Darkness,
Child of Light,
Cast your Influence,
Cast your Might!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Yes, please be aware that the current lighting model has gone through lots of tweaks, and even a tiny suggestion of 'oh, it's too bright too dark' creates several versions until people stop complaining - I shudder to think of the fun and backwards compatibility (people will have stocked their dungeon according to old light models)
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Yes, but with the evolution of RTC, it should be more of a customizable thing than a rigid rule, now, don't you agree ?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

It is just now without GG changing the core code - you only have torches and illuminet and the light spells that affect light - the dungeon creator themselves can interrupt and mess around with these themselves for a custome dungeon where you can stack or don't and compare light intensity with relays and alter the light level yourself accordingly, and deminish it accordingly, and create basically if you have the patience a new cool light system without potentially throwing up compaints and backwards compatibility issues for generations of RTC to come just when everyone seems happy again with the light model as it stands
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Hum, yeah, but it's very awkard to do a complete light system by triggering/relaying/and all.
Basically if you want a local light system you need to create counters EVERYWHERE, no ?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Counters everywhere? i don't think so, I think you could affect the light level as it stands easily enough

And it's awkward but rewarding for one person to create a complete light system or their own dungeon, it's very awkward and throws up lots of potential problems and can ruin everyone's fun for GG to mess around with the lighting system of the engine ... remember the whining 'i can't play this' of the original light level white out? And that's been a simple thing... anywya, i won't bother to comment again until i have read the first post properly...it's just a long post can't mean a simple change i am sure, so i was just pointing out the serious implications of knocking the engine for a lot of generations when no one else has complained about the light level system except when GG has infact deviated from the DM model (too much light, etc)
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Sorry, I meant to put light sources almost every where and keep control over their light level.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

You can increment, decrement and absolutely set the level's light level...so as long as you have disabled every effect that plays with this, you can affect and reset the light level all though relays and actions and keep an few global counters for power and duration. Then it is up to some feedback relays and mechanics to keep querying the system, and of course have interrupts to affect your power and duration counters, wiyth whatever affects that produces.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

a) Why have two spells in the game, Torch and Light, when one is enough,

Because of training issues. Torch trains casting fireball and light spell trains casting lightning bolts and some other spells, and lasts longer.
----------------------------------------------
Given the nature of the darkness spell, it makes traveling in the dungeon really hard, thus the only way to make that spell useful is if it makes the party "less detectable" by the enemies. Enough so to justify the party being unable to see the walls!

What is the difference of darkness spell and normal darkness??
Is it needed? I personally think darkness is pretty useless apart
from training priest special skill maybe.. It is no fun running around
in darkness...
-----------------------------------------------------------------
*** PROPOSED:

When cast, a light spell generates light at a constant rate, until such time X where its emitted light suddenly reduces at a relatively fast pace.

Like this:

(X axis is time, Y axis is light power)

--------------
--
--
--

I would suggest you use the code tags (alt+c)

Code: Select all

 else your graph 
   gets 
        mixed 
                  up !!
!!

---------------------------------------------------------------------------
I wonder myself, just HOW DID THE ORIGINAL ST GAME HANDLED LIGHT?
search here:
http://www.dianneandpaul.net/CSBwin/documentation/
(it seems to be removed for I could not find it)
or here:
http://dmweb.free.fr/
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7515
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Post by Ameena »

It wouldn't make a great deal of sense for a lack of light to affect the monsters' ability to see you - living in constant darkness, as they do, you'd think that adding light would detract from their vision, not removing it...
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Lunever has already detailed a long post of having various awarenesses, so until these are implemented then having the light affect anything makes no sense - RTC just has a monster perceive you or not, with no flavour to it
Paradak
Novice
Posts: 19
Joined: Thu Sep 21, 2006 5:16 pm
Location: Montréal, Québec, Canada

Post by Paradak »

Thank you all for your feedback.

Sorry for my graph that didn't turn out as I expected (didn't know spaces would get removed like that).

I meant more like this:

*******.........
...........**.......
..............**....
.................**.


If only ONE thing should be corrcted, then, it is this one:

When a player makes the mistake of casting DARKNESS repeatedly as a way to 'train', let's say 20 times, then he seem to be STUCK INTO FULL DARKNESS afterwards, even after having cast the LIGHT spell hundreds of times.

Since the game is:

a) not very playable in darkness.
b) not giving any real bonus for being in darkness.
c) not making the monsters use the DARKNESS spell anyway.

The first casting of LIGHT should immediately dismiss all DARKNESS. TRhe second casting of light, then, would have normal effects.

Simlarly, the first casting of DARKNESS would dimiss all TORCH and LIGHT spells (or at least a lot of them), so if you spend time training LIGHT then you wouldn't need to cast DARKNESS 10 times before seeing a visible effect.

It's just a minor gameplay issue that will only affect , but it ruined my game and I had to start over from a save game that was WAYYY before (I don't save too often) (I suppose I could have left my computer on for the whole weekeed, too, maybe the light would have gone back to normal by them, but after casting DARKNESS about 30 times (which is only a couple of magical training sessions and LIGHT about 400 times to try to get out of the situation, I didn't want to spend about 2 bucks of electricity in order to find if that would be the case).

Pax
---
L'imagination, c'est la mémoire du possible.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Added configurable minimum / maximum light levels for V0.45

(which means...finally (!)...that the Original DM dungeon has a capped maximum light level)
User avatar
Lunever
Grand Druid
Posts: 2712
Joined: Thu Feb 14, 2002 4:47 pm

Post by Lunever »

Great many thanks!
Parting is all we know from Heaven, and all we need of hell.
Post Reply