ID:1435303
 
Resolved
Recycled Appearances did not reset certain values such as pixel offsets.
BYOND Version:502.1218
Operating System:Windows XP Home
Web Browser:Chrome 31.0.1650.57
Applies to:Dream Seeker
Status: Resolved (502.1219)

This issue has been resolved.
Descriptive Problem Summary:

When I updated to 1218, I ran into strange behavior in my game. After about 20 seconds, things would start acquiring weird pixel offsets, either permanently or as part of an animation. For example, it happened to two turfs, a door and a switch that opens it, like so:



The other things that happened were:

- Projectiles that bounce off walls would expand a bit upon bounce, then animate back to normal...this animation started to include a wacky pixel offset, sometimes a full tile away

- A turf that went into a loop containing several consecutive animate()s would start "floating" around.

The pixel offsets seem random to me, although once they start happening they would stay consistent. So if a projectile started jumping northeast every time it bounced, it would jump that way every time from then on (but restarting the game would yield a slightly different result).

The funny thing is, in the lever/door example above, there are no calls to animate() or changes to transform vars...

Code Snippet (if applicable) to Reproduce Problem:
    door
icon_state = "doorclosed"
density = 1

var/index = 1
var/prefix = "door"

proc/Toggle()
if(density)
flick("[prefix]open",src)
icon_state = "[prefix]open"
density = 0
else
flick("[prefix]closed",src)
icon_state = "[prefix]closed"
density = 1

//switch does basically the same thing, except for telling the door to Toggle()

//below is the proc called when a projectile hits a wall

Animate()
color = rgb(0,0,255,50)
transform *= 1.5
animate(src, color = null, transform = null, alpha = 255, time = 2)

//and a turf that changes color

Animate()
spawn while(activelevel == z)
animate(src, color = rgb(255,0,0), time = 20)
sleep(20)
animate(src, color = rgb(0,255,0), time = 20)
sleep(20)
animate(src, color = rgb(0,0,255), time = 20)
sleep(20)
animate(src, color = rgb(255,255,0), time = 20)
sleep(20)
animate(src, color = rgb(0,255,255), time = 20)
sleep(20)
animate(src, color = rgb(255,0,255), time = 20)
sleep(20)


The only objects with changing pixel_x/pixel_y values are particles, and those did not exhibit the behavior, I think because their values are constantly being reset?

Does the problem occur:
Every time? Or how often?
Happens every time, after a delay of about 15 seconds or so. It doesn't seem to always be the exact same amount of time, nor are the unwanted offsets the same each time. But it does always happen.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?

Yes, running the game in 1217 cleared up the problem completely.
I've been seeing odd positioning in games compiled prior to this version, like F0lak's Ninja Team 2.

The stars on the top right of the image are supposed to be like the ones over the blue ninja, over the red ninja's head.
Can you provide any test cases for this where I could compare the two versions? I don't recall anything changing for animations in 502, and pixel offsets definitely shouldn't be thrown off. It's possible this is a side effect of the map threading but I've seen nothing like it.
I made this project to replicate the bug. After running around for a few moments, the tiles will start going all crazy and hitting switches will cause the effect I showed at the top.

It seems like you need a certain amount of animations at once to cause the behavior, but I'm not really sure how many. I played a bit with the amount of particle generators and with fewer, only the turfs I ran over bugged out while the switches and doors stayed put. Originally I thought something was going wrong with my particle system but I just couldn't figure it out, then I remembered I had just updated to 1218.
Thanks. I'll look into it.
Lummox JR resolved issue with message:
Recycled Appearances did not reset certain values such as pixel offsets.
sweet...thanks!