ID:1998050
 
BYOND Version:509
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 47.0.2526.80
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
This issue was considered resolved before, but I'm going to prove it is not.

I made a new game that uses SIDE_MAP, and I noticed it causes my character's hair to flicker on and off as he moves, but only if other mobs are moving near him. The hair is added onto the character like overlays+='Hair.dmi', nothing fancy. On the default TOPDOWN_MAP it does not flicker.

Numbered Steps to Reproduce Problem:
Download this sample project: http://www.4shared.com/zip/eHn--YLwce/Game.html
Run it and start walking around and 150 walking test mobs will spawn near you. Walk around and you will see the hair flicker on and off. Get away from all the test mobs and the flickering stops.

Use CTRL+F to find "LUMMOX JR" in the code to see the line that spawns the test mobs if you need to disable it.

Expected Results:
Overlays should not flicker in SIDE_MAP mode

Actual Results:
They do flicker, but it seems only when other moving mobs are around you moving at the same time you are moving. It may not only be mobs but any moving objects I don't know.

Does the problem occur:
Every time? Or how often? Every time
In other games? I've heard other devs say so yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
When you do not use SIDE_MAP mode

Did the problem NOT occur in any earlier versions?
It never worked as far as I know

Workarounds:
Don't use SIDE_MAP mode
You will notice that if you disable the code that spawns 150 test mobs, then run the game, your hair will never flicker, as there are no moving objects around you. Objects moving around you while you are also moving seem to trigger the flickering somehow.
This is proably a side effect of the fact that topological sorting is not in play, but I'll take a look.
Thanks. I'll buy someone a membership when this gets fixed since it specifically helps my game
For now I will use TOPDOWN_MAP with this custom layering function that is called every Move():
atom/movable/proc/UpdateLayer()
var/offset=y + (step_y / world.icon_size)
offset*=0.0001
layer=MOB_LAYER - offset

But I benchmarked it and with 300 mobs running around world.cpu is stable at 44% whereas without Move() overridden it is 25% with 300 mobs. So for performance I will be glad when/if SIDE_MAP works again.
New info: It seems if you increase the test mob's to 300 your character's hair will flicker even if you aren't moving. Just that many mobs moving around you causes the flicker.
Don't get ur hopes up lol this was reported years ago, best to just not use side map unless ur making a side scroller



The issue happens when u walk by a mob tho or are within a certain distance of one
Does this stand a chance of being fixed Lummox or is it too low priority?
The SIDE_MAP tiling is something I want to fix properly, but haven't had a chance to get to yet. Really what this needs is proper topological sorting, and I have an approach in mind to use but it's complex enough that other design goals have taken priority first. (This has always been on my mind, though, and never forgotten.)

However, 510 is introducing a new concept of atom groups that should basically obviate this issue for cases like yours. Marking your main atom as a group will force all the sprites to be rendered at once.
still not fixed