Jump to content

Scrolling Backgrounds and performance


casarock
 Share

Recommended Posts

Hi!

 

I'm currently working on a prototype for some kind of endless runner like Jet PAck Joyride. I just want to have several Backgorund "stitched" together to have some kind of veriety (like Jetpack Joyride).

 

There are three "buffers" holding a texture, slightly bigger than screen size.  they are added as Sprites and I move them using decreasing x in my update function. If a buffer is out of sight, I'm changing the sprite texture and set new x. I've got a continuos scrolling background with changing patterns. This part works very good.

 

All I want to ask: Am I on the right way or is this a performance killer? On Firefox 40 (OS X) I'm have just ~40-50FPS. Just scrolling backgrounds, nothing else added.

 

Edit: Here is my actual result: http://l.appsbu.de/runner/

Link to comment
Share on other sites

On 29/09/2015 at 9:36 PM, casarock said:
All I want to ask: Am I on the right way or is this a performance killer? On Firefox 40 (OS X) I'm have just ~40-50FPS. Just scrolling backgrounds, nothing else added.

 

I ran this on my 4.1GHz Quad Core (16GB RAM DDR3), 2.4GHz Dual Core (6GB RAM DDR3), 1.1GHz Dual Core (4GB RAM DDR3) Windows devices and the results are respectively as follows:

(1): ~45fps Firefox 43a02, ~48fps Google Chrome 45.0.2454

(2): ~34fps Firefox 43a02, ~35fps Google Chrome 45.0.2454

(3): ~26fps Firefox 43a02, ~29fps Google Chrome 45.0.2454

 

I guess for low end devices it's bearable, but it does seem quite slow (all the tests had no additional programs active).

Link to comment
Share on other sites

Out of interest...my Chrome says 60 for the render fps .. and Firefox 59/60fps, but the movement is quite jerky rather than continually smooth... so is that:

 

a )  a faulty FPS meter

b )  movement that's not actually sync'd to the framerate for some reason

c )  my graphics drivers not working :S

 

thanks

j

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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