NOTE: It takes a few seconds for all the components to load in and the car to become drivable. Also make sure you click your mouse onto the car to activate the game window, and then keep pushing the arrow keys until the car starts moving.
To play the above Flash game, use the up arrow to drive forwards, and the left and right arrows to turn and steer. Hold down both Up and left at the same time to make the car drive around in circles.
Be careful because the car can drive right off the screen !
Sometimes it reappears, but usually it does not.
This "move and rotate" game was made by following the instructions in Gary Rosenzweig's excellent book: "Actionscript 3.0 Game Programming University". I followed his code, but got my own sprite for the car from the Google Images on the web, and used a computer game map as the background.
Both of these images were first modified using Adobe Fireworks, before importing them into Flash CS3.
Gary has several other great games to make in his book, and a set of accompanying resource files that can be downloaded from the web. I am having great fun working through his book, and might put some more of his games up here in future posts.
Check out his website at: http://flashgameu.com/
I recommend this book to anyone who is interested in Actionscript 3.0 Flash programming, because the book is brilliant! It has very clear and progressive step by step projects, and contains really well thought out and fun games to make with Adobe Flash CS3.
The following PDF gives a brief explanation of how the Trigonometry math works in the car driving project.
If you would like to have your own full size copy of this PDF, then simply click the save disk icon button on the PDF viewer, and you should be able to save it to your own hard disk.
Alternatively, you can view or save the full size PDF by clicking the link below:
So if you like to Flash, then Gary's book will be very revealing !
Enjoy,
Big Passy Wasabi
No comments:
Post a Comment