Page 1 of 1
Too much light/darkness just stops working
Posted: Tue Apr 11, 2006 5:25 am
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.
Posted: Tue Apr 11, 2006 10:45 am
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...
Posted: Tue Apr 11, 2006 10:55 am
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?
Posted: Tue Apr 11, 2006 9:03 pm
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.

Posted: Tue Apr 11, 2006 9:04 pm
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!

Posted: Tue Apr 11, 2006 10:59 pm
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.
Posted: Wed Apr 12, 2006 3:45 am
by Adamo
Posted: Thu May 04, 2006 6:15 pm
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).