Game Development Reference
In-Depth Information
are precoded to tell the engine all of the possible directions the tank can move when it reaches
that cross intersection. The advantage of coding maze-based movement in this manner is
simplicity. The game maze is hard-coded and there is no need for the game developer to attempt
to write code that will work in any conditions other than the ones precoded into the game. The
disadvantage is that once the developer has created and hard-coded the logic for movement into
the maze, building additional maze levels takes just as much time as building the first.
We will not do that here. We are going to create a game level engine and a set of maze
movement algorithms that will be able to work dynamically—we mean that once we have created
the logic rules for moving about the maze, all game levels will share that same logic. We will
create an engine that works smoothly, no matter how the tiles are organized (to a point), so level
creation will be as simple as drawing boxes on a screen.
Here's the basic information for this game:
Name : No Tanks!
Genre : Maze/chase/shooter
Description : The player must traverse a 2D maze looking for the stolen artifact. Enemy
tanks will be stationed in the maze to defend the artifact.
Player Goal : Collect the artifact on each level to progress to the next. The player will
have a limited amount of ammunition but can collect ammunition that has been left by
the careless enemy. Surprisingly, both the player tanks and the enemy tanks use the
same type of ammunition! The player starts with three tanks but can collect more that
are scattered throughout the game levels.
Enemy description : Enemy tanks will chase and fire on the player tank once it enters
the zone that an enemy tank is guarding. The game screen will be split into four zones.
Enemy tanks will employ a basic maze-chase artificial intelligence (AI) and will navigate
around objects to find the player. If the player is in the line of site, the enemy tanks will
fire at the player.
Enemy's goal : Destroy the player's tanks.
Level end : The level ends when the player has successfully collected the artifact.
Game over conditions : The game ends when all of the player's tanks (lives) are destroyed.
Difficulty : Game difficulty is ramped through level specific variable settings. The game
level designer can add as many enemy tanks as desired to a level and can make
ammunition scarce at higher levels. Also, the fire rate and intelligence of enemy tanks
can be set in the level variable data.
Game development concepts in Chapters 6 and 7
Here is a brief rundown of the game development concepts we will cover in this chapter and the
next:
Chapter 6
Using tile sheets for game graphics
Creating a tile sheet in a graphics program
Search WWH ::




Custom Search