Game Development Reference
In-Depth Information
parallax scrolling. Much like in the real world, objects that appear
to be in the distance, such as mountains or buildings, can move at
a slower speed than objects in the foreground. We
'
ll discuss an
example of side scrolling animation in Chapter 7.
Tile-Based Games
Some game environments can be broken up into a grid, such as a
maze or strategy game. The artwork for the game can then be cre-
ated as tiles of a predetermined size. Although it requires more
work on the programming end to develop an efficient tile-mapping
system, it opens up games to the creation of a level editor to allow
end users to create custom maps. Starcraft and Warcraft are two
strategy games that feature very well-implemented tile systems with
editors. We
'
ll look at a tile-based game engine in Chapter 14.
Flash Development Terms
Before I end this chapter, here are a handful of terms that I
ll con-
tinue to refer to throughout the topic. Understanding the way each
of these items works will be key to architecting sound game code
down the road. In Chapter 4, we
'
ll dig into these concepts even
more in-depth, but this will serve as a quick overview.
'
Stage
In Flash, the Stage is the main content area upon which everything
is built. All other visual objects are placed on top of the Stage once
they have been added to it. Think of it as your game
'
s canvas.
Display Objects
A display object is any object that has a visual representation and can
be placed onto the Stage. There are many different types of display
objects in Flash; those most familiar to experienced developers will be
Buttons, Sprites, and MovieClips. Even the Stage itself is a special kind
of display object. The display objects all share some common traits;
they all have an x, y, and z positions on screen, as well as scaling and
rotation properties. Flash maintains lists of all the display objects on
screen at any given time, making them easy to access and manipulate.
Events and Listeners
Events are the primary means of communication between objects in
AS3. They are simply messages that objects in Flash can broadcast
or dispatch. Any object that has been set up to listen for them
receives events. They can be notifications of user input, information
about external data being loaded, etc. Flash has many built-in events
Search Nedrilad ::




Custom Search