1

In actionscript3 (cs5.5 or flashdevelop), what is the best practice for managing off-screen display objects?

Option A: While loading the level, place all objects on the stage (even the ones way waaay offscreen)

or

Option B: Keep track of which objects should be on screen, adding them to the screen when they should be there, and removing them when they shouldn't.


Option A is definitely far easier to manage, but which is actually the more performant of the two options? Is one better in certain scenarios? (ie. a tile map may benefit from managing which tiles are on screen (especially for huge maps), but perhaps flash takes care of all this behind the scenes?)

Adrian Seeley
  • 2,262
  • 2
  • 29
  • 37

1 Answers1

1

Option B is going to be a lot faster, most of the time. But for tile maps and similar, I would recommend avoiding the scene-graph and use manual bitmapdata-blitting instead.

Jonatan Hedborg
  • 4,382
  • 21
  • 30