Search code examples
actionscript-3flashbackgroundsmoothingstage

Bigger stage vs scrolling background


I'm making a flash game, and I can't decide to use a bigger stage or a smaller one, with scrolling background to make it run smoother. I's going to be some kind of strategy game if it matters.

Thanks


Solution

  • There are many, many variables that determine the performance of your application.

    To answer your question, a smaller stage area will make your program run faster. The amount of difference will depend on the way your application deals with display objects. Flash will not render things that are completely outside the stage bounds. So keeping only those objects that are needed at any given time on the stage is a good practice.

    using flash player 11's new stage3D features (even for 2D stuff) will likely make your game very smooth. Lots of good frameworks out there that can take care of the low-level stuff if you don't want to get into it. For 2D, starling is very easy to get started with, and seems to be Adobe's favored framework.

    At a bare minimum, make sure you use GPU acceleration in your output/compiler options.

    There are LOTS of other tips for optimization people could get into, but that is better suited for google searches as Stackoverflow is about specific questions.