Tilt Project – “Save Dexter!”

November 14, 2010 § Leave a comment

I have to start by saying WOW! I am loving all the new assignments and features that we are learning in Flash. Starting off with “Motion Capture” and now getting done with “Tilt Technology.”  It is basically, an “accelerometer,” within mobile devices that has the capability to know how your phone is being moved, tilted or shaken. The movement of the phone, is being sensed, and the application or  game then acts accordingly. I think a good example of tilt technology would be looking at an image or a browser in your iPhone. So if you tilt or move your phone in an angle, lets say, in a  “landscape” or “widescreen” type mode, the image or the browser will also change angle accordingly. PhoneSaber is one of many tilt technology applications that you can take a look at. The iPhone accelerometer  detects the movement of the phone and matches it with the animated light-saber on the phone. So if you move your phone around, you can see the movement as well as hear the sound of the light-saber. Similarly, tilt, is quite popular within mobile games, where the phone itself becomes a controller, which gave me ideas for my project.

Concept

Being a fan of games, I quickly, went into search mode to see what type of game I can make and I liked the idea of the dodgeball game  but I wanted the ball doing the dodging. I just felt that tilt technology gives us a good smooth motion of a ball. I also liked the idea of giving this ball a bit more of a personality, and named him “Dexter.” He is named after a character on a show, also called, “Dexter” that I watch on HBO. He is a serial killer (unlike our Dexter) and  finds himself hiding and dodging the police all the time. I decided that our Dexter would need some spaceships to dodge and a planet that he calls home.  So every time you take Dexter home, you score a point and every time you are hit by an alien spaceship, you loose a point.

Design

FIrst, I decided to design the game in Flash but I found myself a little frustrated because I was not used to drawing out characters in Flash, unless it is absolutely needed. I realized it was taking too long so I decided to go back to my comfort zone, which is Illustrator and decided to export my designs as swf file and import it in Flash. SWF format gave me a nice smooth and rich transition to Flash,  as compared to jpeg or bmp format.

Troubleshooting with Code

I think the problems that I was having were mostly in how to make the spaceships move RANDOMLY and at different times. First, I decided to use a timer and addEventListener to each of the ship. So once a spaceShip does a tween.yoyo, I would call another function to do another tween.yoyo, which kind of worked, but it looked quite awkward. On the other hand, using the tweenlite with yoyo option worked perfectly!. I took my sweet time figuring out the score system though. I found tons of different types of code, and none that I could really understand. I made a rather simple  score system with a hitTestObject option to increase or decrease the score. I’m sure there are many other ways out there, which i will research and make the game better. Overall, I think I am quite happy with my project, and will definitely look into making it into a full game after adding a few new features in the game, like countdown timer, sound and firing bullets.

Source

http://www.emanueleferonato.com/

http://flashpunk.net/

Where Am I?

You are currently viewing the archives for November, 2010 at my IMM's blog.