Game Development Reference
In-Depth Information
Chapter 2. Interactive
Objects
and
MissionMgr
A well-designed and engaging e-learning game will challenge the user, track his or
her progress, and reward his or her performance appropriately. To do this, a series of
classes will be required that will separate what we are tracking with the way in which
we interact with it.
We will develop a system to implement a generic object that the user can interact with
and collect. We will also develop another system that lets us build an abstract learning
objective for the user to accomplish. We will then develop a system to collect objects
into an inventory that can be used by the player. Lastly, we will develop software that
tracks the user's progress towards these objectives and rewards him or her appropri-
ately for success.
In this chapter, we will cover the following topics:
• Understanding the base scripts
• Building an interactive object
• Putting it all together
• Try it out!
• Summary
Understanding the base scripts
The interactive Object class is the base script that enables a player in our game to
have meaningful gameplay interactions. To meet the design needs of our game, this
script provides an interface with which the game designer can specify how the player
will interact with an object as it is picked up. In addition to this, it also permits subtle
rotation on the object for a nice effect. The CustomGameObj and ObjectInterac-
tion helper classes are used by the object class to define the specific nature of the
interactions and how the object behaves in the inventory when collected.
The MissionMgr class is the system that tracks the user's progress through the
game and rewards him or her on achieving success. When a user interacts with an
interactive object, MissionToken attached to it (if any) is collected and tracked by
Search WWH ::




Custom Search