Book Image

Flash Game Development by Example

By : Emanuele Feronato
Book Image

Flash Game Development by Example

By: Emanuele Feronato

Overview of this book

<p>You can't call yourself a Flash game developer unless you know how to build certain essential games, and can quickly use the skills and techniques that make them up.<br /><br />Flash Game Development by Example is an ultra-fast paced game development course. Learn step-by-step how to build 10 classic games. Each game introduces new game development skills, techniques, and concepts. By the end of the book you will have built ten complete games &ndash; and have the skills you need to design and build your own game ideas.<br /><br />The book starts with simple well known puzzle games: Concentration and Minesweeper. After learning the basics of game design you&rsquo;ll introduce AI with a four-in-a-row game. Then as you build your own versions of old arcade games such as Snake, Tetris, and Astro Panic. The book ends with a collection of modern casual classics.</p>
Table of Contents (17 chapters)
Flash Game Development by Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Where to Go Now
Index

Drawing the graphics


Let's start drawing all the graphics. A snake prototype requires:

  • A background, such as a grass field

  • A "game over" overlay, used to add a dramatic effect when the game is over

  • The fruit (collectible)

  • The wall

  • The snake

They are all very easy to draw, except for the snake. In snake.fla, create four new Movie Clip symbols and call them bg_mc for the background, game_over_mc for the game over overlay, fruit_mc for the fruit, and obstacle_mc for the wall. Set them all as exportable for ActionScript. Leave all other settings at their default values, just like you did in previous chapters.

These are the objects I drew:

From left to right, the background and the game over overlay (which is a bit transparent), both 640x480 pixels with registration point at 0,0. Then, the collectible fruit and the deadly wall, with registration point at 0,0 and inside an imaginary 40x40 pixels square. This is also the size of the tile the game is based on.

Drawing the snake is a bit harder because you...