DIPLOMA PROJECT
Android Educational Game for Kids
Joc Educaional pentru Platforma Android
Thesis supervisor:
Prof. dr. ing. Florica Moldoveanu
Graduate:
Dan Rzvan
BUCHAREST
2014
Table of Contents
1.Introduction......................................................................................................................................................3
1.1.Traditionalvideogames...........................................................................................................................3
1.2.Seriousgames...........................................................................................................................................3
1.3.Educationalgamesforkids.......................................................................................................................4
2.Gameobjectives...............................................................................................................................................5
2.1.Generalpurpose........................................................................................................................................5
2.2.Motivatingtheplayer................................................................................................................................5
2.3.Targetaudience.........................................................................................................................................6
2.4.Differentapproach....................................................................................................................................6
3.Overallgamedescription.................................................................................................................................8
3.1.Background...............................................................................................................................................8
3.2.Gameplay..................................................................................................................................................8
3.3.StoryGame...............................................................................................................................................8
4.MiniGamesDescription................................................................................................................................13
4.1.TidyUp...................................................................................................................................................13
4.2.Order,NotChaos....................................................................................................................................16
4.3.Groceries.................................................................................................................................................18
5.Thegamesoftwarearchitecture.....................................................................................................................20
5.1.AndroidFramework................................................................................................................................20
5.2.Technologiesused..................................................................................................................................20
5.2.1. Overview..........................................................................................................................................20
5.2.2. Unity3D4.3.3...................................................................................................................................20
5.2.3. VisualStudio2012...........................................................................................................................20
5.3.ApplicationArchitecture........................................................................................................................21
5.4.ClassDiagram.........................................................................................................................................22
5.5.GameStateDiagram...............................................................................................................................25
6.3DEnvironment.............................................................................................................................................26
6.1.Overview.................................................................................................................................................26
6.2.Specializedsoftwareused.......................................................................................................................26
6.2.1. Autodesk3DStudioMax2011........................................................................................................26
6.2.2. AdobePhotoshopCS5.....................................................................................................................26
6.2.3.ZBrush4R6..........................................................................................................................................27
6.3.ContentCreation.....................................................................................................................................27
6.3.1.3DModeling........................................................................................................................................27
6.3.2.Mapping...............................................................................................................................................29
6.3.3.Texturing..............................................................................................................................................30
6.3.4.MainCharacterpipeline......................................................................................................................31
7.Implementation..............................................................................................................................................33
7.1.UserInterface..........................................................................................................................................33
7.1.1.Menu....................................................................................................................................................33
7.1.2.GameUI...............................................................................................................................................35
7.2GameLogic.............................................................................................................................................36
7.2.1.StoryGameQuestsystem.................................................................................................................36
7.2.2.TidyUpCleaningmechanic.............................................................................................................37
7.2.3.GroceriesDoormechanic.................................................................................................................37
8.Testing...........................................................................................................................................................38
8.1.FocusGroup............................................................................................................................................38
8.2.CPU.........................................................................................................................................................39
8.2.1.Improvements......................................................................................................................................40
8.3.Memory...................................................................................................................................................40
8.3.1.Improvements......................................................................................................................................41
9.Conclusions....................................................................................................................................................42
1. Introduction
In this paper I will present my application along with the concepts and
definitions of what defines a game as educational.
DAN RZVAN
2. Game objectives
2.1. General purpose
Along the years, video games have created a big impact and have
managed to gather a lot of attention. Video games have become very compelling
and they somehow manage to motivate people into spending endless hours
playing them. Surely they must provide some sort of fundamental necessity or
satisfaction, seeing how successful they have become [Becker, 2007].
Games are so engaging precisely because they tap into some of the
most effective approaches for learning. Successful games teach us to play in the
manner we learn best. This is worth study., [Becker, 2007]. Then surely, games
have the potential to become a great medium for teaching kids. They have a
certain irresistibility towards them that can be taken into advantage for
captivating the user.
The game I am implementing is defined mostly by the same concepts
that revolve around every serious game. The main purpose of the game is to
motivate kids to get involved into household chores, such as laundry or cleaning.
The game will also be a tool for developing certain skills such as color and shape
recognition or improving memory. It even encloses a more interactive category of
games that are used in the purpose of improving already existing knowledge
about a specific domain or to educate and introduce new information. The
second important desired aspect is to entertain the kids. Although serious games
arent usually designed to be entertainment oriented, I felt strongly about this
aspect, because of the nature of kids.
Todays students dont just accept technology; they demand it. Fun is a
critical factor for them. A boring game, educational or not, will be avoided.
[Michael & Chen, 2005]
DAN RZVAN
can have a great impact at this age, and it can help develop them into becoming
more responsible.
Regarding video games, this generation of kids are born into the digital
era and are digital natives as Marc Prensky calls them. They play any sort of
video games and are especially attracted by high graphical content games. This
makes educational games for kids this age a perfect tool for reinforcing their
current skillset, and for teaching them new things.
The goal is to convince even kids that may not be interested at first in
educational games, to play it and eventually learn something. There are other
advantages to using a 3D environment; it brings much more to the game, a
whole dimension in fact, and allows for more room to be explored. 3D games can
also cover a lot of different genres along with the ones 2D games provide, so
they allow for a more diverse gameplay.
This has allowed me to develop a mix of the serious game genre and the
RPG/Adventure genre. More specific, I was able to borrow the concept that most
defines an RPG game, and that is the open world aspect of the game. The
open world component can help expand a game and open itself up to new
ways of reaching the end goals.
It doesnt mean that 2D educational games dont have any advantages
over 3D ones, because they do. The biggest advantage is that 2D games are
easier to implement, because they use images to generate content. That means
that they are also cheaper, which comes as a different advantage in the use of
mobile platforms that have lower computational power. Images are also easier to
work with, which means that 2D games usually contain more animations, which
children find attractive and interactive.
3.2. Gameplay
The game can be broken down into three layers of gameplay. The first
layer describes the open world component of the game, which is named the
Story Game. The player is placed inside a house that represents the main
scene of the game. Here, the player can freely control the main character in
order to explore the world. The family members are placed as NPCs around the
house and the player can interact with them. When approaching a family
member, the game prompts a dialog describing a quest.
The quests represent the second layer of gameplay. They are simply
household chores that the user can complete. Each chore is a separate mini
game, and they aim to encourage kids into helping around the house and to help
DAN RZVAN
Each object has a collider component attached to it, which prevents the
character to pass through it. Depending on the shape of the object, the collider is
represented as a primitive shape that contains the boundaries of the object. For
more complex shapes, the collider imitates the objects shape.
The family members are spread out around the house. Each of them has
their name placed above, for easier identification.
DAN RZVAN
the accepted state and finally, when the player completes the assignment it
goes into the finished state.
When accepting a quest from someone, based on the nature of the chore,
the player will have to reach a certain area of the house. This zone will be easily
identified by a blue light.
The first floor of the house is split into 7 different areas. Firstly, there is
the main hallway, where the starting position is at, and connects with the living
room into an open space. In the center there is a recreation room with a painting
canvas. Grandpa Horics bedroom is downstairs, and is directly connected to his
own private infirmary. The first floor also has a library with a designated study
area, and a comfy reading chair. The last two areas are the kitchen, and the
garage where Papa Joe spends most of his time.
DAN RZVAN
In order to put away the clothes, the player must drag and drop them
over the corresponding basket in the right panel. When picking up a shirt , a
corresponding texture appears under the players finger and moves along with it.
DAN RZVAN
Fig. 12. Tidy Up - picking object.
When the player is done putting away the clothes, the next stage of the
gameplay begins. The broom and dust pan texture is no longer greyed out (fig.
15) to notify the player that it can be tapped. When the user taps it, the game
places a 3D broom in the center of the room (fig. 16). In order to complete the
game, the player must continuously swipe the screen in both directions to clean
the carpet. The broom will respond to the players actions and play a dusting
animation.
DAN RZVAN
The player must drag and drop each tool in the correct spot. When
moving the finger around the screen, the selected tool will follow it. When
designing a game, it is important to take into consideration how the game itself
could affect the gameplay. If the player feels like the game caused him to lose,
then he will often get frustrated and abandon the game.
This problem relates to the current game, as the tools on the board are
placed closely together. In order to avoid the problem, two solutions were
implemented. Firstly, the positions of the initial tools on the board were chosen
to distance the more difficult tools that needed to be placed. The second
solution, which tested to provide great results, was to make the camera zoom in
on the board when picking up an object from the table.
The game will provide feedback with each step the player takes, notifying
him if the tools is placed in the right place or not. When making a mistake, the
tool will be placed back on the table allowing the player to try again.
DAN RZVAN
4.3. Groceries
A mini game that will teach kids how to properly put away the groceries,
with each object having a special storage place. The game will also train their
memory, because it requires remembering where each grocery needs to go.
There are four different categories of products and four storing spaces including
a refrigerator and three cupboards. The storing spaces are brighter in color to aid
the player in recognizing them easier. The game combines 3D elements with 2D
elements.
There are four rounds of groceries that must be stored away. The player
must drag and drop each of them over the correct storing space. At the start of
the game, an instructional animation is played, showing the player the possible
places to store the groceries.
At the beginning of each round a paper bag is placed on the table and
the groceries appear. Each paper bag contains four random groceries, one from
each category.
When picking up an item from the table, the player must hover over a
door in order to open it. When the door opens, the contents behind it are also
displayed, which allows the player to see what can be stored inside. Because the
players view may be obstructed by his finger, this can lead to the same problem
in game design mentioned above. To avoid this problem, the player is given the
freedom to tap on a door at any time and open it.
DAN RZVAN
As with all other games, the player will receive feedback for every action
he takes. If the player places a grocery into the wrong spot, it will be returned to
the initial position on the table.
Overview
This project has been developed under the Windows operating system
because it provides a user friendly interface and transparency to the developer
when working with external programs or libraries. The game itself is
implemented in Unity3D, an award winning and complete game engine that has
cross-platform support. All game scripting inside Unity3D has been done using
C#.
5.2.2.
Unity3D 4.3.3
Unity3D has two main components. The first component is the engine
itself, which is a complete solution for integrating graphics, audio, physics,
network solutions and web support. As the graphical engine for the Android
platform, Unity3D uses OpenGL ES, with support for bump mapping, reflection
mapping, ambient occlusion (AO), dynamic shadows and much more. The second
component of Unity3D is an Editor that provides a user interface for the
developer to work with. This provides a project viewer with easy access to the
game assets, an Inspector that can be used to modify or set object properties or
can even manipulate scripts and a Scene/Game viewport.
Unity3D comes with a variety of scripting languages that include C#,
JavaScript and Boo. For scripting, Unity3D uses a customized version of the open
source IDE MonoDevelop. As an alternative to the default IDE, Unity also provides
support for Visual Studio to be used as the main scripting environment. In order
to publish games for the Android platform, Unity3D requires the Android SDK to
be installed.
5.2.3.
Visual Studio 2012 from Microsoft, has been the chosen development
environment for this project. Visual Studio includes a code editor that supports
DAN RZVAN
The Model - holds all game objects such as the main character and the
environment objects.
The View - can be divided into two layers. The first layer is the camera
inside the scene that is used to render the 3D models. The second layer is the
Graphical User Interface, which holds all the buttons and images that the user
interacts with. The View is used to render the Model component through Unitys
rendering engine. It can also provide extra inputs to the Controller through the
GUI Layer.
The Controller - provides the input (touch gestures and accelerometer)
that can manipulate the objects inside the Model component. It can also change
the View by modifying the cameras properties or by changing the GUI Layout
where the player input allows, such as dialogs.
DAN RZVAN
Script component Each object can have multiple scripts attached to it.
Scripts can access and modify every other component attached to the game
object. They can also access other scripts or components attached to a different
game object.
Renderer component Renders the object on screen. It also holds a
material component for 3D models and a texture for GUI elements.
Animation component Holds all animation clips of the game object. It
also includes animation properties such as animation speed or looping mode.
Collider component Part of the physics system in Unity, they are used to
detect collisions between objects and can trigger events such as
OnCollisionEnter and OnCollisionExit.
Audio component Holds an audio clip that can be played at any time.
Some objects have multiple audio components with one audio clip each.
the
relationship
between
script
DAN RZVAN
Main Menu This is the first state, where the player will be when starting
the game. The main menu will provide the player with choices.
Main Scene If the player chooses to go into Story Game mode, the
Main Scene will be loaded.
Mini Games menu If the player chooses Mini Games, he will be
provided with a list of games.
Play MiniGame This state can be reached through the Main Menu by
selecting an unlocked game from the Mini Games menu. The games can be
unlocked from the Main Scene by completing certain challenges. These
challenges are a different type of mini games, and they can be played directly
from the Main Scene.
Main Scene It is represented as an open world environment where the
player can control a character and explore it. Inside the main scene the player
can go either to the NPC Dialog state or the Play MiniGame based on his
actions.
NPC Dialog Upon interaction with a NPC (Non Player Character), a
dialog appears that offers information about the challenge. If the player declines
the challenge then he will return to the Main Scene state. If the player accepts it,
a trigger event is activated in the Main Scene, and he is returned to the previous
state.
The player can return to the Main Menu state by pressing the physical
Back button on the handheld device. This can be done from every mini game
or from the main scene.
The player can quit the game from the Main Menu state by selecting the
Quit Game option.
DAN RZVAN
6. 3D Environment
6.1. Overview
Inside this chapter the game assets pipeline will be explained. Game
assets are a vital part in the developing of a game. They are the visual
representation of a game, without them a game is simply an idea. They give
meaning to a game and help make sense of things, they offer depth and
complexity. Good assets can take an average game concept and turn it into a
captivating game, and bad assets can turn a good idea into an unbearable
experience.
Along with the technological advancements in the field of computer
hardware, games have become more complex and allowed for improved
graphics. This lead to more freedom when modeling assets and allows for more
details to be put into them, but it also means that their complexity has grown
and require more effort.
The asset creation pipeline can greatly slow down the game development
if it is not planned ahead of time. A certain amount of discipline and patience is
required to achieve the best possible results, without having to sacrifice quality.
A typical pipeline starts from a 3d modeling tool, such as 3D Studio Max, where
the models are created. Afterwards, the models texture coordinates are
generated using the same 3d software, and the textures are then created in
Photoshop. In a large game, textures for a typical 3d model include a diffuse
texture, a normal map and a specular map. After the model is fully textured, it
goes into the 3D tool again to be animated, if it is required, and as a final step it
is exported into a supported format to be used by the game engine.
6.2.2.
DAN RZVAN
Step 3. Going into the polygon sub-level mode, and selecting the front
and back faces of the box. Then , in the modify tab apply the Inset
transformation.
back
face
and
applying
Extrude
Step 5.
transformation.
Selecting
only
the
back
face
and
applying
Bevel
Step 6. Going into the Edge sub-level and selecting the 2 bottom
edges, afterwards applying a Connect transformation.
DAN RZVAN
6.3.2. Mapping
After modeling the prop, the next step is generating the mapping
coordinates through the process of UVW Unwrapping. This works similar to a
two step mapping algorithm. The user selects a part of the object, through a sublevel mode that supports faces, edges and vertices, and maps it to a primitive by
selecting one of the available mapping methods such as Planar, Spherical,
Cylindrical, etc. The process offers a lot more options and control, like aligning
and fitting the mapping with the surface. A very powerful tool that is great when
mapping organic models such as characters, is the Pelt tool. Before using it,
the user must place seams along the edges of the surface. They act as cuts, and
when applying the Pelt tool, the surface is pulled in all directions and unwrapped
based on them. A visual representation of the process can be seen in figure 44.
For the television prop, the unwrapping was mostly done by selecting the
different faces of the object and applying a Planar mapping. The reason behind
the method, is that when creating the diffuse texture, the edges will be used to
create the outlines of the object to achieve a Cartoon effect. The process was
similar to the rest of the environment.
6.3.3. Texturing
After the environment modeling is done and the UVs are generated, the
next step in the pipeline is creating the textures. The resulted UV layout is
exported from 3DS Max and imported into Photoshop, where it will be used as a
guide for painting the textures. Performance is an important factor for the mobile
platform, so each object will only have a diffuse texture that contains color
information.
The exported UV layout from 3DS Max is inverted into Photoshop to
achieve the black outlines of the object.
Using the Magic Wand tool, the insides of the outlines are selected and
then painted with color using the Brush tool.
DAN RZVAN
7. Implementation
7.1. User Interface
The user interface (UI) is a very challenging and important part in game
design. It is the medium that connects the player from the outside world with the
game world. The user interacts with the game through the help of the user
interface. In games, it is usually more complex than in other computer software.
DAN RZVAN
For example, games generally hide information from the player, revealing it as
the game progresses. Some elements of the user interface can even be parts of
the game story itself.
The following diagram shows how the user interface is used to mediate
between the player and the game.
7.1.1. Menu
The starting point of any game is the main menu. It is like a central node
that connects all elements of the game. Every gaming session starts and ends
with the main menu. It usually contains options for starting a game or loading
from a saved state, for customizing options such as audio volume, and it can
even have submenus for selecting a certain level.
It can be viewed as the package that promotes the game, since its the
first thing the player sees. If the player is not attracted by its design, either
because of the graphics or because of the layout and general sloppiness, then he
may never even get past it.
The main menu is a separate scene with very few elements and a simple
design. It has a background image, three main buttons for the gameplay and two
controllers for turning on/off the background music and game sounds. The
buttons are centered and placed so that they dont cover the graphics in the
background, but big enough to be selected. They blend in with the rest of the
image and dont seem to just float around without purpose.
From the main menu, the player can either load the main scene with the
story game, he can select a mini game that was previously unlocked, or he can
quit the game. When loading the story game or a mini game, the loading screen
comes up. It is a very important part of the user interface because it notifies the
player about the current state of the game.
Since every mini game is a separate scene, the gameplay requires a lot
of switching between them. When changing to another scene, all elements of
that scene must be loaded into memory, and depending on the scene size it can
take a few seconds. While waiting for the scene to be loaded, the last rendered
frame is displayed on the screen, which can lead the player to believe that the
game has frozen. This does not provide a good user experience.
DAN RZVAN
The solution was to create a very light scene, which will be loaded almost
instantly. This will be used as the loading screen. Every time the game needs to
load a different scene, it will first bring up the loading screen, which will then
load the desired scene.
7.1.2. Game UI
Since the user interface is the layer between the real world and the game
world, it can either be integrated in one world or both. Based on this, UI
components can be classified into four categories; terminology from [Fagerholt
and Lorentzon, 2009]:
Diegetic components They are elements placed in the fictional
game world, so that they not break the player from the story of the
game. Because they exist in the fictional world, it means that
characters in that world are aware of their existence and can even
interact with them.
Non-diegetic components They only exist outside of the game
world, so they are only visible to the player.
Meta components These components are usually part of the
game world, but not necessarily physical elements inside of it.
Instead, they are rendered over the game world for the player to
see. For example, blood splatters over the screen when the
character takes damage.
Spatial components They exist inside the fictional world, but are
not visible to the characters in the game, so they are not part of
the story. They are only integrated with the world in order to
provide information to the player.
This project combines multiple UI components in order to provide a
certain level of attractiveness and entertainment. For example, the input controls
in the story game are non-diegetic components. The character movement
controls are placed in the bottom of the screen so they dont block the view
when playing, and the pause button is placed in the top left corner. They have a
simple design with an intuitive texture.
There are also spatial components inside the story game, like the text
above each family member, or the glowing lights around certain objects in the
scene. They exist in the game space, but are not visible to the main character
and are not a part of the story. Their purpose is to provide useful information to
the player with a little added pleasant visual aspect to the game.
Message boxes that are displayed throughout the game are also non
diegetic components. They pop up when the game needs to provide certain
information to the player. They stay on screen until the user taps the close
button, or in some cases the user can navigate through a series of messages.
In the mini game Groceries, the user interface is hard to define. The
gameplay is similar to Order Not Chaos where the user interacts with the
objects in the 3D world, so there is no explicit user interface. But since the
groceries are 2D textures, they can be considered part of the user interface, and
since they also exist in the fictional world they can be labeled as diegetic
components.
DAN RZVAN
message. The dialog can change the quest state, for example; when the player
accepts a new challenge, the quest state becomes active. This change is saved
in the PlayerPrefs model. When the player finishes a quest and returns to the
respective family member, he will receive the details of the next quest from the
list. The following diagram describes the components in the Quest System and
how they interact.
DAN RZVAN
8. Testing
8.1. Focus Group
The game has been tested by a small focus group of 6 participants to
help assess the current development of the game. They were given a
questionnaire in order to provide feedback about the game. Each question has a
grade between 1 and 5.
Question
How easy are the game
controls to learn/use?
How attractive is the overall
visual
aspect of the game?
Does the game provide
educational information?
How entertaining is the
gameplay?
Would you play the game
again?
Table 1
Highest score
5
4.5
3.5
8.2. CPU
The following results have been collected using the Unity Profiler, which
is a powerful tool for gathering in depth statistics about CPU consumption,
memory leaks and much more. The profiler reports in real time, while the game
is played on the mobile device. The tests were conducted on a minimum required
hardware device with a single-core Cortex A5 CPU at 800MHz and 512MB RAM.
The most expensive part of the game is the main scene, because it has
the most 3D geometry and textures. The main character is a Skinned Mesh,
and it creates a bigger toll on the CPU than static meshes, like the environment.
The above graph shows that the average FPS of the game is between the
60FPS mark, with a 16ms total time for rendering one frame, and 30FPS with
33ms. An estimated figure would place the average FPS at 45 with a 20ms
rendering time. The most CPU intensive component is the rendering itself. A
more detailed description of the CPU consumption can be seen in figure 57.
DAN RZVAN
8.2.1. Improvements
The graphs report various spikes during the gameplay, which are caused
by a frame rate drop. The frame rate drop is much more problematic in the main
scene, because of the higher polygon count and the skinned mesh. In order to
improve the overall FPS of the game, some objects need to be remodeled with a
lower geometry. This will lead to a smaller time spent on rendering each frame
and will increase the FPS.
8.3. Memory
Memory usage is important for any mobile application, and games are no
exception. Bad memory management can further decrease the performance of
the game. The main scene is analyzed here because it is the most complex.
shows that
The usage is
It also shows
2700 objects.
The number of draw calls for the main scene is rather high and this can
reduce CPU time and decrease the overall performance. This is the most
important aspect that needs to be improved.
8.3.1. Improvements
The biggest performance hit is caused by the high number of textures
and materials. This leads to an increase in memory usage and in draw calls that
reduce CPU time. Since the main scene and all mini games share some part of
the environment, they can all be improved together. This can be achieved by
creating a single texture for the environment, called an atlas texture. An atlas
texture is used to combine multiple sub-images into one larger image.
The environment must be remapped so all the objects share the same
texture coordinate space. Then, the textures must be combined into a single
DAN RZVAN
image. This means that the entire environment will only need one material and
only one texture.
Some objects use more complex shaders, which can also increase the
number of draw calls. Some shaders require two or more draw calls per frame.
Keeping the number of complex shaders to a minimum or replacing them with a
much simpler shader will also improve the game performance.
9. Conclusions
This project aims to contribute to the emerging domain of educational
video games with a different approach. Kids spend more time playing video
games than watching TV, so there is a lot of potential in using them as an
educational medium. The purpose is to blur the line between educational games
and commercial video games in terms of entertainment. There are numerous
elements that can be brought into this domain from traditional video games.
Most educational games seem more like infomercials or are just too plain and
simple, and are not motivating enough. This doesnt mean that the educational
objective is going to be less effective. The idea is to improve and recondition the
transmission channel, not the message.
Educational games can become more attractive by simply creating an
immersive environment, or by involving the player in the story that drives the
gameplay. This will of course require more effort and teachers and designers
would have to work together, but every other traditional medium used in
education is at least as challenging.
The project will continue to be developed and improved in the hope that
it will provide a different view on educational games.
REFERENCES
[1] C. Abt, Serious Games, 1970.
[2] M. Zyda, "From Visual Simulation to Virtual Reality to Games", vol. 38, Sept. 2005.
[3] E. Boyle, Psychological Aspects of Serious Games, in Psychology, Pedagogy, and
Assessment in Serious Games, Nov. 2013, pp. 1-18.
[4] D. Michael and S. Chen, Serious Games: Games That Educate, Train, and Inform,
Thomson Course Tehnology, 2005.
[5] F. Mehm, C. Reuter and S. Gbel, Authoring of Serious Games for Education" in
Serious Games and Virtual Worlds in Education, Professional Development, and
Healthcare, 2013, pp.60-73.
[6] M. Prensky, Digital Natives, Digital Immigrants, MCB University Press, vol. 9, no. 5,
Oct. 2001.
[7] D. A. Gentile, "The effects of video games on children: what parents need to know",
Pediatrics for Parents, 2004, vol. 21, no. 6.