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
41
S
9
G
1
Posts: 79
Reputation: 2,745

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: 534
Reputation: 19,620

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
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

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.
Find all the Construct 2 games that were on Steam Greenlight here
B
36
S
10
G
7
Posts: 477
Reputation: 7,019

Post » Mon Mar 06, 2017 1:46 pm

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

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
41
S
9
G
1
Posts: 79
Reputation: 2,745


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests