TileMap made Mobile Device FPS Drop [Solved]

0 favourites
  • 14 posts
From the Asset Store
320 high-quality cinematic sound effects for trailers and game scenes.
  • Hi Constructors, I'm new to Construct 2 , and I made a game with some pixel tilemap as Land and Sky , When I tested the game on Chrome PC, it worked very well ,but I used CocoonJs on my android Nexus 7 , the FPS drop to 15-24 . Then I delete the tilemap , it worked fine on android again (FPS 50-60) . So the problem has something to do with the tilemap or its settings.My tilemap images are very small , about 1KB,made with PyxelEdit

    This is my Project settings :

    Pixel Rounding : On

    Window Size : 720p

    Fullscreen in browser : Letterbox integer scale

    Use High-DPI display : Yes

    Sampling : Point

    Clear Background ; No

    Capx Download: dropbox.com/s/nsj0bc26hke7t4v/Sugar.capx

    BitMaps: dropbox.com/s/vc8v87ifci0hehi/SugarPicture.rar

    It was solved , thanks !

    Solutions:

    Ashley

    that's a very inefficient use of tilemaps. Since you're just using it to repeat a single image, it would be far, far more efficient to use the Tiled Background object.

    If you run it in the debugger you can see it reports 441 draw rects for that tilemap, mainly because every tile is different and there are no areas of the same tile. This means it's about the same work as drawing 441 sprites. If you used a single tiled background object, it would take 1 draw call, which would be approximately 400 times more efficient.

    ThunderZ

    How amazing bad use of tilemap and C2.

    As Ashley say use tiled background.

    Exemple :

    1 pixel color gradiant for your blue background (non alpha) + 1 tiled sprite for 'clouds' with alpha. (the size you want placed at top of the gradiant sprite).

  • Ashley check this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How many unique tiel did you use ?

    C2 does a baching but only for tile that are identical.

    The better way will to have a global batch with the tile system (1 layer = 1 draw call) but with ou memory management it's impossible.

    You just need to design your worl/tile/level, to be more efficient with a low number of draw call.

  • Hard to comment without a .capx. If you have a tilemap with loads of random, very small tiles, then there will simply be a lot of rendering work. Are you doing that? Also is WebGL enabled?

  • ThunderZ

    About 5 maps , I uploaded the .capx file , download link in the main post .

    Ashley

    I do have many small tiles , but only about 5 kind of map image ,the WebGL is on.

    I have uploaded the .capx in main post .

    I tried to decrease the tile number , the fps up to about 25 - 35 ,maybe make a big map using PS,and import into C2,will get the right result,but it will increase the size of the game,and isn't convenient.

    Thanks for your answers !Still trying to figure out a best solution.

  • Zaoeyo - that's a very inefficient use of tilemaps. Since you're just using it to repeat a single image, it would be far, far more efficient to use the Tiled Background object.

    If you run it in the debugger you can see it reports 441 draw rects for that tilemap, mainly because every tile is different and there are no areas of the same tile. This means it's about the same work as drawing 441 sprites. If you used a single tiled background object, it would take 1 draw call, which would be approximately 400 times more efficient.

  • How amazing bad use of tilemap and C2. <img src="smileys/smiley5.gif" border="0" align="middle" />

    As Ashley say use tiled background.

    Exemple :

    1 pixel color gradiant for your blue background (non alpha) + 1 tiled sprite for 'clouds' with alpha. (the size you want placed at top of the gradiant sprite).

  • I could correct your capx if you send me the original bitmap. ;)

  • Ashley

    Thanks ! i will solve the problem ,really help!

    ThunderZ

    Thanks for taking your time! Main post has the Bitmaps .

  • Here the game modified (only the game layout for you see the difference with the menu) -> capx + modified bitmap.

    https://dl.dropboxusercontent.com/u/732352/sugar_modified.zip

  • it's not perfect in bitmap (i just cut your original one).

    Use power of 2 resolution and it will be better ;)

  • ThunderZ

    Thank you ! it works nice on device !

  • Did you see what i've modified and how do to now ?

    ps: don't forget to modifie you title screen layout (it's using tiled (i've renamed the _old))

  • ThunderZ

    Yes , Thanks ! I'm busy with making the game these days

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