Game Development Reference
In-Depth Information
Chapter 6
Laying the Groundwork for No Tanks!
In the previous two chapters, we explored how to make a relatively simple arcade game using
some advanced techniques. In this chapter and the next one, we will up the ante and dive further
into the once-murky depths of optimized Flash game development. We are going to explore how
to create a tile-based game world while constructing an arcade game called No Tanks!
In this journey, we will cover a lot of ground very quickly by introducing and explaining some new
and advanced topics at a rapid pace. First, we are going to explore how to create and use a tile
sheet and the code necessary for displaying it on the game screen. During this journey, we will
cover the necessary steps for arranging game world graphics on a tile sheet and how to use free
and open source tools to create levels for a game world. We will then cover how to use those tiles
in an optimized Flash game using copyPixels and blitting methods.
In the next chapter, we will discuss the game logic necessary to allow the player and enemy to
navigate the tile-based game world, including some basic tile-based artificial intelligence, and
we'll finish off our game by letting the player and the enemy tanks chase and shoot at one
another inside the maze. This will include adding some new classes to the reusable framework
and creating a new Main.as class to integrate No Tanks! with that framework.
The No Tanks! game design
We are going to create a classic style game in the maze, or chase, genre. The most recognizable
game in this category is Namco's Pac-Man. In our game, the main player will be a tank. Its goal is
to collect a single piece of stolen treasure on each level while destroying enemy tanks and avoid
being destroyed.
The maze will be made up of tiles, some of which can be moved on and some cannot. There will
also be ammunition, and extra lives (tanks) for the player to pick up. We will construct the game
engine so any number of levels can be created. As long as the level designer follows some
simple rules, the levels will be playable in the game engine.
In many game engines of this type, the developer goes to great lengths to supply data along with
Search WWH ::




Custom Search