I'd like to get a better understanding of how Flash renders display objects, so I have a better idea of how to optimize my games.
I previously created a game that had a scrolling, repeating (and parallaxing) background. I tiled it and cached as bitmap, which was quite a pain when taking animating display objects in the background into consideration. Is there a better way to do this?
Another question is if I have a large bitmap (or vector art that I have cached as bitmap), is there any kind of performance hit if it is completely off screen? How about if it is partially on screen - does flash have to render the entire bitmap, or just what it sees on screen?
If it's not within a scrollRect it's rendered, even if off-screen. It would perhaps be a good idea to have an ENTER_FRAME listener or something similar to detect when the clip reaches the stage width, then addChild another instance of your background to the end of the scrolling movieclip. Then, for performance, use scrollRect to only render what's on the stage at that current time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With