So far, so good with Build 767… except…
I’m seeing an issue with slight time “skipping” when using the new “timeScale” feature (and this is a brand-new addition to this API, which might work differently from the old version in the depreciated API).
Basically, as far as I can tell, there is a minor time-based frame skip when the timeScale is switched on the fly. For sake of example, let’s imagine that a sprite sequence has 1000 milliseconds *between* each frame. This is a somewhat unrealistic example; typically a sprite would animate much faster, but I need to illustrate what seems to be happening. Consider the following…
- Sprite changes from Frame 1 to Frame 2. Now there are 1000 milliseconds before it switches to Frame 3.
- After about 700 milliseconds from this time, the app sets “timeScale” to 2 (so, double the speed).
- Normally, 300 milliseconds would remain before the next frame switch, but since the timeScale has doubled, this time should actually be 150 milliseconds.
This is where the new API has a problem, I think… the “delta” time is not being adjusted according to the timeScale. The same happens on reverse action… if the timeScale goes from 2 back to 1, and there are 150 milliseconds before the next swap (at double speed), the swap should be adjusted back to 300 milliseconds. The sprite slows down in speed, thus the time between frames should instantly adjust to this speed too.
Is this possible Jonathan? Can you please ask the engineering team about this? I’m almost positive that the previous timeScale API adhered to the adjusted scale, because I never noticed skipping in my usage of it. Now I see obvious skipping, both in the Simulator and on devices.
Sincerely,
Brent Sorrentino
[import]uid: 9747 topic_id: 23275 reply_id: 93686[/import]