Copy link to clipboard
Copied
I have a 2d isometric game in which a user can walk around a house.
The house is made up of multiple 1x1 wall tiles, floor tiles etc. For performance reasons I would like to use blitting to draw all the non-animated parts of the house (the floor, walls, furniture etc).
My game also has animations though. For example, the player movement animation or a ticking clock on the wall. These I have animated in Flash Pro and exported them as .swfs to use in my game.
I cannot simply draw the house using blitting (copyPixels()) and then add the animated movie clips to the display tree ontop of the bitmap. This is because some of the animations (e.g walking animation) will in some cases need to be drawn underneath certain parts of the house. I need to be able to 'insert' the movie clip half way through drawing the house. Is there any easy way to do this?
I can't really blit the animated movie clips either as some of them have very many frames (although a lot of the frames are just copies of eachother) and If I were to cache all the frames my memory use will be too high.
different parts of the house can be blitted to different depths.
Copy link to clipboard
Copied
different parts of the house can be blitted to different depths.
Copy link to clipboard
Copied
Do you mean something like this?
this.addChild(blittedBitmap1);
this.addChild(movieClip1);
this.addChild(blittedBitmap2);
this.addChild(movieClip2);
this.addChild(blittedBitmap3);
and so on
Copy link to clipboard
Copied
yes.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now