0 Favourites

Terrible performance on mobile...

  • Hi!

    I've developed a small prototype that works fine on PC (60fps etc.):

    http://www.manaforge.net/test/captainfoot/ (arrow or touch to move and jump)

    I just tried it on mobile (iPhone 4, chrome)... and it runs at 30-35fps before the game starts... How is it possible? 8 objects (3 squares and 5 text boxes) and it's laggy? I can't describe what's happening when the enemies start spawning. It's so... slow... and unplayable... There is no physics in the game, it looks pretty simple and clean... What's happening?

    Please rassure me: if I export the game to mobile with crosswalk, will it be fluent like any simple 2D game? If it can't run smoothly with 8 objects, I just can't make a mobile game with C2.

    Help

    Rag

  • The iPhone 4 was released 4 years ago and its hardware is very weak compared to modern devices. Even the iPhone 4S is a big step up, and you can buy devices today for $99 that can get double the performance of an iPhone 4. Unfortunately it's probably only practical to target the 4S and newer.

  • Ragtime

    Sorry but this lags also on android high end devices and a game like this should really run smooth even on an old iphone.

    Here are some tips.

    1) (Most important and probably the real cause of your lags) NEVER use text objects updated every tick with WEBGL turned on. Remove them and let me know if you're gaining some performance.

    2) If you want to test on iOS don't use chrome. Chrome for iOs is a skinned version of safari. Try the CocoonJS launcher instead or an exported ejecta build.

    3) If you're targeting iOs, even if you're using CocoonJS or Ejecta use Canvas2D instead of WebGL. I've never seen a game run better with WebGL turned on on iOs. The situation will revert only when iOs8 will be out since this update will contain (finally) a proper native WebGL support and a modern JS interpreter.

  • Your game even before it starts is using 6% of my i5 3570K CPU. That's very high for nothing on the screen.

  • disable webgl

    • WebGL disabled
    • 6 objects on screen (no changes when disabling the text boxes)

    An iPhone 4 should be able to handle that, shouldn't it?

    I'll use the CocoonJS launcher but still... this is crazy. I may try with an empty scene, just for fun...

  • The CPU usage is incredibly high even on my desktop machine.

    Probably there's something wrong in your event sheets causing this cpu drain. Can you share your capx?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Here is the capx:

    Hope you'll find what is depressing me!

  • How can I disable WEBGL on ejecta?

    it is sufficient to disable it from C2 project setting?

    thank's

  • I was going to look at the capx. But uses a SpriteFont that isn't official. I will pass on installing a plugin I won't use. Good luck. When sharing CAPXs the less thirdparty plugins the more likely someone will take a look.

  • I was going to look at the capx. But uses a SpriteFont that isn't official. I will pass on installing a plugin I won't use. Good luck. When sharing CAPXs the less thirdparty plugins the more likely someone will take a look.

    Oops sorry. Here is a version without any third-party plugin:

    https://www.dropbox.com/s/se1hgpmolywsi65/FootRunner03-005.capx

    I made it a little bit cleaner but it's still laggy on iPhone 4 & 4S.

  • Did you try removing all the text boxes? You are using 5 of them, try using spritefonts (dont go into detail, just use the standard spritefont and check if there is difference). I don't have any iphones but it runs fluidly on my bb10. Removing text objects made it gain 5-10 frames on my pc debug preview. I think it will help. iOs is a little bit problem becuase of js handling, cocoonjs helps.

  • Disabling WebGL usually significantly reduces performance. See Performance tips. To further investigate a particular project, as the manual entry says, test very regularly on mobile and then you can see when a particular change has a significant impact on performance.

  • Just for you to know, on my Lumia 920 with Windows Phone 8.1 I got 60fps with 29 objects with no drops of changes during gameplay. But over 50% of CPU usage. Mostly 55~57%

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