PacktLib: Creating E-Learning Games with Unity

Creating E-Learning Games with Unity

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Introduction to E-Learning and the Three Cs of 3D Games

Understanding e-learning

Introducing our game – Geography Quest

Comprehending the three Cs

Creating our first scene

Developing the character system

Building character representation

Developing the camera code

Developing the player controls code

Try it out!

Summary

Interactive Objects and MissionMgr

Understanding the base scripts

Building an interactive object

Putting it all together

Try it out!

Summary

Mission One – Find the Facts

Finding the facts

Designing games to maximize fun

The teaching loop in game design

Implementing the core classes for mission one

Summary

Mission One – Future Proofing the Code

Reorganizing our GameObjects in the Scene view

An introduction to Finite State Machines

Implementing the GameMgr script

Reflecting on our code changes

Analyzing code functionality

Updating some systems

Making the ScorePlate active

Updating the player motion algorithm

Playing the level!

Summary

User Interfaces in Unity

Getting familiar with Unity UI classes

Developing the pop-up system

Exploring the GUIText component

Exploring the GUITexture component

Exploring the TextMesh component

Creating clickable text elements

Exploring UnityScript and the GUIButton object

Building the main menu pop up

Testing our work

Future extensions

Summary

NPCs and Associated Technology

Creating the NPC GameObject

Implementing the SplineMgr class

Connecting SplineMgr to NPCScript

Implementing the NPC decision system

Building a collection of NPC conditions and responses

Putting it all together

Summary

Mission Two – Testing a Player's Learning

Exploring the structure of mission two

Defining the framework for mission two

Adding a mission to the missionMgr script

Extending the GameCam script

Modifying the terrain

Adding NpcRacers to the mission

Creating the start and finish line flags

Creating the LevelStart and LevelFinished pop ups

Creating the setupLevel2 Prefab

Creating the raceStartup Prefab

Implementing the LevelLogicObj GameObject

Summary

Adding Animations

Exploring 3D hierarchies

Skinned meshes in Unity3D

Exploring the Mechanim animation system

Exploring the Unity animation editor

Summary

Synthesis of Knowledge

Understanding the mission three GameObjects

Applying learning theory to mission three

Creating the structure for mission three

Modifying the pop-up system

Creating the NpcLocators Prefab

Creating the CorrectResponse Prefabs

Modifying the quiz cards

Adding another data condition

Using the setupLevel3 Prefab

Creating the AddScore condition

Creating the ShowLevel3Results response

Creating the Time object

Modifying the LevelLogicObj object

Rewarding the player

Summary

An Extensible Game Framework Pattern in Unity

Load additively

Using delete/load patterns

Refactoring our work

Refactoring level 2

Implementing a system to connect object references

Refactoring level 3

Playing and distributing your game

Reflecting on e-learning and game design

Summary

Index