Very slow performance on Mobile

0 favourites
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hello All,

    about a year ago I was wondering wether or not to buy the full Construct 2 license and after I rad forums about the slow performance of construct 2 on mobile devices I decided to wait a bit.

    Now I bought the full version made a simple small game (not heavy at all) and its extremely slow on some devices.

    Is there a fix to this problem?

    Maybe the problem is elsewhere... I used few particles (3) could it be that fatal?

    What will happen if Ill make a much bigger game?

    Let me know your thoughts and experience about this.

    Thanks

  • What kind of device is it?

    The most common mobile performance problem is that the graphics driver is buggy on Android devices so the browser disables the GPU. You can check for this in chrome://gpu in the Chrome browser.

    Other than that you'd have to share your .capx so we can take a look.

  • I can assure you that most Android Kitkat (4.4) devices up to Android Marshmallow (6.1) runs good with C2 made games as long as it follows these conditions....

    +Less than 80mB active memory usage.

    +Less than

    (For small objects)200 simultameous moving objects.

    (For average sized objects) 80

    (For big sized objects) 30 or less.

    +No physics! Unless the game project is small.

    +Don't add unnecessary behaviors.

    +Use Tilemaps instead of adjacent tiles.

    +Use TiledBackground for Backgrounds.

    +Turn off Collision for non-colliding objects.

    +Assure events are optimized especially for loops.

    +As much as possible, only use (2x2) image sized tiledbackground for ground floor or corner solid instead of solid tilemap / sprite .

    If you follow these you'll get this performance within these range.

    Small games : (52 to 60 fps)

    Average games : (42 to 52 fps)

    Big Games : ( 24 to 42 fps)

    That's based on my experience on mobile development.

  • I would add:

    If you have multiple objects with the same sine and all objects perform the same movement, then turn off the sine in all objects and leave only one with sine activated, then make the other objects based on the object's movement has activated sine, so only one will be processing a sine movement.

    Avoid multiplications events, for example:

    Player.x <8 * 16

    This is better:

    Player.x <128

    In my case it made me gain some FPS.

    Sorry for my English, I hope you understand.

  • 80mB of memory usage? memory usage shouldn't be a problem

    also how do you intend to make a big game with 80 mb of usage?

    some games need up to 400-500MB per layout to work..

    i don't think it's a memory problem it's more of a game design problem and people wanting to do more then can be done.

  • Hello All,

    about a year ago I was wondering wether or not to buy the full Construct 2 license and after I rad forums about the slow performance of construct 2 on mobile devices I decided to wait a bit.

    Now I bought the full version made a simple small game (not heavy at all) and its extremely slow on some devices.

    Is there a fix to this problem?

    Maybe the problem is elsewhere... I used few particles (3) could it be that fatal?

    What will happen if Ill make a much bigger game?

    Let me know your thoughts and experience about this.

    Thanks

    I invite you to view my tutorial here mobile-optimization-tutorial-version2_t181811

    And if you have any questions please ask them. But can you be more specific about the issue like

    1) What type of game is it?

    2) How many objects moving onscreen?

    3) Did you have scrolling background?

    4) Are your graphics jpg or png?

    Then we can help you on your quest to make better running games. Also I did make a space shooter with 25+ enemies moving onscreen with no lag for android . You can try it here https://play.google.com/store/apps/deta ... t.ad&hl=en as proof that I do know how to optimize pretty well!!

  • Hi, Thanks for all the replies! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    The problem indeed happens only with android devices I checked with 2: Samsung Galaxy s5 and a dell note.

    on Iphone everything looks good.

    The game is in its early stage so thats why I'm afraid about issues like this happening already now.

    you can take a look at the game here:

    http://yurinkastudio.com/games/ice/index.html

    The problem begins when the user touches the main character to move it (everything becomes slow).

    I would be happy to hear what you have to say.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yurinkab

    Can you add a highscore to make it super fun. Its fun but a highscore would make it more fun. I made a tutorial that should make it easy to implement it in your game.

    Highscore Tutorial

    https://www.scirra.com/tutorials/5343/h ... -game-capx

    Mobile Optimizing

    mobile-optimization-tutorial-version2_t181811

  • That was exactly my next move PixelPower!

    Thanks for the tutorial, definitely will come handy!

    There is a lot more to add... if you have other suggestions I will be happy to hear!

    Thanks

  • also PixelPower do you know if the LocalStorage works like the Local storage in Javascript?

  • Local storage actually uses the indexedDB and not the webstorage, also it is asynchronous when used in C2.

  • Thanks

    Any Input about the game play problem?

    Thanks!

  • I can only guess but I'd say you are using physics objects and somehow moving the player makes the game slow down, does the player also has that behavior? How do you check for collisions?

    I'd say use rather bullet objects if that is not already the case.

  • I played the game on my computer and it seemed fine. On my phone there is a little lag. The only thing I can see is for you to make less ice needles come down or resize the large ice needle to be a little smaller , since the large ice needle is whats causing the slowdown. Either way will help performance.

    Also how big is your background sprite?? I lasted long enough to see it end and the background is white. Are you scrolling it through code or do you have a super long background and just have it moving downward? That could be the problem.

  • Ah... Guilty... it was just a quick fix (the long tilemap) but does a huge stretch of a tile map adds to the size?

    also the big ice needle is really a small graphic... something like 50kb... weird.

    + do you know what is the best way to make the tile map to loop? (I am thinking about a loop like this: if tilemap.y >= something... so jump back up)

    Thanks

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