ID:1375500
 
Resolved
When all animations ended, sometimes the map didn't update for the very last step.
BYOND Version:500
Operating System:Windows 7 Ultimate
Web Browser:Firefox 23.0
Applies to:Dream Seeker
Status: Resolved (501.1214)

This issue has been resolved.
Descriptive Problem Summary:
Kaiochao and I have noticed a bug involving the animate procedure. Whenever you specify the time argument, it only partially updates. However, it fully updates without the proper animation once the object moves. Setting no time is currently not affected by this bug.

Edit: It appears that it requires enough steps before it could ever fully update (based on step size). Tested a rotation with a step_size of 8 and did not complete until a few steps later.

Numbered Steps to Reproduce Problem:
1. Create an procedure that uses the animate procedure. Make sure to provide time (as no time is currently not affected).

2. Run the procedure while the game/project is running.

Code Snippet (if applicable) to Reproduce Problem:
/*
These are simple defaults for your project.
*/


world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default
maxx = 10
maxy = 10
maxz = 1

view = 6 // show up to 6 tiles outward from center (13x13 view)


// Make objects move 8 pixels per tick when walking

mob
step_size = 8
icon = 'Test.dmi'
proc
Test()
animate(src,alpha = 100,10)
Click()
Test()

obj
step_size = 8


Expected Results:
Smooth changes until it reaches a certain point.

Actual Results:
Only a partial update. Doesn't show the complete change until the object is moved.

Does the problem occur:
Every time? Or how often? Everytime.
In other games? Anyone project that uses animate and provide time.
In other user accounts? N/A
On other computers? N/A

When does the problem NOT occur?
Does not occur when no time is specified as stated.

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.)
N/A

Workarounds:
One possible workaround is to do it manually.

This is a bit relevant. I tried to modify a snippet from the notes on animate by making a simple Fade() verb, but it gives me a "list index out of bounds" runtime error.

mob
verb
Fade()
usr.fade()

proc/fade()
animate(src, src.alpha = 0, time = 10)


EDIT: It stopped giving me this error when I removed the src from in front of alpha. I'm not sure if this behavior is intentional or not, but that is a strange error to give.

EDIT2: I can testify that my snippet only takes action while I am moving.
Yeah, I had a weird issue like that as well earlier involving list out of bounds.
This bug has been resolved in 500.1207.
Nadrew resolved issue
This bug appears to be back again.
In response to Ter13
Can you be more specific about the issue? I haven't seen any problems in animate() recently.
http://files.byondhome.com/Ter13/testbed_src.zip

Take a look at that.

Basically, the animation spins a number of objects around a central point, while they get closer to their destination.

Unfortunately, the animation seems to jump back to keyframe 1, or stop 1 keyframe shy. That is, unless I sleep() right after the last animate() call.

The only way to force it to update, is to move.
Yeah, you're right Ter13. Looks like it came back. =/
I don't think it came back, so much as the fix didn't address the full issue. During animation, updates are fine, but when all animations end, that's when the problem appears.
Lummox JR resolved issue with message:
When all animations ended, sometimes the map didn't update for the very last step.