I’ll try to be more clear:
If youve got a bunch of instances of one class with its own 96×128 tileSheet, thats a waste. Ideally they should only have a bitmapData that is of the tile width and tile height – if any bitmapData at all! (more on this later)
Even with 20 troops, thats
96×128 = 12288*20 or 245,760 pixels being stored
versus (assuming 32×32 tiles)
32×32 = 1024*20 or 20,480 pixels being stored (or about 1/10th)
You misunderstood the concept of a tileSheet holding class. You only create it once for each particular tileSheet. So solderTileSheet:TileSheet mageTileSheet:TileSheet orcTileSheet:TileSheet. You pass this to each instance of solder, mage, and orc (say they are all Sprites) for their use. So even with 20 soldiers, there is still only ONE tileSheet between them, versus 20 personal tileSheets that they each shift around according to their current tile…
You will not need 150 bitmapDatas for a copyPixels operations for each ‘unit’, unless you plan on having a bitmap inside each sprite…
By the way, use Sprites instead of MovieClips, if you are not using the timeline at all. (I.e. doing pure code in flashDevelop) they are MUCH, much faster and cheaper and are fully qualified as display objects.
..You only need one copyPixel operation per unit. Whether you are doing this operation within each Sprite, into its personal bitmapData, or straight from the tileSheet to your screen-sized canvasBitmapData (a technique called blitting)…its very very fast. Once you try it I doubt you will go back to something else…but like you said maybe you wont need it. Depends on how many effects and everything you will have going on at once, or if you are going for something simple and can get away with a little waste ;)
Even with a personal 32×32 bitmapData for each of your units its still 1/10~ the size of having each unit have its own tileSheet…Like I mentioned if you want to go the extra mile for those cheap/older machines out there (a good chunk of audience), you can get away with only one instance of each tileSheet using copyPixels.
By the way, if you have 150 different troops, you will have to be storing each of those tileSheets/bitmapDatas on the user’s RAM regardless (as embedded into the swf). Why not keep it at that? (rather than those, PLUS a tileSheet for each unit that is actually on the field)
Since you are using straight bmd you dont need cacheAsBitmap…its only useful for non-dynamic vector-art inside a displayObject that is being masked (what it does is keep the whole thing from being processed every frame, but instead just what is inside the mask) As the name suggests its just converting the vector to a bitmapData and rendering to the masked area.
Anyways, if anything please use Sprites instead of movieclips :3 Just know that with pure blitting you can get up to 1000 objects moving around on screen taking mayyyybe 20MB mem max at 30 fps