Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So my environment is all set up and now I'm working on the movement physics of my character. I used blitting to copy over my tiles from a tilesheet. But since they are static, they are only copied over once. And with the Hero (main player character), I figured that I might blit him into his continuously changing position. But now, I'm not quite sure it's necessary?

Is there a real big perfomance-save to copy the Hero sprite into a new position constantly using Blitting, OR, is it fine to just copy it into the game once, and simply move the Hero sprite as a movieclip?

share|improve this question
    
Can you give us some more information? Is your original art vector? How many objects are going to be drawn at once? The more specific you are, the more specific I can make my answer. –  AttackingHobo Jun 9 '11 at 18:51
add comment

2 Answers

If you are moving 1 simple object around, blitting will not give you any performance increase.

But if you want tons of complex objects, particles and enemies, you should probably use blitting for everything.

share|improve this answer
    
Thanks for clearing that up. What if I wanted particles for visual effects, could I still JUST Blit those and still leave my User-controlled character still be moved around as a MovieClip? I guess what I'm asking is if it's normal to combine the blit method with simply moving Movieclips? –  Kid Jun 9 '11 at 23:45
    
@Kid, you should probably blit the player to a bitmapdata, and then have a bitmap that uses that bitmapdata, and apply rotations, scaling, position and all transformations to that. –  AttackingHobo Jun 10 '11 at 0:54
    
Sorry for the delay, been away. Ok so I think that is what I am doing. Look, first I copy (with copyPixels) the Hero-sprite from a Tilesheet that I have imported into the Library. Then I addChild(Hero) and move that child around. That Hero variable is of :Bitmap data type. Does this sound about right? –  Kid Jun 12 '11 at 23:29
    
Yeah that sounds right. Draw everything to the bitmapdata of the hero bitmap, and just move and transform the bitmap however you need to. –  AttackingHobo Jun 12 '11 at 23:39
add comment

A MovieClip still needs to be rendered by the Flash Player. If it's a animated vector shape, it will take longer than blitting a bitmap. But as AttackingHobo said, you might not see the difference with only one sprite.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.