How do I optimize events ?

0 favourites
  • 5 posts
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • If you have 3 events like this :

    |Condition A

    |Condition B

    .........|Condition C : do this

    ...............................................

    .........|Condition D : do that

    Is it lighter than 2 events like this ?

    |Condition A

    |Condition B

    |Condition C : do this

    |Condition A

    |Condition B

    |Condition D : do that

    or is it strictly the same ?

  • I would think it'd depend on how computationally heavy Condition A and B are.. in the second example, you're calculating it twice, whereas in the first example it is calculated once. I think the first example would be better.

  • Thank for your answer Prominent,

    So can I conclude from that point that it is genuinely better for optimization to have as much as possible conditions separated into their own events in order to compute them more logically ? It doesn't matter to have 50 events instead of 20 if it is to actually prevent calculating same things multiple times right

  • If I understand correctly, yes. Shouldn't matter the number of events. More importantly is how process-intensive those conditions are. If you can do something once instead of X number of times, it's better to do it once- unless you have a reason that it must do it multiple times.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok thank you very much !

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