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

Adding the board


The first thing we will place on the stage is the game board.

The idea: We just need to draw a game board that looks like the one in the original board game. A rectangle with a series of holes will fit our needs.

The development: In connect4.fla, create a new Movie Clip symbol called board_movieclip and set it as exportable for ActionScript. Leave all other settings at their default values, just like you did in previous chapters. Then draw a rectangle with registration point at 0,0 and create the holes, doing something like this:

From the picture you can easily determine the size of the board, in pixels:

  • width: 60 pixels * 7 columns + 5 pixels * 2 = 430 pixels

  • height: 60 pixels * 6 rows + 5 pixels * 2 = 370 pixels

You are free to give your board the size and shape you want, but during this chapter I will refer to these sizes, so if you are an absolute beginner I suggest you draw the board the same way I did.