Too much light/darkness just stops working

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Too much light/darkness just stops working

Post by Sophia »

I was trying to create a "strobing" light effect, by rapidly using light and darkness action wallitems but, after a while, they just stopped having a effect. At this point, having party members casting light or darkness did nothing, too.

The screen was frozen at the standard "fullbright" 100-200% illumination level so I don't think it was an overrun/underrun of the acceptable range for light levels.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

This isn't actually a bug, it's working exactly as designed - the key question is how to create the strobing effect and/or whether the light model should be changed!

What is happening is that there are separate measures for the level for "brightness" and "darkness". The sum of these gives the actual screen brightness.

By casting lots of light spells and lots of dark spells very quickly what you're doing is maxing out the bright and dark values which gives a sum in the middle - hence the view appearing to be locked at a single brightness.

So - why do I have two separate measures of light / dark. Honestly I can't remember, but there must be a good reason as early versions of RTC did only have a single light level, so presumably it was a fix to a bug. I'll have a look through the forum archives to see if I can find the problem...
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Aswell as strobing, woukld the more passive effect of flickering light (say getting close to a fire or torch bracket) find the same?

Could we have a floor object_light which can either brighten up to a certain value (absolute), add a light level (relative) or cycle the light between two values?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

George Gilbert wrote:This isn't actually a bug, it's working exactly as designed - the key question is how to create the strobing effect and/or whether the light model should be changed!
I think it probably should be changed if there's no way to create the effect at present. Maybe an action that directly sets the lightlevel (like when you're specifying a level's data)-- or two that directly set the light and darkness levels, either way.
George Gilbert wrote:So - why do I have two separate measures of light / dark. Honestly I can't remember, but there must be a good reason
Don't be so sure there's a good reason. I always find myself in for a fair bit of head-scratching when going through old code-- "Why did I do it that way?" I think it happens to all of us. :wink:
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

beowuuf wrote:Could we have a floor object_light which can either brighten up to a certain value (absolute), add a light level (relative) or cycle the light between two values?
A new action would be able to duplicate all this, and, do more besides! :D
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

I remember a topic about lowering temporarily the level of light (when getting near a certain monster or tile). This temporary darkness should have been independent of the light level. Maybe it explains the two systems of light level in RTC.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

read about possible light changes in CSBwin:
http://www.dungeon-master.com/forum/vie ... ght=#58342
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

For V0.38 I've added two new actions ACTION_LIGHT_AMBIENT and ACTION_DARK_AMBIENT - these set an absolute value for the background light level (i.e. perform the action twice and only the second one counts).

Note that this is just one of the components that goes into calculating the displayed light level (i.e. torches / spells etc will be added onto the ambient value) so if you want to set the light level to be maxed out, in either direction, you'll have to set the strength to be huge (and then back to 0 again when you're finished with the effect).

This should allow you to do the strobing (amongst other effects).
Post Reply