Game Development Reference
In-Depth Information
how well they fit the type of game you are creating. Let's take a look at some widely-
used options.
Traditional object-oriented design
One way to design games is to use the traditional object-oriented approach. Here we
treat the different parts of the game as objects that represent what they represent in
the game. For example, a ship in the game would consist of a Ship class, or a bullet
in the game would consist of a Bullet class. By utilizing inheritance, different types
of Ship objects can be provided, and a common code can be reused by each type,
reducing the workload required to develop the functionality.
Let's take a look at how we would structure this game using this method. First let's
identify the visible objects we have that affect the gameplay:
• Player
• Enemies
• Bullets
• Bombs
• Power ups
• Score
• Background
There are some other objects that we need to consider alongside the ones men-
tioned in the preceding list:
• AI Paths
• Transforms (X/Y/Rotation)
• Settings
• Screens (Main menu/In-game)
• Enemy Spawner(s)
• Input Manager
• Enemy Manager
• Bullet Manager
• Renderer
• Texture
Search WWH ::




Custom Search