Which process of hiding an actor is less processor intensive? When to use which?
Hi gamesalad community! I was wondering if someone can help me, I wanted to know which process of hiding an actor is more efficient (Better for high frame rate)? Changing an actor's alpha channel to 0 or turning the visible attribute to false (under graphics)? Also is there any tips on when i should use one and not the other? Thanks!
Best Answers
-
jckmcgraw Posts: 647
@TWEAmazingApps
I always use self.color.alpha and I haven't had any problems with it. This way, if you want to change the alpha to 0.5, the visible will be on no matter what. You can also use interpolate to have it fade out (which you can't do with self.graphics.visible).
Hope this helps,
Jack McGraw -
JohnPapiomitis Posts: 6,256
Well changing its visible attribute off is better, but you cant change that in game. So you'll have to use alpha -
JGary321 Posts: 1,246
Like @jckmcgraw said you cannot change self.graphics.visible with rules.
If it's something that EVER needs to be visible, but you just want it invisible for the time being than use self.color.alpha.
If it's something that NEVER needs to be visible, use self.graphics.visible.
I don't think changing alpha really helps with performance, while changing the self.graphics.visible does help. (performance-wise)
JG -
mynameisace Hull, UKPosts: 2,484
Yeah, it'll still fire. Just click the plus and have when touch is pressed AND self.color.alpha is 1 then DO
Ace
Answers