Disabled Group in Event - any performance cost?

Get help using Construct 2

Post » Wed Jun 05, 2013 11:00 am

Currently I am testing out performance of group in event sheet. I don't have mobile devices to test this out, but I would like to make sure that my understanding is correct:

How are disabled groups in event treated in event sheet? Right now, I have about 30 groups, but only 1 group from these 30 will be active at a time, while the rest is disabled.

Are groups treated like if statement like this?:

if (group1.enabled){
...
}

if (group2.enabled){
...
}

if (group3.enabled){
...
}

Does C2 have to check whether a group is active? Or does C2 simply "remove" the events of this group out from the event sheet during execution time, and does not have to check for the group's state?

(Why do I do this? Imagine a Kirby game which you can have many variety of forms)

While on laptops, I don't see any performance drop whatsoever. Of course, laptop is a beast, compared to mobile devices.

Will this reduce performance a bit, or am I just too paranoid? If it's you, how will you do a Kirby game?
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,459

Post » Wed Jun 05, 2013 1:29 pm

Apart from what's covered in the performance tips not much else will have impact.

If a group is disabled, it's simply not executed/tested.

So yes, you're paranoid, this isn't what really impacts performances in the end.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
276
S
103
G
84
Posts: 7,289
Reputation: 83,093

Post » Wed Jun 05, 2013 1:35 pm

Optimisation: don't waste your time. For this type of question, you are probably only changing how much time the CPU is waiting for the GPU to finish rendering by miniscule amounts, which will have no effect on the actual framerate.

FWIW, events inside disabled groups are skipped. Each group is checked if it's active, but that's such a small amount of work it should be considered zero work. You really should focus on the things in the 'performance tips' manual entry instead.
Scirra Founder
B
383
S
224
G
86
Posts: 24,117
Reputation: 190,442


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests