confusing performance

Discussion and feedback on Construct 2

Post » Fri Feb 27, 2015 11:34 am

Hey, I'm confused about something, check out this image, this is when launching my game:

Image

and this is after the game has been running for 10 mins, just standing still, stationary.

Image

I'm not sure if I'm reading this right, but I can't see what's adding to the event CPU% everything seems to increase maybe by 1 or 2 % which I can't figure out why yet, but that shouldn't constitute for a roughly 40% increase.

In the scene, there's under 1000 objects but I'd say maybe 4 - 600 of them are physics objects using box2D

I'm confused as to what could be causing the gradual increase in consumption. I have a few 'repeat x number of times' at the start of layout but after that not much.
B
41
S
12
G
8
Posts: 598
Reputation: 7,194

Post » Fri Feb 27, 2015 11:38 am

the 1 or 2 percent may not be that huge of a deal (perhaps even imprecision leading to that), but the cluster main group is what takes a big hit it seems, I wonder what this group is doing.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
43
S
18
G
18
Posts: 2,106
Reputation: 16,436

Post » Fri Feb 27, 2015 12:16 pm

@Aphrodite

Yeah I can't really figure it out, this is what's happening in the cluster main group:

Image
B
41
S
12
G
8
Posts: 598
Reputation: 7,194

Post » Fri Feb 27, 2015 12:26 pm

Its primarily the "On collision" under setup, try to disable that and let it run again. You shouldn't use "On collision" it is a performance killer :)
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,801

Post » Fri Feb 27, 2015 12:35 pm

ah I think it was the asteroids overlapping asteroids, destroy asteroids event that was doing it actually, I'm now using only 15% CPU at the start, will leave it running and see what happens.
B
41
S
12
G
8
Posts: 598
Reputation: 7,194

Post » Fri Feb 27, 2015 12:38 pm

@nimos100 - is overlapping better?
B
41
S
12
G
8
Posts: 598
Reputation: 7,194

Post » Fri Feb 27, 2015 12:43 pm

Yeah you should only use overlapping, never on collision. Did this test the other day. which compares the performance. Optimal you want to use "Is overlapping" and optimize it, that will give you the best performance.

Image
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,801

Post » Fri Feb 27, 2015 12:51 pm

If you're using On Collision, maybe try Trigger Only Once with it? I don't remember if that's possible, but triggering stuff only once always saves performance.

heh, "ass_destroyer"
Last edited by Hasuak on Fri Feb 27, 2015 12:59 pm, edited 1 time in total.
B
18
S
6
G
4
Posts: 221
Reputation: 3,275

Post » Fri Feb 27, 2015 12:52 pm

@nimos100 - shit! wow so is overlapping and trigger once it is then.

I'm still getting creeping performance, only less severe, I'll keep poking at it.

Image
B
41
S
12
G
8
Posts: 598
Reputation: 7,194

Post » Fri Feb 27, 2015 1:03 pm

You will use some CPU so will never get to zero, I don't think trigger once, will help improve performance. When I say optimize, its to reduce the amount of collision checks that is needed. Trigger once will still do 60 checks per sec, but you can try to disable it and see if you get worse performance, but I would imagine that it would be the same,

With optimization I mean you actively enable and disable collision on objects that there are no reason for C2 to check. For instant an asteroid not even near the player, there is no reason for C2 to check for collisions on that, so you could disable that, until it for instant is within a certain range of the player. Even though that will require more updating it will improve FPS. But it kind of depend on your program, how you can optimize it best I think.
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,801

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests