Chapter 11. Putting the parts together into a complete game

 

This chapter covers

  • Assembling objects and code from other projects
  • Programming point-and-click controls
  • Upgrading the UI from the old to a new system
  • Loading new levels in response to objectives
  • Setting up win/loss conditions
  • Saving and loading the player’s progress

The project in this chapter will tie together everything from previous chapters. Most chapters have been pretty self-contained, and there was never any end-to-end look at the entire game. I’ll walk you through pulling together pieces that had been introduced separately so that you know how to build a complete game out of all the pieces. I’ll also discuss the encompassing structure of the game, including switching levels and especially ending the game (for example, Game Over when you die, Success when you reach the exit). And I’ll show you how to save the game, because saving the player’s progress becomes increasingly important as the game grows in size.

Warning

Much of this chapter will use tasks that were explained in detail in previous chapters, so I’ll move through steps quickly. If certain steps confuse you, refer to the relevant previous chapter (for example, chapter 6 about the UI) for a more detailed explanation.

11.1. Building an action RPG by repurposing projects

11.2. Developing the overarching game structure

11.3. Handling the player’s progression through the game

11.4. Summary