If you set area luminosity to 0, then place a bunch of luminous objects around to light the environment, walking around the environment produces very sketchy luminosity, with turfs flicking in and out of being visible arbitrarily.
Numbered Steps to Reproduce Problem:
1. Set default area luminosity = 0
2. Create objects with luminosity = 2 or greater
3. Place objects around a map on turfs within the area
4. Walk around on these turfs.
You'll notice turfs are sometimes illuminated and sometimes not for no particular reason. Updates each time you move, consistently correctly or incorrectly lighting turfs depending on where the player mob is standing.
Code Snippet (if applicable) to Reproduce Problem:
area
luminosity = 0 // Set to 0 for dark world
obj/device/sensor
var/const/LUMINOSITY_CAST_BY_SENSOR = 4
var/const/MAXIMUM_SENSOR_ENERGY = 10
var/const/ENERGY_DRAINED_PER_10_MS = 1
// For optimal efficiency, set at MAXIMUM_SENSOR_ENERGY * (ENERGY_DRAINED_PER_10_MS*10)
var/const/FREQUENCY_OF_SENSOR_POWER_CHECK_IN_MS = 100
name = "Sensor"
desc = "Sensors operate like lights, illuminating the area, for a relatively low energy cost."
icon_state = "sensor_inactive"
luminosity = 0
density = 0
New(var/location, var/initialEnergy)
maxEnergy = MAXIMUM_SENSOR_ENERGY
..(location, initialEnergy)
UpdateAppearance()
if (IsActivated())
if (icon_state == "sensor_inactive")
overlays.Add(GLOBAL_SENSOR_LIT_OVERLAY)
icon_state = "sensor_active"
flick("sensor_activating",src)
luminosity = LUMINOSITY_CAST_BY_SENSOR
else
if (icon_state == "sensor_active")
overlays.Remove(GLOBAL_SENSOR_LIT_OVERLAY)
icon_state = "sensor_inactive"
flick("sensor_deactivating",src)
luminosity = 0
Expected Results:
I expect to see turfs illuminated whenever something capable of casting luminosity is showing on them, whenever that turf is in view, regardless of whether or not the luminous object illuminating that turf is visible to the player.
Actual Results:
Turfs are not consistently lighted by luminous objects.
Does the problem occur:
Every time? Or how often?: Vast majority of cases, sometimes you'll have a lit hall that will look fine, larger open places seem more frequently.
In other games?: Any game I've been developing, anyway.
In other user accounts?: N/A.
On other computers?: N/A.
When does the problem NOT occur?
I would say when all luminosity-casting objects are visible in view(), but actually, even this is sketchy.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
I'm going to assume, at some point, luminosity worked.
Workarounds:
Don't set area luminosity = 0, soft-code your own luminosity model to get around BYOND's sketchy one.
http://www.byond.com/members/Geldonyetich/files/ Future%20Shock%202010%2D08%2D13%20132124.png
http://www.byond.com/members/Geldonyetich/files/ Future%20Shock%202010%2D08%2D13%20132121.png
http://www.byond.com/members/Geldonyetich/files/ Future%20Shock%202010%2D08%2D13%20132118.png
http://www.byond.com/members/Geldonyetich/files/ Future%20Shock%202010%2D08%2D13%20132116.png
http://www.byond.com/members/Geldonyetich/files/ Future%20Shock%202010%2D08%2D13%20132114.png
http://www.byond.com/members/Geldonyetich/files/ Future%20Shock%202010%2D08%2D13%20132111.png
I'm willing to FRAPS a video of the sketchy behavior in action if this is required.