Sign in to follow this  
Son of Bryce

Set Phaser Framerate

Recommended Posts

You can read the FPS rate here:  game.time.fps

But I think you can't set it.

 

However you can set FPS in animations, look at the "sprite sheet" example:

 


 



// And this starts the animation playing by using its key ("walk")
// 30 is the frame rate (30fps)
// true means it will loop when it finishes
mummy.animations.play('walk', 30, true);


Share this post


Link to post
Share on other sites

Thanks Pedro!

 

Is this correct that there's no way to set the FPS? If that's the case, is there a time variable to use for determining how long it's been since the last frame?

 

I'm trying to figure out how to account for the differences in playback on a desktop and mobile.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.