space invaders effects

Started by
0 comments, last by Cornstalks 14 years, 10 months ago
how do i create the green blocks ? It is not an image and it is simply drawn and when you shoot it , it crumbles . How do i create this effect of shooting down the green block? http://www.spaceinvaders.de/
Advertisement
It's simply just a square block that has an associated "health" with it. If the block has full "health," you draw it as a full green block. When you shoot it, it looses "health" and, depending on how much "health" it has, you just draw different versions of the block.

You could easily create a set of images, the first one being the full block with full health, the next image being the block missing a few pieces after being shot once, the image after that missing a few more pieces after being shot again, etc. Then, for each time you shoot the block, you just move down the list of images that show a slowly degrading, crumbling block. Once the block looses all its health and is destroyed, you just remove it from the game.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

This topic is closed to new replies.

Advertisement