Disabled Group in Event - any performance cost?

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)