Jump to content
Search Community

Juddery tweens on retina screens

gareth test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I am working on a game that is getting 60fps, but the enemy tweens look very juddery on our new 27in iMacs, on the much older machines they are very smooth.  I am guess this has something to do with GPU needed to power the high resolution screen?

 

All I am doing is tweening a div's x,y position, there only 3 or 4 tweens at a time.

 

I have tried the following so far: 

 

- Turn on/off force3D

- Changed to gifs from png's with transparent backgrounds

- Changed to a object pool generation system

 

 

here it is (work in progress) : http://game.eighthday.modxcloud.com/

 

 

Link to comment
Share on other sites

If you could provide a codepen in future, it makes it much easier for us to actually fiddle with the code and html on the page.

 

Sounds like you already know what the problem is: your computer is just not powerful enough to play the animations smoothly. As it is your 3 or 4 tweens aren't as innocuous as they sound. They seem to include a 3840x560 image moving continuously. I have no idea what the PPI scale of the browser on this computer is, but for simplicity sake let's say it's 200% (i.e. 1 logical pixel per 2 physical pixels). That would equal a massive 7680x1120 element to constantly update. I'm not particularly surprised that it's a bit jumpy. How does it run if you remove this element?

  • Like 2
Link to comment
Share on other sites

The massive element actually tweens really well, taking it out has no effect on the juddering of the enemy tweens. I removed everything apart from the sled and the enemies and the tween remained the same. 

 

It does seem very strange to me 60fps, the background is smooth, but the tiny element tweens are very laggy. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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