Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Creating E-Learning Games with Unity

You're reading from  Creating E-Learning Games with Unity

Product type Book
Published in Mar 2014
Publisher
ISBN-13 9781849693424
Pages 246 pages
Edition 1st Edition
Languages
Author (1):
David Horachek David Horachek
Profile icon David Horachek

Table of Contents (17) Chapters

Creating E-Learning Games with Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introduction to E-Learning and the Three Cs of 3D Games 2. Interactive Objects and MissionMgr 3. Mission One – Find the Facts 4. Mission One – Future Proofing the Code 5. User Interfaces in Unity 6. NPCs and Associated Technology 7. Mission Two – Testing a Player's Learning 8. Adding Animations 9. Synthesis of Knowledge 10. An Extensible Game Framework Pattern in Unity Index

Chapter 3. Mission One – Find the Facts

Recall that in the first two chapters, we developed the core technology for a camera, player controls, interactive objects, and a mission-tracking system. Now it's time to apply our technology and make our first learning objective. Our e-learning game will educate the user on the 50 American states, the state flags, and some state trivia. In this chapter, we will assemble the systems we have created thus far and develop our first playable game level—the first of three in our final game.

In this chapter, we will cover the following topics:

  • Introducing mission one: find the facts

  • Designing games to maximize fun

  • Implementing the core classes for mission one

  • Playing the level

Finding the facts


In this game, the hero (player) plays the park ranger in charge of cleaning up Confederation National Park. In mission one, the park ranger has to find the missing flags for the flag monument and return them to their holders. The user will have to find five of 50 US flags. They will be placed at random locations in the world. The user will have to collect them, read about the associated states' trivia, and then bring the flags back once all the five flags have been found. The game comprises the following components:

  • FlagLocators: This GameObject hierarchy contains a set of potential flag locations. From these 10 potential locations, five will be randomly chosen.

  • Terrain: We introduce the terrain editor in this chapter and create a terrain mesh to replace the ground plane from Chapter 2, Interactive Objects and MissionMgr. As our design requires us to have a park-like setting for our game, the terrain editor is the best candidate for building this in the editor quickly and...

Designing games to maximize fun


Prior to designing the first playable level in the game, an understanding of how to model fun in games is required. Have you ever been involved in an activity and lost track of time, such as playing a game or otherwise? Cognitive psychologists call this mental state flow, and it is thought to be one way of maximizing fun. This is desirable because when the user is most engaged and having fun, learning and retention of information is maximized.

Game designers are interested in how we can design games that maximize the likelihood of the user entering this mental state.

It turns out that we have a model for how to entice the user to achieve flow. Consider the previous diagram that illustrates the relationship between the difficulty and the skill required for a given task. This is when the activity is moderately challenging and under moderate pressure. If the activity is too hard or too easy, or if the situation is too boring or too stressful, it reduces the likelihood...

The teaching loop in game design


There are three stages of teaching in games described as follows:

  • Presentation: In this stage, factual information is presented to the user. In a gaming situation, the user participates in engaging game mechanics to discover or interact with the objective material to be learned. The game mechanics provide incentives and challenges to encourage the player to enter flow.

  • Application: In this stage, the user participates in game mechanics while employing the facts from stage one. The game mechanics reinforce good behavior as well as recall and mastery of the material from stage one. The game also reduces negative behavior—failure to recall and master the material from stage one.

  • Synthesis: In this stage, through interactions with novel game scenarios, the user has to apply the mastered knowledge to new situations. By doing this, mastery and consolidation is further heightened, and a higher level understanding and insight is achieved in the subject matter.

Implementing the core classes for mission one


In this chapter, we will start creating mission one, which presents US geography to the player (state name, flag, and trivia). Let's begin by creating the classes and GameObject instances for this level. To begin, create a new scene file and name it TESTBED.

Creating a terrain

Let's create a nice terrain mesh to replace the ground plane from the previous two levels. With this, we can create a nice-looking mesh for the ground that resembles a park with grass, mountains, and trees by performing the following steps:

  1. In the Assets menu, navigate to Import Package | Terrain Assets. Click on the Import button on the pop-up window that appears next to bring a library of models and textures into Unity for use with the terrain editor.

  2. To create a terrain mesh, let's navigate to CreateOther | Terrain, from the GameObject drop-down list.

  3. On the Set Heightmap resolution pop up that appears, configure the parameters to the following values:

    • Terrain Width, Terrain...

Summary


We have shown how to apply the Player, InteractiveObj, ObjectInteraction, InventoryMgr, and MissionMgr classes that we developed in the first two chapters to create a fun "collect-and-interact" mechanic system for our e-learning game. We also reviewed a model of fun and "gamification" and how this model can be used in e-learning games to design content that will present and encourage consolidation of learning objectives in the user.

Going forward, we will review our code thus far, and make some maintenance changes to future proof the code, ensuring we can extend it and that it will remain suitable for subsequent e-learning games with a different content.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Creating E-Learning Games with Unity
Published in: Mar 2014 Publisher: ISBN-13: 9781849693424
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}