Tiled Backgrounds performance problems

0 favourites
  • 9 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hi, I just found some strange performance issues on mobile browsers when you rotate layouts or layers with Tiled Backgrounds in the project.

    Maybe these issues are related to my mobile devices, I don't know...

    Layout rotate test

    This example consists in rotate the game layer by 45 degrees steps, every 5 seconds.

    Objects in the project:

    -WallTile (64x64 Tiled Background)

    -Sprite with bullet behavior

    Issue (iPad 2 safari)

    By default, everything is smooth(60FPS), but if you go to WallTile image editor, and resize the image to 4x4, the performance become really bad when layer angles are not 0,90,180 and 270, with FPS around 13/14FPS.

    Smaller power of two Tiled Background image result in horrible performance at specific angles.

    I was wondering if anyone could take a look and test the example, and share the results.

    Thx

  • once transition hits (every 5 sec) and sets cameras to 'rotate'

    you start doing the event cameras = "rotate" layer game angle to level angle degrees.

    it happens every tick and all the time, even if the angle is the same. try adding cameras="" under it and test then.

    also try resizing the background tile - size 4032x992 is just HUGE. you can reduce it to window size - reduce it to 2560x256 and try again.

    also reduce the wall tiles. 2592x288 or even less. i just don't know why you don't use a simple sprite that is not background tile. use a simple black sprite - it's static, can rotate and doesn't tile. definitely more performance friendly.

    also of course that background tiles are slower. it's obvious.

  • Hi, I made a simpler example, maybe I didn't explain myself too well,

    I'm not trying to achieve a better performance in this particular example, I know the best practices in game design.

    I just want to figure out if when the layer angle is 45, it's not supposed that the performance should be equal than when the layer angle is 0.

    I deleted the background tile just to make the things simpler.

    Test the default capx in iPad2-see the results.

    Then resize the WallTile to 4x4 in the image editor, and test it again.

    What I'm seeing is when the WallTile is 64x64 the performance is good in all angles, but when WallTile is 4x4 ,the performance is good in angle 0, but very poor at layer angle 45.

    I'm just asking if it should be good at both angles or not.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Im getting 60 fps Ipad3, 30 fps Chrome on my desktop, and 50 on FF.

    Chalk it up to hardware and os.

  • Im getting 60 fps Ipad3, 30 fps Chrome on my desktop, and 50 on FF.

    Chalk it up to hardware and os.

    Hi newt, those results are with the WallTile image size 64x64, or 4x4?

    Thx

  • cesisco - is your iPad 2 updated to iOS 8? iOS 7 and older don't support WebGL and the iOS canvas2d mode is very slow at drawing tiled backgrounds. Since iOS 8 uses WebGL it works around this and should always be fast with tiled backgrounds.

  • Hi Ashley , in fact I'm on iOS 7.

    But the example only performs bad when the layout angle is 45 degrees.It costs more to draw a tile background at that layout angle?

    Anyway I'll update to iOS 8

    thx

  • No difference, cept graphically the tiled bg with 4x4 is showing lines.

    Not sure why.

  • OK thx, it seems that the performance dropping issue only happens in iOS 7

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)