BlueLight Wrote:Strange, i'm sure adobe said they wouldn't support flash anymore. Well oh well.
Duplicity Wrote:Am I right in saying garbage is assets that have been removed? Because I ran my vertical shooter game and it had garbage. And I know that the 'enemies' are removed once hit with the 'bullet' which is also removed at impact. Does this mean I need to remove them in a better way then just using removeChild();?
AnotherArrow Wrote:Yes... garbage is assets that have been removed. If removing them is drastically impacting performance, then yes, you'll need a better method (i.e. recycling used objects by storing them off-screen with "visible = false", then repositioning and activating them again when needed.
Gorepete Wrote:AnotherArrow Wrote:Yes... garbage is assets that have been removed. If removing them is drastically impacting performance, then yes, you'll need a better method (i.e. recycling used objects by storing them off-screen with "visible = false", then repositioning and activating them again when needed.
Bwaaaaa? That makes no sense. How does it save resources to store something offscreen (where it is still being tracked even if not rendered) instead of removing it completely from the stage? Adobe logic
We're talking about garbage collection. When you remove resources that are no longer being used, and in most cases, freeing up memory, time is spent dealing with that can could cause lag.Gorepete Wrote:Bwaaaaa? That makes no sense. How does it save resources to store something offscreen (where it is still being tracked even if not rendered) instead of removing it completely from the stage? Adobe logic
Duplicity Wrote:This is a noob question.
But if I switched say an enemy to visible = false when they were hit with the bullet. My ship would still be able to hit them right? Or is this the case of invisible = no interaction with other objects?
I am trying to understand the article. But it looks like visable = false still counts the hit boxes of the enemies. Hmm I might have to try this myself.
I am reading through Essential Actionscript 3.0 by Colin Moock. I am only up to chapter 3, so forgive me.
heh just saw who wrote the article AnotherArrow posted.
AnotherArrow Wrote:Also came across this Visible vs Alpha vs RemoveChild
removeChild(myClip);
myClip = null;
But if I switched say an enemy to visible = false when they were hit with the bullet. My ship would still be able to hit them right? Or is this the case of invisible = no interaction with other objects?
I am trying to understand the article. But it looks like visable = false still counts the hit boxes of the enemies. Hmm I might have to try this myself.
Users browsing this forum: No registered users