ID:84338
 
Not a bug
BYOND Version:454
Operating System:Windows XP Pro
Web Browser:Firefox 3.5.3
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Well it seems that the Flip() proc has trouble with correctly flipping every icon state of in icon with multiple icon states. The quantity of icon states doesn't seem to affect the chance of occurrence of this glitch, as long as there are two or more icon states in the icon. (This is about flipping multi-tile images)

Expected Results:
Every icon state in the icon flips correctly and is displayed upon laying out the objects, of the multi-tile image, with their respected icons.

Actual Results:
Some icons display, others don't.

Does the problem occur:
Every time? Or how often?
Not every time, but most of the time. I can't figure out what the occurence depends on.

When does the problem NOT occur?
Certain multi-state icons do flip correctly, but I do not know what it depends on.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Not that I know of.

Workarounds:
Manually create mirrored icons.

Photobucket

Note: the final image is displayed using flick()
Note #2: the iconer of the project I work for is also investigating this issue, trying to find a logic behind which particular icon states blank out for each icon in which the glitch occurs. So, I might be able to provide more information soon.
I'll need a demo to test this properly, something where the problem reliably occurs.

There is one possible (I suspect likely) cause of this issue that was settled in 455. The "invalid request for appearance data" message could come up sometimes when remotely connected to a game, and in those cases an appearance ID that was recycled would not be requested again, causing "blank" spots to appear. This happened intermittenly for a long time but became much more common in recent versions.

Therefore I would suggest retesting this in 455. If you recompile be sure to include a line that says world/map_format=TILED_ICON_MAP so everything will behave the same. If the problem goes away, then it's an issue that has been settled.

Also if you do still have this problem in 455, try using ftp() to send a copy of the image to yourself (maybe through a special verb, which you could access by right-clicking the object) to see if the icon actually is missing any states or if the problem is that they are simply not appearing. I think the former is actually quite unlikely but we need to rule it out.
Alright, I've installed 455, recompiled the test application and the bug is still occuring. So I will provide a small demo. I'll post again when it's done.


Edit: here's the demo: http://fflegacy.110mb.com/flip.zip
There is no bug in your example. The icons that aren't showing up are doing so because of logic errors in your code. I got a proper display by adding this line after "if(y_off==null) continue":

if(flips) x_off = -x_off

With that change, proper coordinates were fed into locate() and the animation played smoothly. I'm not sure if the effect was exactly as you intended it in terms of position and whatnot, but I confirmed Flip() is behaving correctly and the appearances show as intended when the logic is corrected.
Okay, thanks. I thought it was a bug since not all icon tiles blanked out, I thought "G.relative_x = flips? -x_off : x_off" would have been enough to negate the positions of the tiles