Performance Question in CocoonJS

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

    I wonder if someone have the same issues with cocooonJS, let me explain:

    I have a game that runs fine in my tablet (nexus 7 old version) in the menus, then i begin to play and the first 5-15 seconds the fps are low, like 10-20. After that, the game runs fine, 50-60fps and then if i don't close the game i haven't more slowdowns, but that first seconds of gameplay are horrendous.

    Someone know if there is a solution? Like make a loading screen showing all diferent enemies/sprites in a hidden layer (so memory can load all before play) or something?

  • Just delay game start or logic for 5s .. show a "Stage 1" text then fade it out. Then game starts and players can move/do stuff etc.

    You can do this with a global variable, GameStart = 0, then On Start of Layout => Wait 5s, Set GameStart = 1 etc. Your player commands require GameStart = 1 to trigger.

  • Yup i do something similar, i also put in a fake loading screen when moving from layout to layout.

  • But i should show (behind the fake loading screen) all the objects or it's not necessary? I thought the problem is that the game is loading the resources in memory so when it finishes, the game runs fine, is this the problem?

  • russpuppy have you faced something like it? your game runs fine, and i'm wondering if you done something different.

  • vitorfgd are you talking about Run from Zombies? I don't think I am really doing anything different--that game is pretty lightweight and doesn't have a lot going on as far as graphics and sound to load. I have noticed what you are talking about though more in some of my other games.

  • russpuppy, interesting, i don't know what might be happening with some games though, but your game runs really clean. I've tryed a bunch of games made in construct in play store and there wasn't any which didn't glitched or something like that.

    At least on my phone device.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • vitorfgd a lot of it is trial and error, i do try to keep down on memory issues. Also my phone is a few years old (htc evo) which I think is good because it means if it works on my phone it will work for most other people's devices

  • russpuppy Can you explain on what you mean by memory issues and how you tackle them.

    ByR Keep your layout as it always was, just add a fake loading screen (to be topmost in the Z order). Destroy it after a wait event , you can set the 'wait event' time by testing how long it takes for your game's fps to normalize. I don't know why the fps instability happens at the start tho.

  • russpuppy, interesting, i don't know what might be happening with some games though, but your game runs really clean. I've tryed a bunch of games made in construct in play store and there wasn't any which didn't glitched or something like that.

    At least on my phone device.

    What's your device?

    My C2 games on Android run really smooth on a phone from 2010.

  • Do you think rooted phones with changed Governor settings might have some performance variations for C2 projects.

  • Thanks for the links. I readed them before, in fact, my game works fine even when reach 130-150 objects in mobile, but my only problem are the 10-15 first seconds of gameplay, and i can't find documentation about my problem.

    The idea of loading screen is nice, but 15 seconds are too much. I don't know if the problem is because at the beginning, the game is transfering all the objects to the memory, if that's the problem, then showing all the possible objects at the start of the game should work. I will test it.

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