Performance question

Discussion and feedback on Construct 2

Post » Sun Aug 04, 2013 10:25 am

Hey all, I was just wondering if there is any performance difference between these two methods:

EASY WAY:

Boolean = TRUE: Set size to X
Boolean = FALSE: Set size to Y


HARD WAY:

Boolean = TRUE:
--sub-event: size equals X (inverted): Set size to X

Boolean = FALSE: set size to Y
--sub-event: size equals Y (inverted): Set size to Y



They both do the same thing, but as far as my knowledge goes, the first one will constantly do the process of resizing to X/Y even if it is already at that size. Whereas the second method would only perform the action if it was the wrong size.
Or, am I wrong, and the game will only perform an action if the result is different anyway? Or is there some other things I should be aware of?

I have a lot of this sort of stuff going on in my game, using the first version, and it runs fine, so this is more a curiosity question.
B
28
S
8
G
5
Posts: 429
Reputation: 6,977

Post » Sun Aug 04, 2013 11:03 am

Scirra Founder
B
382
S
222
G
85
Posts: 23,987
Reputation: 189,471


Return to Construct 2 General

Who is online

Users browsing this forum: Prominent and 8 guests