[SOLVED]Performance issues, freezing, crashing

Get help using Construct 2

Post » Sun Jul 08, 2012 11:51 am

Hi there,

I've created my first real html5 game using C2 and you can see it here

Now, the problem is that the game for some reason seems to have quite a quirky problem. To see what I mean please let it stay idle on level selection screen or on any level (you can mute the audio). Then go back to main menu. Once you do that, you'll notice that going back to main menu freezes the game for up to few seconds.

I would much appreciate any hints on how to locate the problem (only happens when going from level selection to menu). I'm not sure whether it's a bug or not, could as well be something I'm doing wrong. Or a hint on how to debug the thing?

Edit: Forgot to mention: if left for longer, the script crashes its browser tab even before I go back to menu.messmaker2012-07-09 02:06:10
B
4
Posts: 8
Reputation: 666

Post » Sun Jul 08, 2012 2:02 pm

Was pretty responsive in Chrome. Very hard to comment without seeing your .capx. If you're doing something like creating objects every tick (whether intentionally or by accident), that could cause a long delay while the engine destroys thousands of objects at the end of the layout. Could be anything else though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Jul 09, 2012 2:10 am

Updated as solved, found the cause! Of course it was my silly mistake, namely forgetting to put my loop that creates volume controls inside a "on start of layout", which in turn made it repeat infinitely. Things were going rather smoothly until user went to main menu, which was set to destroy those "on start of layout", thus freezing.

Tons of thanks for the tip, cheers!
B
4
Posts: 8
Reputation: 666


Return to How do I....?

Who is online

Users browsing this forum: abdalghani, Yahoo [Bot] and 22 guests