ID:1715401
 
Resolved
The "creation time" of objs, mobs, and turfs used for fixed-loop animated icons did not coincide with Dream Seeker's behavior.
BYOND Version:507
Operating System:Windows 8 64-bit
Web Browser:Google Chrome
Applies to:Webclient
Status: Resolved (507.1273)

This issue has been resolved.
Descriptive Problem Summary:
I was (once again) testing out some old projects with the new web client.

I tested my old platformer Ninja Chronicles and noticed that the animation for running/walking would not run on the web client. ( I suspect the constant "bumping" may cause this..)

I determined that my Platformer library - that powers the physics in this project - was where the problem was.

Because this involves animation I figured it was best to simply provide a project that displays this in action, you should be able to get it here.


The flick() proc seems to behave as intended.



Numbered Steps to Reproduce Problem:
1)Include Platformer library
2)Have a movement animation consisting of more than 1 frame.
3)Launch in Web Client
4)Observe animation when moving.


Expected Results:
Consistent animation results.
Actual Results:
Web client seems to ignore movement animation when using my platformer library. (I suspect the constant bumping, but its just a thought)
In other games?(I assume this happens in other platformers, but I have not tested this)

When does the problem NOT occur?
Regular RPG's seem to be unaffected for the most part. (or generally any game that does not contain platformer physics)


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.)
Original testing was in an earlier version : so the bug occurred in earlier versions as well
Workarounds:
(so far I have not found any)
I was able to observe this in action. I get what's going on and have an idea of how to fix it. Here's what's happening as of right now.

In your code, your gravity routine is setting the mob's icon_state to "fall" constantly, even when the mob is not falling. This is causing the "creation time" variable to reset for looping purposes. This variable isn't used server-side when hosting for DS, but is only relevant to the webclient; DS makes note of a change only if the icon or icon_state have changed since the last tick. That's what's accounting for the difference: the creation time is resetting in the code used by the webclient, but not in DS.

Ideally, therefore, the webclient behavior should keep track of when the object was last seen, and set creation time accordingly. This would also fix the issue I have where turfs don't track this properly.

As a workaround I would suggest revamping the platformer lib to avoid the state changes; it's much better if you can avoid having to test steps constantly and relying on Bump(). For best performance just in general, it's better to keep from having to change states. (A secondary workaround is to still call Move() manually in place of step, and to use its return value to determine if anything changed or not, and by how much; if it did move, and moved by the full step size intended, a change in state is highly appropriate.)
Lummox JR changed status to 'Verified'
Lummox JR resolved issue with message:
The "creation time" of objs, mobs, and turfs used for fixed-loop animated icons did not coincide with Dream Seeker's behavior.