Should I destroy actors out of camera view (platformer) ?
![machinegunkelly](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
I know ( or think ) that gamesalad has a trash removal system that will remove actors that fall out of the scene, but I'm wondering specifically about longer platformer levels...
My current levels are 30000 px wide and action only moves to the right, do I need to destroy objects as they fall off the screen ( but still in the scene area ) to the left?
thanks in advance friends!!!
My current levels are 30000 px wide and action only moves to the right, do I need to destroy objects as they fall off the screen ( but still in the scene area ) to the left?
thanks in advance friends!!!
![:D :D](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/grin.png)
Best Answer
-
tatiang Posts: 11,949
You do need to manage the actors. If you don't reuse them within the scene, destroying them is a good idea to improve efficiency (speed/memory, etc.). This can be accomplished with a simple rule: When self.position.Y < 0-self.height/2 --> Destroy Actor.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
Note: If an actor falls too far off the scene (not camera) it will self-destruct. For example, an actor at x: -1000, y: -1000 will auto-destruct.