ShotgunJed

Regarding Pixi.Ticker (deltaTime vs elapsedMS)

Recommended Posts

http://pixijs.download/dev/docs/PIXI.ticker.Ticker.html

 

Whats the difference between deltaTime and elapsedMS?

Delta time seems to be a "Scalar time value" but I don't know what that is. Whereas in most other game engines, delta time is often the time in milliseconds from the previous frame (which is what elapsedMS seems to be doing here).

Share this post


Link to post
Share on other sites

You can use deltaTime to scale your animation velocities. For instance if you move your sprite 2*deltaTime pixels per frame then it will move 2 pixels per frame when you're hitting the target 60FPS frame rate, and for instance it will move 4 pixels per frame if the FPS drops to 30. Then you can also adjust app.ticker.speed to easily run all of your animations faster or slower (since deltaTime gets scaled by speed). edit - by default minFPS is 10, so deltaTime can't go above 6 (60 / 10 = 6).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.