My Game has started to stutter and freeze when running it

Discussion and feedback on Construct 2

Post » Thu Aug 07, 2014 10:45 pm

I have created a level for my game so far, and in my level I have 6 enemies with a health bar that can be destroyed, and they shoot the player as well and do damage. The game has been running smoothly, and then when I went to run the game again when I opened it, it started to stutter and freeze in certain areas you move to, which didn't previously happen.

An instance of this is when you hit a wall, and the game slows down completely, and I don't understand why this is happening, so help on this would be much appreciated.

My computer is more than capable than running this software, and I have tried CCleaner to see if that works, and it hasn't.

Thanks, Josh.
B
3
Posts: 2
Reputation: 175

Post » Thu Aug 07, 2014 11:03 pm

It might be an object spawning one too many times.

The debugger can give you some information on running objects and fps
B
15
S
2
Posts: 69
Reputation: 1,270

Post » Thu Aug 07, 2014 11:12 pm

Fps is always between 50 - 60, and I have just stopped the enemies from moving and there is no lag anymore but when I activate it, it does
B
3
Posts: 2
Reputation: 175

Post » Fri Aug 08, 2014 1:31 am

then you just answered your problem yourself its something in your enemies events . if you want us to help more we need to see some shots of your code or a .capx file to see whats slowing it down
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Fri Aug 08, 2014 2:01 am

avoid every tick event (every tick, is on layer , is visible etc ...)
enable collisions only when it is necessaire
optimize your all your sprite size
set web gl to on
set clear background to no

try to read performance and optimisation tutorial on forum

if still same , you have to post . capx to see what go wrong

i believe that construct 2 can do fantastic game with nice effect ... just take look too scierra game but we have to learn more and more about different features AND every one his own logic .... an action can be made by different way ... it depend of every person logic ;)
B
44
S
16
G
8
Posts: 791
Reputation: 8,279

Post » Wed Feb 04, 2015 5:15 pm

@matrixreal how many "every tick" events would you say is too many when working with iOS 8.0+? Are there any things I should avoid putting in every tick that might not be obvious?
B
10
S
3
Posts: 12
Reputation: 695


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests