Game Development Reference
In-Depth Information
Instructions screen : Contains a Start button and the text Drive over all hearts before timer
runs out.
Game over screen : Contains Time Up text plus a Restart button
We need to add the following score board text elements:
A Score display
A Hearts display, shown as hearts collects / hearts needed
A Time display, shown in seconds
Modifying the Library class
We will add sounds for Flex into the Library class and eliminate the need for the asset SWF
from Flash.
Adding the custom LevelInScreen Class
We will add code to Main to modify the LevelInScreen dynamically. This will allow us to add a
new text field to tell the user the number of hearts that must be collected on the level.
Transitioning between levels
Main.as will need to be modified to allow the Game.as class to move onto to screen and for the
LevelInScreen to fade out.
Understanding free-form tile-based movement
There are many ways to move game characters on the screen. In Chapter 7, we created the No
Tanks! game with smooth tile-to-tile movement. In that type of movement, we limited the tank
movement to the center of each tile but smoothly animated the tank between tile centers. In this
chapter, we will use a different tile-based movement called free-form tile-based movement.
Defining how free-form tile-based movement works
In free-form tile-based movement , the game world characters can move and make decisions on
any pixel on the screen, which requires a completely different set of code and algorithms from
Chapters 6 and 7. We will forego all code that checks for the tile location based on the center of
the tile and instead use a system of look-ahead points to check against the next tile (or tiles) the
player might run into.
Our car can rotate and move 360 degrees in an overhead view. We sometimes call this type of
movement n -way movement , because the game character can be coded to move in any number
of directions—not just the four directions from Chapters 6 and 7.
Tile scrolling is a method by which the game output screen is made up of a small portion of the
actual game world. The world is made up of a 2D array of tile values.
Search WWH ::




Custom Search