Tiledbackground problem : FPS drop when using background

0 favourites
  • 5 posts
From the Asset Store
320 high-quality cinematic sound effects for trailers and game scenes.
  • I'm currently developing my game for a mobile game, my problem is something like this. I have a player using 8 direction movement, a touch event for mobile controls, some tiled background(64x64) for the walls and lastly a tiledbackground(128x128) for a background. My Viewport size is 720x1280(landscape) when I'm testing my game on an android device (8.0) Whenever the player moves in a different direction I noticed that my FPS drop from 60 to 45-52 after trying different method to solved my problem I found out that my background is causing a problem.Here are my method lists.

    METHOD 1 :

    Delete background (tiledbackground)

    Current FPS when player moves: 58-60

    METHOD 2:

    Change background to a sprite instead of tiledbackground

    Current FPS when player moves:56-60

    Problem: apk size will increase(gonna used multiple backgrounds)

    METHOD 3:

    Change Viewport size to a smaller one

    Current FPS when player moves: 58-60

    Problem:I don't feel like using small viewport(Graphics quality will decrease).

    Here's my simple event

    Note:My fps drops only when I'm testing on a mobile devices but on a desktop the fps is on a normal rate.

  • Hi.. I curious about your case.

    Do you try that in several different phone with different specification (CPU,RAM,..) or you just try it only in 1 phone ?

  • Yes, I tried on a different android device and also on a tablet but got the same result.(Android 8.0)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see. IMHO maybe it is hardware limitation issue. I face a similar case too.

    anyway this performance tips worth to be considered : scirra.com/manual/134/performance-tips

  • I think that it has nothing to do with hardware limitations as I said earlier I've only used a few tiled backgrounds,sprite for the player and controls.For the performance tips I already follow what's written on it.What really confused me is this part....

    "Using Sprites instead of Tiled Backgrounds

    Creating too many objects can cause slowdowns, and a common mistake is to use grids of Sprite objects instead of Tiled Background objects. This is similar to using tilemaps inappropriately. For example, a 20x20 grid of sprites has 400 objects, which is a significant impact on the object count. A single tiled background can replace the grid of sprites and it only counts as a single object. Tiled backgrounds are specially optimised for repeating their texture so in this case it is literally 400 times more efficient than the grid of sprites. Always use Tiled Backgrounds instead of repeating Sprites wherever possible."

    It really caught my attention because if you read my METHOD 2 on my post earlier I used a large 1280x720 sprite object to used as a background instead of 128x128 tiledbackground and my FPS when I'm using a sprite as a background is very smooth the only downside for this is that it will take a lot of memory when exported to an apk file and that's not a good idea if you are making a game with a lot of levels.

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