Jump to content

Buttery smooth slow movements


nuthinking
 Share

Recommended Posts

Hi guys, I am struggling to have graphic elements moving continuously smoothly. I tried 2 different movement logics but still no luck.

 

First one using fixed delta, hoping that the video card doesn't lose frames: http://codepen.io/anon/pen/NGeZdO?editors=001

 

The second, I believe frame drop proof, just moving the elements based on the time passed between a rendering and the previous one: http://codepen.io/anon/pen/avPgqm?editors=001

 

In both cases the items which move slowly are visibly not smooth, as if Pixi didn't support decimal values for x positions, which I guess it's not the case, especially considering that the antialiasing option for the rendering is enabled. So maybe it is something to do with my logic.

 

I am using an old mac book pro, but I would assume it should easily run this basic graphics.

 

Any idea on how I could fix my problem?

 

Thanks,

chr

Link to comment
Share on other sites

In your case Ivan, looks like cacheAsBitmap is making the difference. So I guess to have decimal positioning the content of these elements needs to be rendered as a texture. Quite annoying considering in the project I am working the content will have its own animations. So maybe i have to render those internal animations as spritesheet.

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...