When using pixel movement, normally there is a layering issue in Topdown format to where it looks as though you're standing over things that you shouldn't be. This is fixed by modifying your layers as atoms move around to be adjusted via their y coordinate (lower y coordinate results in a higher layer)
After updating to 500, this code has stopped working. The layers are getting set to decimals (something like 3.12) to make this all work. Not sure why this would happen but the only thing I can think of is that layers can only be integers now, or.. how things are drawn has changed. Who knows?
Numbered Steps to Reproduce Problem:
Use pixel movement, try to properly layer everything.
Code Snippet (if applicable) to Reproduce Problem:
atom
movable
var
Standing = 0
proc
update_layer()
layer = MOB_LAYER
if(isturf(loc))
var py = (y - 1) * 32 + bound_y + step_y
var max_y = world.maxy * 32
var scale = 0.01
layer -= py / max_y * scale
Move()
. = ..()
if(Standing) update_layer()
Expected Results:
Layers can be dynamic again
Actual Results:
Does the problem occur:
Every time? Or how often? Every time
In other games? Haven't tested
In other user accounts? Haven't tested
On other computers? Haven't tested
When does the problem NOT occur? So far, it always does (I'm pretty sure it's the BYOND version responsible)
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? In the most recent 499 version it worked just fine. It seems updating to 500 is responsible
Workarounds: I've not experimented with it really, since this seems to be a bug.
I'm not sure why you're needing to do those adjustments in the first place. BYOND already does something like this internally (which may not be working for some reason, so I'll check) to make icons on the same layer sort consistently, and also to prioritize movement. Broadly speaking, the layering of atoms should be pretty consistent, especially in topdown mode. I wasn't aware of any layering problems that existed in that mode.