Game Development Reference
In-Depth Information
Chapter 14
Game Project: The Villager RPG
In this chapter, a turn-based RPG game will be built using the lessons learned in this topic. The goal for this game is
to use RPG-like battle patterns to create a level-based game that can be deployed and scaled across multiple devices.
The skills you have already acquired from earlier in this topic will be used throughout this chapter, and a few new
techniques will be introduced including creating custom events and saving the player's progress using local storage.
There is quite a bit of code in this project, so before getting into it, a quick review of the game you will be building
is necessary.
The Villager RPG
The Villager RPG is a nine-level game; each level is a battle that contains enemies that the player must defeat. The
battle will be a turn-based battle system that involves a classic style wait bar, and a variety of attack and magic items
can be used to attack the enemy. A potion is also available to replenish hit points during a battle. This battle system
will be covered in detail in the “Reviewing the RPG Battle System” section.
The following items are the technical achievements and features you want to achieve in the game:
Build a nine-level game, in which all progress is saved to local storage when each level is
complete.
Each level will use a reusable game class that is a turn-based system where the player attacks
enemies by choosing from available attacks and items.
Each level will be formed by a single data object which will build the enemy grid, provide
attributes for level difficulty, and determine the rewards given when the level is beaten.
Enemy class that can appear and behave based on data provided to it.
Create a single
Create effects on the enemies to indicate the types of attacks that were thrown at it.
Event class to create a custom event that stores extra properties.
Extend the
Build a shop where the player can purchase items to be used in battle. These items can be
purchased using the coins earned in battle.
The last level should be a single boss enemy.
Figure 14-1 shows the game being played in its complete state.
 
Search WWH ::




Custom Search