Need help on performance ?

0 favourites
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I have a question ? How the "Hay Day" game can create too many objects or sprites, and still work smoothly on my low Android tablet ( ram 512 mb ) ? While my game is using under 150 objects and under 20 mb images on a layout and still get crashes (no crashes with devices have Ram is 1 GB or above ) >.< I got stuck and tried too many ways , but no clue. Really need helps here

  • How much memory does Consctruct 2 estimate that your game is using?

    Is the 20 mb figure the run-time amount or is that the number the Construct 2 estimation?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's 20mb from ImageMemoryUsage in the biggest layout where the game crashed, and showed in my testing tablet Dragon Touch Y88. Is there anythings else could make game crash ? I don't think this is the main reason, because I tried to run game "Hay Day" in this same device, there are a lot of objects and images, it has a little bit laggy when dragging among layout but It still worked great and smoothly. If my code has some errors, it could make crashes on the others devices ( RAM 1GB or above ) , which never happened.

    • In C2, it showed : memory use 92.6 mb for my game
  • Today, i found some ways to fix my issue. The amount of images is not the main reasons, if I reduced the memory use of my game to 35 mb, it is still crashed, if in playing layout, ImageMemoryUsage is always under 21 mb, it still crashed. But if i didn't reduce memory use of images of the layout or the game, I limited the objects in playing layout always under 40 objects, no more crashes.

  • I found the main reason which caused my game crashed. It's text object. I replaced all the text objects with sprite fonts , my game run with better fps and no more lags, crashes. I wonder how heavy a text object is ?

  • Yes the text object, especially on mobile can hurt performance quite a bit. Start the switch over to Sprite Fonts and you will be much happier!

  • Ahhhh good info. I might wanna try out using the sprite font instead to get a bit more FPS.

  • I didnt know text can cause such a big problem...good to know....thanks..

  • Text objects? Really? I wasn't aware of this! This information will help me a lot. Thanks for pointing that out!

  • I also have a question about performance.

    For the game I'm working on right now I'm experiencing performance issues on laptops. The game runs at around 12-20% cpu and 60fps on my desktop computer where I develop the game but when I try to run it on a laptop the game tanks (FPS cut in half), even on a completely new laptop my brother got recently. So my question is: is there a difference between running C2 (HTML5) games on a desktop vs Laptop? integrated GPU vs desktop video cards maybe?

    Some info on the game, a typical level generally has:

    • 13 layers
    • 5 tilemaps (is this too much?)
    • 500-650 objects total

    The game uses 11mb of images.

    Desktop specs:

    W7 64x

    CPU: 3.0 GHz

    RAM: 8GB

    GPU: Radeon HD 6700

    Laptop specs:

    W8

    CPU: Core i5

    RAM: 8GB

    GPU: AMD Radeon R5 M230

  • eliasfrost, check to see if your gpus are blacklisted - that is the most likely cause of a massive slow down like that. My umbra game demo runs with >2000 objects per level, physics, shaders, 14 layers, >40 mb images... and so on, all at 60 fps as long as the graphics driver is supported - that goes down to less than half that if the gpu is blacklisted... Things to also check are collision checks per tick (hundreds can be ok, but it depends on your export target), object behaviors that are not required because the objects are off screen should be disabled if possible...

  • i use also text object in my game, i just want know why they make the game slow down? also i want know how to use font sprite and display text on it. and thanks

  • Colludium Thanks for the hint, I will look into the blacklist next time I experience something like this. I acually optimized my collision checks just a few weeks ago and halved the cpu usage.

  • i delete all my text objects and replace them with textbox object, but i don't See any big changes in FPS ( in stage 3 my FPS stay between 42-50

  • I think textbox object is as heavy as text object. Try to use Sprite fonts https://www.scirra.com/tutorials/684/ho ... rite-fonts

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