0

All game assests are broken into portions according to the game Levels. So while user play Level #1, next level is being loaded in background.

But there is a strange behaviour with the sprites when preloading is active. Sprites are played way faster.

Here is a test case: http://cjstest.comlu.com/index.html

  1. Click "Play" button. You can see a moving rect at 16 FPS speed.
  2. Click "Load L2" button. You'll notice that rect has started moving faster.
user1876232
  • 99
  • 1
  • 6
  • You try change the createjs.Ticker.timingMode and set createjs.Ticker.framerate? – p3c May 20 '16 at 17:35

1 Answers1

0

Look this tutorial

Use event.delta for the animation not depent of framerate.

function tick(event) {
    // move 100 pixels per second (elapsedTimeInMS / 1000msPerSecond * pixelsPerSecond):
    circle.x += event.delta/1000*100;
}
p3c
  • 133
  • 7
  • Thanks for you comment! Yes, that is a possible solution. But doesn't speeding up of the sprite playback look like some bug? I expected lower FPS on background loading, but not sporadic speed ups.. – user1876232 May 25 '16 at 06:50