[Fixed for V0.44] Darkness Bug

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

[Fixed for V0.44] Darkness Bug

Post by Paradak »

Hi!

Since this is my first post, I would like to thank and congratulate George Gilbert, and all others whose work or input have made a difference, on a superb job! I really like RTC!

Now, here is the bug I found:

When casting the darkness spell several times until things get REALLY dark, you can't seem to gain back at all light by casting the light spell.

"Practicing" different types of magic, I found myself casting something like 30 times the darkness spells at full power. Things were dark way before hitting the 30 mark. Then, I started practicing both the light and the torch spells. After casting both for HUNDREDS of times, the screen was still DARK!

I was forced to restart from another saved game. Ack!

At the very LEAST, casting the light spell should first "attack" darkness, and THEN add to light, and both spells should be as strong as each other.

Personally, I *MUCH* preferred how light was dealt with in the original game: light should not be "infinitely" cumulative. But I'll post how lighting could (should?) be dealt with on the Suggestions thread.


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:

Re: Darkness Bug

Post by George Gilbert »

Paradak wrote:At the very LEAST, casting the light spell should first "attack" darkness, and THEN add to light
It already does this.
Paradak wrote:, and both spells should be as strong as each other.
They already are.
Paradak wrote:Personally, I *MUCH* preferred how light was dealt with in the original game: light should not be "infinitely" cumulative.
It isn't!

The light model in RTC works as a square power law - brightness = sqrt(cumulative spell powers). The cumulative spell powers have a maximum value. The shading applied to the screen is the linear sum of lightness - darkness.

The problem is that you have cast so many darkness spells in a row, you'll have to cast thousands to get a finite difference between the two (square rooted) values again. This is best seen with some example values: Lets say that the power of a light spell is 100, darkness is at light level 0 and "normal" dungeon light is at light level 100. The maximum cumulative spell power is 6400.

If you cast 30 darkness spells, then the cumulative spell power is 3000, and the negative component to the displayed light is therefore sqrt(3000) = 54. Therefore, to restore "normal" brightness, you need a positive light component of 154 - which works out at a required cumulative spell power of 356000...i.e. 3560 full power light spells (which of course, you'll never get to because the maximum is 64).

Even if you removed the maximum limit, it would still cause problems, because as the darkness wore off, you'd be left with a huge positive light component and the screen would "white-out" requiring you to cast more darkness spells to keep it in balance and so on and so forth.

The overall point is, it's a bit daft to play around with extreme values for the light level...practice your spell casting on something else :wink:
Paradak
Novice
Posts: 19
Joined: Thu Sep 21, 2006 5:16 pm
Location: Montréal, Québec, Canada

Post by Paradak »

Yes, of course, that is what I did afterwards. ruined my game a bit, of course.

The point is that this needs a fix not for the experienced player, but for the random player. What you're telling me is essentially the same as an MMORPG designer being told by some of its players "When my character move close to a wall and does X he gets stuck in the wall!" and getting the shaft-answer "Well, don't do X anymore when you'remove close to a wall" instead of fixing the weakness in the feature. I know your time is limited, I admire you for all the incredible work you've done here, Im just trying to help.

But telling me its daft is a bit dractic I think.

Given that:

a) Players know that they must practice their DIFFERENT skills to improve.
b) There are strong hints that there are "hidden" skills more varied that "just any wizard action".

Then it stands to reason that a player wanting to practice those hidden skills will make some guesswork about the CATEGORIES of skills. The game doesn't explicitly says which. only web sites. For example, a priest making standard potions doesn't pratice the same skill as a priest casting shield spells. So, is it so hard to believe that some players will think that LIGHT/DARKNESS is a CATEGORY of magic, and thus a separate skill to train? Especially those players that want to "do everything" yet "don't go check out every detail on the web sites and do it themselves instead". That is not that far fetched.

There are a LOT of possible fixes for this "bug". Saying it is not a bug doesn't reduce its status, but, nonetheless, it is so minor that I agree that fixing it is not a priority.

In any case, personally I'd fix it like this:

Have only a single pool for lighting, not darkness.

Casting darkness simply attacks the lightness pool at a fixed illumination rate. i.e. If the on-screen illumination is X times more bright (in light level, not in actual pixel color, of course) than a given threshold (say, torch illumination), then 1 unit power of darkness removes X CUBED times as much light units power from the light pool, otherwise is stays linear and removes 1 power unit per power unit basis. This way, removing too much light from a witheout condition is much more easier. The more bright it is, the easier it is to tone it back down. And the light pool can't go under zero. So its VERY easy to get back up from a "screen is way too dark" condition. The only "problem" from my approach is that you lose some of the "fine gradation" between torch light and "total darkness". Not a big deal...

Anyway, just my 2 cents...

Thanks, and again superb work!

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:

Re: Darkness Bug

Post by George Gilbert »

George Gilbert wrote:The light model in RTC works as a square power law - brightness = sqrt(cumulative spell powers). The cumulative spell powers have a maximum value. The shading applied to the screen is the linear sum of lightness - darkness.
OK, I've changed this around slightly so that now it's

brightness = sqrt(cumulative lightness - cumulative darkness)

i.e. the sum occurs before the power law is applied rather than after. Specifically, this means that the lighting model isn't changed if there's only light, but is much more sensible if there's both light and dark spells active at the same time.
Paradak
Novice
Posts: 19
Joined: Thu Sep 21, 2006 5:16 pm
Location: Montréal, Québec, Canada

Post by Paradak »

Thanks! Extremely simple and rather effective solution. Why did I write all that text when one line would have been enough? lol!

Good day!

Pax
---
L'imagination, c'est la mémoire du possible.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

Paradak wrote:Why did I write all that text when one line would have been enough?
tu ne penserais pas un peu trop en français, par hasard ? ;)
Post Reply