How do I fix the lagging issue in game?

Get help using Construct 2

Post » Mon Mar 06, 2017 4:55 am

Hi
I am making the side shooter game I used lossy png and jpg, but the game has slow down after some time. All object are moving very slow. I am using "dt*" when moving the objects as per the Ashley's tutorial.
Anyone knows what should I do?

Thanks in advance.
B
38
S
9
G
1
Posts: 74
Reputation: 2,660

Post » Mon Mar 06, 2017 9:31 am

Have you tried looking at the debug mode preview? There's a section you can click called Profile, which gives cpu utilization stats, divided by your event sheets.

It should be able to give you an idea of what event sheets are causing the brunt of increased cpu utilization (if any) and help you narrow it down. An example is having an event poll C2 every tick, that's somewhat cpu intensive at times.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 525
Reputation: 19,602

Post » Mon Mar 06, 2017 11:26 am

Without a CAPX it is hard to say what causes the lag but open loops and On Every Ticks are usually the culprit.

Sound effects not properly handled can also cause lag.
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Post » Mon Mar 06, 2017 1:23 pm

radhaw wrote:the game has slow down after some time.


I'm guessing you've got too many objects, either from creating too many or more likely not destroying them once they've gone past the player.

Check the object count in debug mode.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
33
S
9
G
7
Posts: 450
Reputation: 6,780

Post » Mon Mar 06, 2017 1:46 pm

Thanks a lot for the reply, Guys ! I will try your suggestions. :)
B
38
S
9
G
1
Posts: 74
Reputation: 2,660

Post » Mon Mar 13, 2017 7:56 am

Solved the issue guys, many objects were not destroyed that why the game was slowdown. Thanks a lot again..:)
B
38
S
9
G
1
Posts: 74
Reputation: 2,660


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], brunopalermo, R0J0hound, trance and 23 guests