Game Development Reference
In-Depth Information
Chapter 4. Adding
the
Play
in
the
Gameplay
Now that we have our input in place, we're ready to add it in the gameplay and turn
this collection of systems into a game. There are many different systems that work to-
gether to make the game interactive and playable. Not all of these are needed for all
games, however, so you need to look at what your game requires and only implement
what is needed.
In this chapter you will learn about the different software modules involved in making
a game, and see how to implement them into the sample game that you are creating.
We want to create a game where the players control their space ships, destroying en-
emies that fly toward them with basic Artificial Intelligence (the logic that allows the
computer to appear intelligent and make decisions, often autonomously). To achieve
this, we need to look at ways of structuring a game, how to manage the different
objects on screen, and how to communicate between the different systems to make
everything work. Right now we have input and graphics; however, we need to still
make some changes to make these easier to work with. We'll begin by implementing
a system to manage the ships and objects in the game, and then adjust the existing
systems to work nicely.
While working on this game, we will cover the following topics:
• Structuring our gameplay objects
• Collision detection
• Improving the renderer
• Spawning enemies
• Add some AI to the enemies
• Victory and defeat states
Structuring a game
One of the first things you need to remember when working with game development
is that there are many ways to structure games, and each has its own benefits and
problems. Designing the right architecture for your game can lead to many benefits,
and just as when creating any other application you should consider your options and
Search WWH ::




Custom Search