Jump to content

Stuttering with requestAnimationFrame and no obvious culprit


Kulimaze
 Share

Recommended Posts

Hi,

We're currently using Pixi.js for a few projects and we're encountering a strange issue with inconsistent FPS and can't find the cause. We're using the PIXI.Ticker to execute our render loop which works most of the time, but for short periods of time our game will visually stutter. I've been profiling the game and I'm noticing that a lot of frames are taking around 17ms to render even though our animation loop is finishing anywhere between 3-7ms. I've also checked time spent on network decoding and everything is completing in under 1ms so it doesn't seem like that could be the cause.

I also found a few cases where the frame takes >100ms to complete even though our animation loop took 7ms, which seems like strange behaviour.

If you want to see the game in action to test it yourself: http://spinz.io/ 

uyq8lj.png

Link to comment
Share on other sites

You asked me to to profile, but you don't ask with respect^W^W^W, you dont give unobfuscated code.

One of the possible problems i see is that you put all circles in big graphics object instead of using sprites with generated textures. "updateGraphics" in webgl mode takes too much.

And yeah, GC is a problem too.

Also, do you have stats on how many users have webgl?

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...