Planet Burster! Defend your planet form spontaneously appearing planets. This is another Flash experiment for the mobile platform. This time it’s to test the touch functionality of the phone and how to detect and use touch events.
If you have an Android phone with flash installed you should be able to play with this little toy by simply navigating to the following link using your phone’s web browser:
Note: this toy also works with the desktop because it detects whether or not to use touch inputs or mouse.
How to play:
Press or click anywhere on the screen, drag, then release. The velocity is fixed, so the dragging only effects the angle (the length of the drag line does not matter, except that you might find it easier to aim the longer the line is).
Random Planet Generator: I used a set of layered clips to accomplish this effect. Layers: Ocean, Continents, Clouds, Polar Caps, Shading. The ocean, continents, and clouds have random color transformations and filters applied to get the random colors. I manually drew a set of continents in a long strip and then offset the strip and mask it using a circle outline of the planet (same for the polar caps and clouds). Just a few simple tricks and I get some pretty cool looking random planets. Some of the random planets look weird but occasionally they are very interestingly color coordinated.
Planet Burst Effect: This was also a major technical milestone that I’ve been working on in a different project that I integrated into this demo. I was inspired by the Tron Movie character death effects: how they broke up into a bunch of cubes. After studying and experimenting with the Bitmap, BitmapData and Matrix classes I was able to achieve cool burst effect. Many developers before me have already figured this stuff (the Bitmap and BitmapData classes have been out for some time now), but it was cool to finally get around to playing with these classes.
Screen Layout Autosize: If you rotate your phone the screen will automatically adjust. This toy will work on any screen size (it is not biased towards a particular phone).