Unfortunately, so far our efforts in finding the source of the problem have fallen short of results. We all posted our graphics card information in that topic, and while I didn't see anything that stuck out, you might.
There's little concrete information to go on, but the facts so far:
- Two users are having problems. Both clients experiencing the problem are using Windows 10.
- One of the two aforementioned users tested in both the webclient and DS and the problem persisted.
Numbered Steps to Reproduce Problem: Inconclusive.
Code Snippet (if applicable) to Reproduce Problem:
proc/shadowed_maptext(text, text_color = "#fff", x = 0, y = 0, width = 256, height = 256, offset = 1, shadow_dir = SOUTH, shadow_color = "#000")
var obj/temp = new/obj
temp.maptext = "<span style=\"color:[shadow_color];\">[text]</span>"
temp.maptext_width = width
temp.maptext_height = height
temp.maptext_x = x + ((shadow_dir & (EAST | WEST)) ? ((shadow_dir & EAST && offset) || -offset) : (0))
temp.maptext_y = y + ((shadow_dir & (NORTH | SOUTH)) ? ((shadow_dir & NORTH && offset) || -offset) : (0))
temp.layer = FLOAT_LAYER
temp.underlays += temp.appearance
temp.maptext = "<span style=\"color:[text_color];\">[text]</span>"
temp.maptext_x = 0
temp.maptext_y = 0
temp.layer = MOB_LAYER + 1
temp.overlays += temp.appearance
return temp
Expected Results: Maptext with a shadow attached.
Actual Results: Maptext without a shadow, or with partial shadow applied. (Only occurs in some cases.)
Does the problem occur:
Every time? Or how often? Every time on a problem machine; no issues otherwise.
When does the problem NOT occur? On some variable machines, it works, and on others, it displays wacky behavior (see original topic above).
The behavior is obviously wrong, although I think the original code is questionable; it doesn't make much sense to me for the main layer to be MOB_LAYER+1 but the shadow to be FLOAT_LAYER.
I think in this case the layers are working out like so:
turf - float - obj - mob+1
DS's layering sort is actually inferior to the webclient's and I think in this case, the float is being resolved like so:
turf(1) - turf(2) - obj - mob+1
Whereas the better form used by the webclient is:
turf - obj(1) - obj(2) - mob+1
...because the float is resolved at the atom level.
That alone doesn't explain this, but I think this may be interacting with the code that handles big icons, so that big turfs try to put other turfs behind them. It's something else I can look into. The very simplest solution is to improve the "unfloat" code, which would basically take the big icon handling off the table.