EXPLORING THE POTENTIAL OF EDUCATIONAL GAMES

fullfattruckMobile - Wireless

Dec 10, 2013 (3 years and 8 months ago)

183 views

Aaron Pugh (675940)

Masters Project

25/09/2013


Submitted to Swansea University in

partial fulfilment

for the Degree of Master of Science

Department of Computer Science,
Swansea University, 2013


EXPLORING THE POTENT
IAL OF
EDUCATIONAL GAMES

Integrating education
al

theory

a
n
d developing an

educational application




SEPTEMBER 25, 2013

AARON PAUL PUGH



Aaron Pugh (675940)

Masters Project

25/09/2013

Page
1

of
81


Summary


This project explores the potential of educational games in a classroom environment, and follows
the research and development of an educational application for the Android platform.
Looking at
several different game engines, the Libgdx framework was
chosen to create the game demo.

Research was done into existing educational games, such as History of Biology, their effectiveness,
and their teaching methodology. This has shown that games used for training purposes incorporate
stories, and immersion, and

can be successful. However games used in the classroom are often just
digital representations of traditional teaching, with very limited game mechanics. Riverhollow
explores

a different approach to learning, keeping the player interested through story ele
ments, and
giving reasons for the challenges throughout the game. Results show that games have a unique
structure, which compliments traditional teaching methods. They imbue learning with excitement,
stimulate inventive, and creative thinking, and deliver
a variety of teaching methods. However
games are only slowly being accepted by educators as valid educational tools, which is likely to limit
their use. Riverhollow seeks to discuss alternative directions for game based learning, paving the
way for future
research into the potential of educational games.




















Aaron Pugh (675940)

Masters Project

25/09/2013

Page
2

of
81


Declarations and Statements


This work has not previously been accepted in substance for any degree and is not being
concurrently submitted in candidature for any degree.

Signed .........
................................................


Date.............................................................

Statement

1

This dissertation is the result of my own independent work/investigation, except where otherwise
stated. Other sources are
acknowledged by footnotes giving explicit references. A bibliography is
appended.

Signed .........................................................


Date ............................................................

Statement

2

I hereby give my consent for
my dissertation, if relevant and accepted, to be available for
photocopying and for inter
-
library loan, and for the title and summary to be made available to
outside organisations.

Signed .........................................................


Date ....
........................................................

















Aaron Pugh (675940)

Masters Project

25/09/2013

Page
3

of
81


Contents

Summary

................................
................................
................................
................................
.................

1

Declarations and Statements

................................
................................
................................
..................

2

Statement 1
................................
................................
................................
................................
.........

2

Statement 2
................................
................................
................................
................................
.........

2

List of figures

................................
................................
................................
................................
...........

6

Preface

................................
................................
................................
................................
....................

7

Acknowledgements

................................
................................
................................
................................
.

8

Definitions

................................
................................
................................
................................
...............

9

1.

Introduction

................................
................................
................................
................................
..

10

1.1.

The potential of video games

................................
................................
...............................

10

1.2.

Serious games

................................
................................
................................
.......................

11

1.3.

Purpose of the project

................................
................................
................................
..........

11

1.4.

Structure and limitations

................................
................................
................................
......

12

1.5.

Summary

................................
................................
................................
...............................

13

2.

Literature Review

................................
................................
................................
..........................

14

2.1.

History of games in education

................................
................................
..............................

14

2.2.

Limitations and difficulties

................................
................................
................................
....

14

2.3.

Effects on cognitive development

................................
................................
........................

15

2.4.

Four dimensional framework

................................
................................
................................

16

2.5.

Summary

................................
................................
................................
...............................

17

3.

Design

................................
................................
................................
................................
............

19

3.1.

Project Overv
iew

................................
................................
................................
...................

19

3.2.

Immersion

................................
................................
................................
.............................

20

3.3.

Feature list

................................
................................
................................
............................

21

3.4.

Development platform
................................
................................
................................
..........

21

3.4.1.

iOS

................................
................................
................................
................................
.

21

3.4.2.

Android
................................
................................
................................
..........................

22

3.4.3.

Summary

................................
................................
................................
.......................

23

3.5.

Engine

................................
................................
................................
................................
....

23

3.5.1.

Requireme
nts

................................
................................
................................
................

23

3.5.2.

AndEngine

................................
................................
................................
.....................

24

3.5.3.

Libgdx

................................
................................
................................
............................

24

3.5.4.

Eclipse

................................
................................
................................
...........................

25

3.5.5.

Summary

................................
................................
................................
.......................

25

3.6.

Timescale

................................
................................
................................
..............................

26

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
4

of
81


3.7.

Potential Risks

................................
................................
................................
.......................

26

3.7.1.

Technology Risks

................................
................................
................................
...........

27

3.7.2.

Tool Risks

................................
................................
................................
.......................

27

3.7.3.

Requirement Risks

................................
................................
................................
........

27

3.7.4.

Estimation Risks

................................
................................
................................
............

27

3.8.

Software Lifecycle Model

................................
................................
................................
......

28

4.

Implementation

................................
................................
................................
............................

30

4.1.

Preli
minary stage

................................
................................
................................
..................

30

4.1.1.

Drawing background Images

................................
................................
.........................

31

4.1.2.

Handling events

................................
................................
................................
............

32

4.1.3.

Slowdown problem

................................
................................
................................
.......

32

4.2.

Alpha Stage

................................
................................
................................
...........................

33

4.2.1.

Fonts

................................
................................
................................
..............................

33

4.2.2.

Creating buttons and json files

................................
................................
.....................

34

4.2.3.

Drawing background images

................................
................................
.........................

35

4.2.4.

Immersion, story, and animations

................................
................................
................

37

4.2.5.

Sound effects, music and preferences

................................
................................
..........

38

4.2.6.

The tutorial tests

................................
................................
................................
...........

39

4.2.7.

Puzzles within the mansion

................................
................................
...........................

43

4.3.

Beta Stage

................................
................................
................................
.............................

48

4.3.1.

Trans
ition delay (performance), and loading assets

................................
.....................

48

4.3.2.

Immersion and alterations to puzzles

................................
................................
...........

50

4.4.

Summary

................................
................................
................................
...............................

58

5.

Evaluation

................................
................................
................................
................................
.....

59

5.1.

Heuristic evaluation

................................
................................
................................
..............

59

6.

User Testing

................................
................................
................................
................................
..

61

6.1.

Feedback and response

................................
................................
................................
........

64

6.2.

Summary of findings

................................
................................
................................
.............

66

7.

Conclusion

................................
................................
................................
................................
.....

67

7.1.

What succ
eeded
................................
................................
................................
....................

67

7.2.

Problems encountered

................................
................................
................................
.........

68

1.1.

Skills developed

................................
................................
................................
.....................

69

1.2.

Future development

................................
................................
................................
.............

70

1.3.

Conclusion

................................
................................
................................
.............................

70

Appendix

................................
................................
................................
................................
...............

72

Project requirements

................................
................................
................................
........................

72

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
5

of
81


Functional Requirements

................................
................................
................................
..............

72

Non Functional Requirements

................................
................................
................................
......

77

Deliverables
................................
................................
................................
................................
.......

78

Risk mitigation and monitoring

................................
................................
................................
.........

78

Reference List

................................
................................
................................
................................
........

80





























Aaron Pugh (675940)

Masters Project

25/09/2013

Page
6

of
81





List of figures


Figure 1. A grid showing
de Freitas and Oliver’s Four Dimensional Framework

Figure 2. A table of a Short list of games developed with
Libgdx

Figure 3. Gantt chart show the timescale of development

Figure 4. Table of risks, showing importance (high, medium, low)

Figure 5. A diagram of the Waterfall model, showing the relationships between stages

Figure 6. A picture showing the GUI set up
of a Libgdx project

Figure 7. My First application created in Libgdx

Figure 8. A picture showing the BMfont screen interface

Figure 9. A flow diagram showing the class flow dependencies in Riverhollow

Figure 10. A flow diagram showing the class dependencie
s in puzzle one

Figure 11. A flow diagram showing the class dependencies of the recreation of Pong

Figure 12. Chart showing the number of users required for testing purposes

Figure 13. A picture showing how the fill method was used to expand the touch bou
ndary of the
numbers

Figure 14. A screenshot showing the redesigned puzzle three screen

Figure 15. A screenshot showing the prototype dynamically generated maths question screen











Aaron Pugh (675940)

Masters Project

25/09/2013

Page
7

of
81


Preface


This dissertation is submitted for the degree of Master of Science at Swansea University. The
research described within, was conducted under the supervision of Dr. Stephen Lindsay, in the
department of Computer Science, Swansea University, between June 201
3 and September 2013.

This report outlines the design, development, and implementation of an educational application,
designed for use on the Android mobile platform. Herein, a literature review, design process,
implementation, analysis and conclusion were

used, and the success, and limitations of the project
are discussed.

























Aaron Pugh (675940)

Masters Project

25/09/2013

Page
8

of
81


Acknowledgements


I would like to express my gratitude to my supervisor, Dr.

Stephen Lindsay, for his guidance, and
patience throughout this project. I would never have been able to finish this project without his
support.

I would also like to thank
my family
for supporting me during this period, a
nd
my
girlfriend fo
r her
emotion
al support. I would also like to thank my brother, whose advice has been invaluable.

I would
not

have been able to finish this

course without them.

























Aaron Pugh (675940)

Masters Project

25/09/2013

Page
9

of
81


Definitions


Term

Acronym

Description

Android Development Tools

ADT

A plug in for
Eclipse used to develop
Android applications

Android


An Operating System designed for
smartphones, made by google

Application Package File

APK

File format used to distribute and install
software on to the Android OS.

Application Programming Interface

A
PI

A Library that includes specifications fo
r

data structures etc. Specifies how
software components should interact with
each other.

Box2D


A physics engine library used in 2D games

Dalvik


This is the process virtual machine for the
Android operating
system.

Eclipse


An Integrated Development Environment
that supports Android development
through ADT

Framework


Consists of a software framework, used by
developers to implement a standard
structure of an application

Integrated Development Environment

I
DE

A software application that provides
comprehensive facilities to computer
programmers for software development

Libgdx


Cross platform game and visualisation
development framework.

Open Source


A software project where the code is
freely available to
developers. Comes with
various licences

OpenGL for Embedded Systems

OpenGL ES

A subset of OpenGL API for rendering 2D
and 3D computer graphics.

Play Store


A digital application distribution platform
for Android

Prototype


A product in an early stage of

development. Produced for testing
purposes

Software Development Kit

SDK

A set of development tools that allow for
the creation of applications for a specific
software package

Smartphone


A mobile phone built on an Operating
System, with more advanced co
nnectivity,
and computing capability than a normal
phone





Aaron Pugh (675940)

Masters Project

25/09/2013

Page
10

of
81


1.

Introduction


1.1.

The potential of video games

Video games result in creative output that has the potential to create a rebirth in learning. Games
can
afford entirely new options for creativity, and

social interaction across all subject

areas
. These
technologies disrupt traditional educational processes, producing new learning environments, tools,
and learning processes

(Boyle, 2011)
. Games have a unique structure, which compliments traditional
teach
ing methods. They
fuse

learning with excitement, stimulate inventive, and creative thinking,
and deliver a variety of teaching methods (Boyle, 2011). However,

at a time when education is in
need of transformation,

game based learning is only slowly being a
dopted by educational
establishments

(Psotka
, 2013). The game industry
hosts

several multi
-
billion dollar companies,
however most best
-
selling games from these companies have had little explicit educational context,
and are not

designed with pedagogical me
thods that would make them appealing to educators
(Kafai, 2007). Despite having no explicit education
al

context, commercial games have been shown to
develop

both physical
and cognitive skills (Psotka, 2013). Many educators are waiting for conclusive
eviden
ce that educational games are more effective th
an traditional learning methods.

The ga
ming
industry is a $20.77

billion a year industry. I
n 2009 the computer game industry sold 273
million units (How much do you know about video games?, 2009
. Based on the
strength of the
industry
,

video games, if utilised
correctly
can h
ave

a huge

influence

on

e
ducati
on
.
By influencing
students through educational games, the industry

could

facilitate and even enhance educational
development in young people. According to Dav
id Kolb’s learning cycle
,

the process of learning has
four stages;
1)
concrete experience,
2)
observational reflection,

3)
abstract conceptualisation and
4)
active experimentation, while playing games, all four processes are utilised (Imber, 2010). Serious

games gave learning outcomes and objectives,

but

more importantly from an educational
perspective they are interactive, adaptive and
fun for young people who enjoy

computer games as
one of
their hobbies. Achievable goals and an enjoyable learning experien
ce, whether consciously or
subconsciously, improves the young person's motivation to learn. A computer game creates a
simulated environment that substantially helps immersion. This allows the
player

to explore
alternative approaches to different situations
. With a virtual environment the young person is able
to see first
-
hand the physical
,

and emotional consequences
to the actions they have taken. It is
much easier for the person
to understand how important a concept can be if they are abl
e to see its
use f
irst
-
hand,
as o
pposed to

second
-
hand, i.e.

a teacher
lecturing

them
about
a concept

they are
told

is important (Imber, 2010).


Aaron Pugh (675940)

Masters Project

25/09/2013

Page
11

of
81


1.2.

Serious games

The impact of the technology on the younger gene
ration is starting to be felt. W
ith children having
grown up aroun
d games
such as

Age of Empires or SimCity, the term "game based learning has
emerged for the use of games within education
(
Connolly, 2008). The relationship between g
ames
and education is changing, an example of this is a section of the

“Play S
tore”

by Go
ogle,

dedicated to
educational games for the US K
-
12 educational market (Offer Your Educational Apps on Google Play
for Education, 2013). The goal of this project is to develop educational game application
s
, written in
Java for distribution on the Android
Operating System.

Educational ga
mes are not a new concept, they have been

trying to find a niche in the education
market

since The Oregon Trail in 1974 (Diem, 2010)
. Games such as “History of Biology” and other
serious games have tried to engage children,
and convince educators that educational games are the
future of teaching (Psotka, 2013). The problem with games such as
these
, is that the game is too
much like a digital representation of already established methods.
P
eople are immersed in games
because t
hey ge
t emotionally involved
(Kafai, 2007). Current generation educational games do not
fully explore this element of gaming, and its potential in education. Riverhollow aims to explore this
avenue, looking at the potential of immersion in educational game
s, and it’s potential for enhancing
learning.

1.3.

Purpose of the project

The aim of this project is to explore various educational theories, and develop an application that
integrates these theories into an educational game context. The game is designed to us
e a cross
curricular approach to learning.
This pedagogy is

defined by a
n

amalgam

of knowledge and
understanding from many subject areas. This encourages an enhanced method of teaching that
promotes an approach to learning which explores different methods (Faultley, 2010). Cr
oss
curricular teaching is based around

blending ideas, howev
er this should not be done at the expense
of the ideas and way of thinking that is the unique foundation of each subject. In order for cross
curricular teaching to take place the teacher, (or developer) needs to ensure they are aware of their
own subjects
“subjectivities”, and also that their knowledge and understanding extends beyond
their own subject area. Once the educator understands this, they will be able to put into practice a
range of methods and techniques that embrace the pedagogy of cross curric
ular teaching (Faultley,
2010).


The secondary aim of this project is to raise awareness of
what
computer game
s have to offer in

educational environments, and to show the potential and power of video games to facilitate
accelerated learning within young pe
ople. The game itself is
designed

to enhance skills such as
lateral thinking, numeracy, literacy, computer science
,

and
to promote lateral thinking
. The game
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
12

of
81


will also attempt to lead the public
,

and educators to appreciate the potential of digital educati
on.
Riverhollow
will develop skills in various are
as through an informal pedagogical approach
, disguised
within

a story,
which is
populated with various challenges and puzzles. This not only enables the
player

to develop skills necessary for use in later l
ife, but e
ncourage an appreciation
of lateral
thinking and problem solving skills.

1.4.

Structure and limitations

Over t
he next several chapters

the potential of games within an educational context

will be
discussed
,
and

the methods needed to build an educatio
nal game on the Android operating system

will be explored
. The literature review
chapter

will argue the potential of video games in the future
of education. This

section

will explore the natural progression of physical games to digital games, the
current s
trength of the video game industry, learning frameworks, and the
limitations involved with
educational games.

Having

reviewed the

relevant literature, th
is report
will
proceed

to the design

section. This section
will discuss the different game engines avai
lable, and the advantag
es and disadvantages of each. As
well as this, discussions into
project lifecycle

model
s

will be made
, along with the programming
language, and development platform. Also,
within

this section a case shall be made

for the use of
lateral thinking in an educational context, and its usefulness to the immersion
aspect
of the game. It
is not the purpose of this project to dictate which method of educational games is right or wrong,
but rather to explore the potential of

story driven content in an educational context.

After exploring
the design elements of the game

and deciding on platform, engine, and language.
The
Implementation section

will then follow
the

progress of
applying

the current
literature
into
the
developmen
t of

the game. This will follow the developme
nt process through three stages.
1)
T
he
preliminary stage,
which will be mostly concerned with experimenting with the chosen engine,

2)

t
he Alpha stage, where actual game development, and mechanics will
be devel
oped, and

3) the
Beta
stage, where code optimisation, and puzzle alterations from user feedback will take place.
Limitations in this stage result from any limitations in programming ability.

During the Beta stage of development, a usability study will be c
onducted. This is to uncover any
potential bugs, or difficulties
within

the game. The results of the study will be shown in this section,
and the steps taken to resolve the problems

will be reported
.

Riverhollow is not intended to be
compared to any previo
us educational games,
but
instead it

seek
s

to understand the reason
s

why
games, such as professor

Layton, have become so popular

and to use the knowledge gained to
further enhance learning through games.
Because of restrictions in place, in working with ch
ildren,
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
13

of
81


the usability study was done with adults. This is a limitation on the project, and one that should be
addressed in future reports.

The
final section is a conclusion. T
his will document the goo
d and bad points of the game, any skills
developed
, and
possible

future development. This section will also discuss the next steps of the
project, to further analyse the potential of video games in education.

1.5.

Summary

The results show t
hat there is some evidence that

adding immersion into an educational game,

a
ids
learning. Research also supports that
supplying reasons for the various puzzl
es
,

other than pure
education
, does indeed mask the educational potential of the game. This evidence

would

suggest
that young people are more likely to continue on with the ga
me, learning informally through the
puzzles, than a pure education game. Educational games
may

be a valuable addition to teaching, at a
time when teaching is in need of transformation (Psotka, 2013). Games have the potential to
enhance learning through cre
ativity, and lateral thinking, although the problem of educations being
wary of video games for education is likely to limit the use of educational games in the classroom.

















Aaron Pugh (675940)

Masters Project

25/09/2013

Page
14

of
81


2.

Literature Review

2.1.

History of games in education

Games used for educational purposes pre date computer games, they date back as far as ancient
Greece. Archaeological excavations in ancient China and Egypt show drawings of different
play
scenes, and Anthropology

of ancient people of various cultures show
evidence of acting, storytelling
and games contests (Frost, 2009). Plato was an advocator of games
for education, Plato encouraged
state legislation concerning children’s games and offered advice to parents on children and play
(Johnson, 1937). Plato propo
sed that education should be informal, he emphasised the positive
impact of games, however he admitted that games both had their upside and downsides. Greek
educational games included
play

for young children, gymnastic exercises for older children
,

and the
n
the social games of adults (Frost, 2009). During the eighteenth century, educators and religious
leaders believed that games
and play were “doing nothing”. T
he philosopher Jean
-
Jacques Rousseau,
in his book, “
Emile”
rejected these views and advocated gam
es as educational tools (Frost, 2009).
The theme throughout
this

research is that games in education is not a new thing and that games
have been used for centuries. Great philosophers such as Plato and Aristotle advocated games in
education centuries befor
e the computer was invented. Therefore computer games in education
should be a natural progression of the education system.

2.2.

Limitations and difficulties

Another theme

found in
the

research into using video games in the classroom was that there is not
enoug
h research done in almost any area to validate the effects of game based learning. Christopher
Miller in his book, Games, purpose and potential in education, states that,
“there is underdeveloped
theory on facilitating learning through video games”.
As thi
s is a common theme throughout quite a
few educational books and journals, it shows that game based learning is an emerging field, with a
lot of research and studies needed before it will be taken seriously. Another point is that even with
the relatively s
mall amount of research available on the subject at the moment, not all research
supports the use of games in education, some stakeholders have the view that
“video games are
mindless forms of activity that do not hold an affinity to strong instructional c
ontent”

(Kappers,
2009). A common theme blocking the development of game based learning are some stakeholders
have associated video games to violence, however

even research that condemn
s

video games

concede that during tests, where video games have been us
ed in the classroom, many of the
negative comments and actions were made by those who had little to no time playing the games
(Kappers, 2009).

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
15

of
81


A problem encountered during

this

research,

is

educators

attempts

to present content and facilitate
instruction. The problem that I’ve noticed is that in many cases, when companies try to combine
education with the field of entertainment
,

the
strengths

of both practices are watered down. The
strength of games is that th
ey are
informal
, forcing learning requirements and traditional teaching
methods on to a game may weaken the story element and disrupt the

flow of play and interactions.
A

balance needs to be found and maintained, where instruction cannot be overlooked or
o
versimplified while trying to maintain the entertainment factor
(Khine, 2011). One theme
that
appears

to work, to
get young people to collaborate and keep them interested in the game

is some
kind of online element. T
his can be used to put
the player

int
o a

competition with each other. For
instance,

the game cou
ld use a ranking system
, or the game could be use
d

collaboratively with
players going online and helping their friends out with puzzles, achievements and positive
reinforcement are also key elements (
Brown, 2008). Many
educators

and Instructional designers
recognise the potential that games have
,

to
engage and draw in young people. A
lso the power that
games have to not only motivate and engage, but to sustain interest and motivation over extended
perio
ds of time. (Khine, 2011). For the retention of information, and therefore meaningful learning,
educators know that engagement
and motivation are key elements. O
ne of the most challenging
aspects of a teacher is to keep the students on task, motivated and
focused. As teachers are already
being asked to bring in elements of ICT to their subjects, game based learning is the next logical step
(Brown, 2008). Role playing has been used in the past to attempt to show young people real world
situations and how to
apply theories and strategies to situations, the problem with this traditional
method of teaching is that there is difficulty in providing meaningful, real feedback, the problem is
that, while students are able to discuss and try out strategies, there is n
o consequences or feedback
to their actions. Video games provide a way for the young person to vicariously see what
consequences there may be to actions and provide a rich understanding of theories and practices in
the real world through a simulated enviro
nment and people (Khine, 2011).

2.3.

Effects on cognitive development

As the gaming industry gets stronger we will continue to move away from the perceptions that
games are only used for play, and if enough research is done into the educational potential of
ga
mes, game based learning may come to be more prevalent in teaching methods. Growing up
around technology gives the youth of today a different skillset than those of previous generations,
and educators the world over recognise that we live in a society base
d on knowledge, and
systematic thinking is a vital skill in the 21st century. Numerous educators have agreed that video
games are immersive, promote planning, strategic thinking, multitasking and decision making skills
to name a few (Khine, 2011). Computer

games also develop high levels of concentration and
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
16

of
81


attention. Video games are so prevalent in society that if we were able to exploit the affordances
and use video games in the classroom there is substantial belief that they could be a very powerful
lear
ning tool. There are many articles and journals on the emergence of video games, some
addressing what players learn from video games and others researching how video games could be
designed and implemented to enhance learning (Khine, 2011). The British Jou
rnal of Educational
Technology published an issue on the potential of game based learning (Dondi, 2007) and in the
same year an issue of the Journal of Educational Multimedia and Hypermedia did research into
learning and teaching with electronic games (Fer
dig, 2007). From these journals and many other
books researched on the subject, it is clear that games in education is a key area in the future of
education.

2.4.

Four dimensional framework

A running theme throughout papers, books, journals and articles is that

games as they are, can lead
to informal learning, educational games are considered to be a form of intentional learning.
However, educators were unable to effectively determine which games to use in which contexts, this
led to the development of de Freita
s and Oliver’s Four Dimensional Framework

(figure 1)
. This
framework proposes the four dimensions of learning process that are needed to be considered
when choosing an educational game (de Freitas, 2010).


Figure 1.
A grid showing
de Freitas and Oliver’s
Four Dimensional Framework

(
Khine, 2011)

The four dimensional framework came about during research with tutors and learners looking to
understand further, how games are chosen and used within an educational setting. Research
showed that teachers often did not know which particular games to use to

use in different contexts,
and did not know the most effective methods of deployment for the games (de Freitas, 2010). The
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
17

of
81


game elements are grouped according to the four dimensional framework, the categories are
learner, pedagogy, representation and cont
ext. The four dimensional framework is a conceptual
foundation for game based learning design, which can be structured into four questions (Khine,
2011).

I.

What should the learner learn?

II.

How should the instruction be delivered?

III.

How should accurate assessment

instruments be selected?

IV.

How should learning, structure and assessment be balanced with each other?


(Khine, 2011)

These questions are guidelines for educational game design. This four dimensional framework can
be used as a blueprint for supporting se
rious
-
games development. The theme running through this
pedagogical approach to game design is that it is not just the design of the game that is of sole
importance, but the context and deployment of the game that maximised facilitation of learning.

2.5.

Summar
y

Even though current developers are looking for intentional learning in their educational games, a
slightly different approach may have better consequences for enhanced learning. A main theme
running through various books and papers is that games afford i
nformal learning because they are
engaging and fun. Maintaining the informal learning process rather than forcing a strong,
educationally structured game environment may have better results for young people. The article

Computer games in education: Profes
sor Layton and the curious village”
says that the game has a
different “feel” to it than educational games it’s more of an adventure, even though there are strong
educational elements to it, the feel of the game is adventure based, moving from one puzzle t
o
another with a story. This is essential to keep students engaged in the game and therefore enhance
the possibility of learning.


For
the

preliminary
findings
,
this

project will focus on informal learning, trying to retain the fun of
playi
ng games, incre
asing motivation and focus
, but with
strong educational

context. L
earning
obj
ectives will only be known by the educator
, and assessments will be carried out very informally,
through a quantifiable achieve
ment system implemented in the
game itself. While vi
deo games still
bear the stigma of being “just for play” and some pe
ople even link them to violence, g
ames are
being more widely accepted as the industry gets stronger
,

and are being

looked at
as the
potential
future of education. This educational applicat
ion will be developed and optimised for a tablet
running the Android Operating System, and will be using a cross curricular approach to learning. This
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
18

of
81


research has strongly shown that the “feel” of the game is important in maintaining engagement. A
digital

representation of a GCSE test paper would only alienate the intended audience and would
almost certainly lose the attention of the student. Therefore disguising the applications educational
context, and implementing a story narrative will ensure that it’s

not just one puzzle after another, a
sense of adventure and achievement and progression through a story is important.



















Aaron Pugh (675940)

Masters Project

25/09/2013

Page
19

of
81


3.

Design

3.1.

Project Overview

This project follows

the research and development of an educational application for the Android
platform, integrating pedagogical methods, and learning theory.
The game will use a cross curricular
approach, enhancing learning. The game will be developed for Android 4.0 Jelly
Bean and will be
targeted at GCSE level students.

The purpose of this software

is to be used to bridge the gap between education and
games

by
showing that an educational game can help facilitate learning.
As shown in
the

literature review

c
omputer games ca
n be
a viable alternative for learning in an educational context
, if correctly used
.
Riverhollow

w
ill do this

through puzzles scattered throughout the game
, immersion,

and with
achievements for passing each puzzle. The puzzles themselves will enhance learn
ing across a wide
range of subjects through a cross curricular approach

The game is designed

as

a hidden object puzzle game, such as
Myst (1993) and Professor Layton
(2007). The game will be based in the 19
th

century. It is predominantly a pu
zzle game, wit
h a
sombre
,
cartoon art style. The player will take the role of a detective that has been asked to discover the
mystery of the haunted mansion, Riverhollow. The player will piece together the story by discovering
story fragments throughout the mansion. The
se fragments could be from chests, letters, or through
dialogue from the residents of Riverhollow. The player is required to complete each puzzle before
moving forward, these will be set by the characters throughout the game, and will range in subject
area
s, from mathematics to science to engineering. Completing a puzzle results in a reward in the
form of a story fragment. As shown in the literature review, with the puzzles having a purpose, and
the player being rewarded for every puzzle, the game should fe
el like fun rather than work.

The learning system

in the game will use a cross curricular approach, to maximize learning potential.
This is when a number of different skills in a discipline are applied to a single experience (Fox, 2010).
Cross curricular
learning is important for many reasons, one of them being that it supports the
development of skills that transcend ones developed in the curriculum (Penny, 2010). A big
advantage of cross curricular learning is that it does not necessarily feel like learn
ing, psychologist
Bruner said that “
The best way to create interest in a subject is to render it worth knowing”
(Penny,
2010). This application will use this methodology, many subjects will become worth knowing when
the young person needs it to complete a
puzzle for the ultimate reward of finding out the mystery of
Riverhollow, and being rewarded with achievements.

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
20

of
81


3.2.

Immersion

As discussed in
the

literature review, an important part of the design process was to enable
immersion in the game, therefore masking

the educational potential, and keeping the game fun and
engaging. This was an important requirement in designing the game layout.
The player should be
interested from the start, this was important while designing the main menu
. T
his meant that there
must
be an interesting background, the title of the game should be interesting and should hide the
main purpose of the game (education).

To stimulate cognitive function and to encourage immersion
within the game,

various characters should be a large part of the game. For example

when the user
enters the areas of the last puzzle, a ghost

could appear
, a
small

story narrative introduce
d and the
ghost plants a bomb. Another aspect of immersion is a reason for playing

the game. T
he first
char
acter you meet in the game should explain

what’s going on and that he wants to hire you to
investigate the mansion. Before he hires you, he
should ask

you to complete
some

tests, a reaction
test and a maths test, this sets up the t
heme of the game, and gives the player a reason for
investigating.

A functionality every game

should have to promote immersion, is feedback when completing
actions, such as pushing buttons.
At t
he alpha stage of the game, feedback was in

the

form of
sound
,
the sound chosen was a roar of fire.

On

asking people to test the game, one of the pieces of
feedback was that that particular sound was too dramatic and people ended up wanting to turn the
sound effects off. Taking the feedback on board, the sound of a
button being pressed was changed
to a click.

A big part of

making a game immersive is music (Vorderer, 2009).

Music is extremely important in
video games, it cont
ributes to cognitive immersion. It does this
when neuropsychological aspects of
the brain are

stimulated by music, promoting the players involvement in the game (Sexton, 2007).
It
is thought that music contributes to immersion, by occupying an area of the brain committed to
dealing with non
-
linguistic sounds. Because of this, music prevents the br
ain from looking for
stimulus outside of the game world

(Sexton, 2007)
. Based on this, to promote immersion,
it is a
project requirement that Riverhollow
require
s

several pieces of music to be written for
it (see
Project Requirements and deliverables in Ap
pendix)
.

Another
aspect

of

immersion is Lateral thinking. This engages the player by giving them the freedom
to complete the puzzle in their own way.
The term lateral thinking was created by Edward de Bono
in 1967. It was created to describe the solving of

problems through an indirect and creative
approach. Using thinking that is not immediately obvious. Answer to problems that require lateral
thinking may not be possible by only using standard step by step logic (Bono, 1990).
An important
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
21

of
81


aspect of puzzle
design, found during the literature review, was l
ateral thinking
. This was something
that should be
improve
d

in young peop
le. While designing the game, a number of puzzles should
require lateral thinking
. This would add to the immersion, as being asked a s
eries of questions would
only take the player out of the game, reducing the immersion. This allows for education and story
elements to work together simultaneously.

3.3.

Feature list



Save game


the ability to save where you are in the game, along with any ite
ms and
journal entries you have picked up.



Backgrounds


Images that show the user where they are, (Room, corridor, inside,
outside) resolution of these images will be 1280 x 720 pixels.



Movement, or transitioning between rooms.



A range of characters that

aid the player by providing helpful clues and story pieces.



Piece together a story of a mysterious mansion


what is really going on behind
those ancient walls?



Become the hero


Name the main character and select an avatar for him or her!



Open chests and

doors to find secret items or discarded journals


3.4.

Development platform

There are a number of platforms available to me to develop
the

application for, below are two of the
main platforms available to me, their
advantages

and
disadvantages
, and the reasons

for
the

choice
of platform
.


3.4.1.

iOS

This platform is powerful and versatile. The applications would be much smaller than a windows
application, and therefore much more realistically possible to accomplish without a team. The iOS
SDK is free, developing for
the iOS platform does not require any subscriptions or one off payments,
it is a free download from Apple’s website (Goldstein, 2013). The iOS is very popular, known for its
high quality, polished applications, that everyone knows need to be approved by Ap
ple before they
make it to the App Store. Developing an application in the iOS platform will mean the application (if
approved) can be circulated through the App Store, allowing me to get feedback from

a much wider
audience than asking

people to test
the

a
pp personally (Goldstein, 2013). However to place
the

application in the App Store developers
need to pay

a subscription of $99 per year
. The iPad and
iPhone (through the iOS) is an acceptable business tool, it has become acceptable to use these
devices at

a professional level, which would enable
the

application to be taken more seriously in an
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
22

of
81


educational environment (Goldstein, 2013). Other advantages of the iOS over other platforms is that
it has tight integration of software and hardware, iOS also has f
ewer hardware and software
configurations to develop for (making applications less likely to have bugs or require patches) and
Apple regularly checks applications, ensuring quality (James, 2012). One of the main disadvantages
of the iOS for me is that the
SDK for iOS was only released in 2008 and unlike the other platforms
available to me, Apple requires all iPhone and iPad applications to be submitted and approved,
which if successful are then digitally signed, the user is then able to install the applicat
ion through
the App Store. This approach has been, and still is heavily criticised, however it has enabled Apple to
weed out badly written and malicious applications, which in turn improves the user experience and
thus the popularity of the platform (Henry
, 2011). This would be a plus, if not for the validation
process, this may take too long
, not allowing testing of the game on the App store
.

3.4.2.

Android

Another platform available to me is the Android platform, according to the Android Developers
Website, thi
s platform powers millions of mobile devices in more than 190 countries throughout the
world. Android is the largest installed mobile platform and is still growing. The Android system has a
powerful development framework, it has a single application model
that will allow the application to
be deployed to hundreds of millions users across a range of devices, including both phones and
tablets (Shuchman, 2011). One of the benefits of Android’s operating system is that it is an open
platform and is available un
der a public license. Unlike closed platform operating systems, such as
Apple’s iPhone operating system where the development of any hardware of software is firmly
governed by one company, manufacturers of Android handsets and tablets have each taken a
dif
ferent approach with their own developed software. This is, in large part the reason for the
Android platform’s success, and According to former CEO Eric Schmidt, as of February 2011 more
than 350,000 Android devices were being activated worldwide every da
y (Schuchman, 2011).
Android is the most popular operating system, it is available on over 170 compatible phones,
produced by 27 manufacturers. In terms of
the

application, this would have a big impact. With a
wider audience base and cheaper handsets avail
able,
the

application would be far more easily
distributable, which in turn would mean easier testing. Also the Android operating system does not
require your application to be pre
-
approved before it is available to the public through the Google
Play Store
. Advantages of the Android platform over others include, Java development environments
run in a multitude of operating systems (Linux, Windows or Mac), Android has a less restrictive
ecosystem, and there is no screening to block any releases of applicatio
ns (James, 2012). There are
disadvantages however, Android applications may make less money, as on average, Android users
buy less applications than iPhone users,
and also

there are many, many more hardware and
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
23

of
81


software configurations to worry about as And
roid is used on a numbers of phones, across many
different manufacturers. The absence of a screening process may lead to lower quality apps (James,
2012).

3.4.3.

Summary

Both platforms have their advantages and disadvantages, however after consideri
ng both platf
orms,
Android seemed the better choice
.
Being much more confident in Java than objective C made the
decision easier. Another deciding factor was that

it doesn’t cost anything to develop an application
and place it on the Google Play st
ore, however it costs

$99

to place an application on the Apple
Store. Another
advantage of Android

is that there is a wide range of Android
enabled
devices
available to the public, with prices ranging from budget to high end. This would be useful for an
educational setting as
they are less likely to spend money on expensive Apple products, therefore
limiting the audience and use of the application.

3.5.


Engine

3.5.1.

Requirements

There are many engines available for use with game development, to find the one that was right for
the design
of the game
,

a set of criteria that the engine needed to meet was developed
.

The engine must be open source:

i.

It would not have any licencing restrictions relating to the developing and
distributing of
the

game

ii.

It would be free of charge to use for game dev
elopment

The engine must be actively maintained by its developers:

i.

Should be updated regularly

ii.

It should support Android 4.0 and later

iii.

Should have a development team that interacts with the community

iv.

It should have an active community, with a number of dev
elopers using the engine

Must either have some sort of documentation, or support (community tutorials):

i.

There should be means of getting in touch with other developers using the engine
(for example, forums)

ii.

An up to date Javadoc

must be accessible and accurate

iii.

There should be tutorial and test demos available

Functionality and performance of the engine:

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
24

of
81


i.

The engine should support basic game functions, such as a graphical user interface
components and menus

ii.

The engine must support

particle effects and 2d physics

iii.

As the game is not going to be
a 3 dimensional, graphically intensive application,
performance should not be much of an issue, however the game should run on mid
to low end Android devices

3.5.2.

AndEngine

AndEngine has a well tho
ught out homepage and an active forum, with several example games,
showing that many developers use this engine. (
www.andengine.org
). One of the downsides of
AndEngine is that is has no official Javadocs available o
nline. The developer is able to download the
source code and generate the Javadoc locally, however the Javadoc is incomplete. (Rakiv A, 2011).

One of the advantages of AndEngine is that it is a true game engine, and is easy to get up and
running, however i
n comparison to Libgdx, it is less flexible and slower in terms of rendering speed
(Libgdx vs andengine, 2010).


3.5.3.

Libgdx

Libgdx is a Java game development engine that offers a unified API that works across all its
supported platforms. Libgdx offers a compr
ehensive list of features, including OpenGL ES, and cross
platform support (Goals and Features, 2013).

In an online message thread discussing the merits of AndEngine versus Libgdx, the creator of Libgdx,
Mario Zechner said that Libgdx is not a game engine
such as AndEngine, but more of a framework.
He also mentioned that Libgdx was more customisable, but more complex than AndEngine (Libgdx vs
andengine, 2010).

The primary incentive of Libgdx is its desktop support, which enables the developer to test their
game code directly on a computer without having to alter the source, which does not require an
Android device to be accessible and bypasses the slow and buggy Android emulator (Goals and
Features 2013). This feature would make programming and debugging the

game much simpler, and
much less time consuming. Libgdx has many features that will not be needed, such as 3 dimensional
graphics support, and lighting engines, therefore learning to use Libgdx would be beneficial for
future use in developing more complic
ated applications. In terms of performance, the native
graphics libraries of Libgdx make Libgdx extremely fast in comparison to AndEngine, especially on
lower end devices, (Libgdx vs AndEngine, 2012).

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
25

of
81


There are a number of games that have been developed
us
ing the Libgdx Framework, Figure 2 shows

a short list of a games deve
loped using Libgdx.

Name

Google Play link

Clash of the
Olympians

https://play.google.com/store/apps/details?id=com.ironhide.games.clashoftheolympians&hl=en_GB

Pax
Britannica

https://play.google.com/store/apps/details?id=de.s
wagner.paxbritannica&hl=en_GB


Knockheads

https://play.google.com/store/apps/details?id=de.swagner.paxbritannica&hl=en_GB

Roaring
Skies

https://play.google.com/store/apps/details?id=com.brewengine.projectivy.android&hl=en_GB

Figure 2.
A table of a Short list of games developed with Libgd
x

3.5.4.

Eclipse

For
the

dev
elopment environment, an Integrated Development Environment (IDE)
called Eclipse

will
be used

on a computer running Windows 8. Eclip
se is an IDE
that compliments java development. It
is open and extensible, permitting interoperability

and choice, Eclipse also has a very active
community that can help with any problems, and it also provides a native look and feel. In
conclusion Eclipse is highly configurable, has a large community that is willing to help and free (Silva,
2009).


A coll
ection of images and sketches of characters will make up the repository of resources for the
application. Collection of these resources will begin immediately and will continue on before and
during the development process.

3.5.5.

Summary

Both engines have their
merits, however as
the Libgdx framework met or exceeded all requirements,

and has a far more complete Javadoc,

the framework was chosen along with the IDE Eclipse as the
development tools
for the project.







Aaron Pugh (675940)

Masters Project

25/09/2013

Page
26

of
81


3.6.

Timescale

I
n this project,
the code for the game
will be written by myself,
any characters and background
images

would also be created by

myself, and all documentation will

be written by me. Figure 3

is
a
Gantt chart created so that a

timescale could be
seen

for
the

project delivera
bles and milestones.

Figure 3.
Gantt chart show the timescale of development

Fig
ure 3

shows a Gantt chart, showing the timescale of the project. Writing the report will be on
going until deadline, creation of the game engine should be
finished by 1
st

of August and any testing
or level building must be after the completion of the game engine.









3.7.

Potential Risks

This section shows a small number of potential risks relevant to the project. For risk mitigation see
Risk Mitigation and
monitoring in the Appendix.

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
27

of
81


3.7.1.

Technology Risks

The following bullet points are potential technology risks in creating
an

educational game
application.

1.1 Estimated size of the product is much higher than expected.

1.2 The GUI of
the

application is not user friendly enough to be used in the classroom.

1.3 Some of the ideas are not going to be possible with the timescale and my
level of
programming
ability.

1.4 The application is to technologically demanding for school equipment.

3.7.2.

Tool
Risks

The following are risks involved in the production of the software.

2.1 There are no software development tools available.

2.2 The use of Integrated Development Environments (IDEs) produces low quality code.

2.3 The environment does not make use of a

database system or a repository.

2.4

There is little to no help available for the development environment.

2.5


3.7.3.

Requirement Risks

The following are risks concerning the requirements document.

3.1 Requirement definitions are drastically changed, requiring
overhaul of the design and
implementation plans.

3.2 Low level changes are constantly made to the requirements.

3.3 Design specifications do not reflect the needs to be an educational tool.

3.4 Implementation of requirements is impractical in the given tim
e.

3.5 The requirements are impractical for my programing abilities.

3.7.4.

Estimation Risks

The following are risks concerned with estimating resource requirements for
the

mobile application
development process.

4.1 The time it takes to complete the project is

underestimated.

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
28

of
81


4.2 Underestimation of the system resources required to run
the

game to an acceptable standard.

4.3 Underestimation of facilities available (Hardware and a method to prototype
the

application).


Risk

number

Risk Priority (High, Medium,
Low)

1.1

M

1.2

H

1.3

H

1.4

H

2.1

L

2.2

M

2.3

L

2.4

M

3.1

M

3.2

H

3.3

L

3.4

M

3.5

M

4.1

H

4.2

M

4.3

L

Fig
ure 4
.
Table of risks, showing importance (high, medium, low)


3.8.

Software Lifecycle Model

For the application development the waterfall model will be used.
This model was cho
se
n

because
the staged development cycle enforces discipline, each phase has a start and

end point. Another
reason why the waterfall model was

chose
n was

because the emphasis on requirements and design
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
29

of
81


before writing code minimizes wastage of time, this also improves the overall quality of the product
as it is much easier to catch and correct any flaws in the design stage.

The model has 6 steps
, the relat
ionship between the steps is shown in figure 5
:

1.

Requirements

2.

Software Design

3.

Implementation

4.

Testing

5.

Deployment

6.

Maintenance


Figure 5
.
A
diagram of the Waterfall model, showing the relationships between stages


Each phase must be finished before the next can begin, a review should be made at the end of each
phase, to keep standards high. If changes need to be made to any previous step, the
changes are
made and the developer then goes to the next step in the waterfall, and check that each phase is
complete before moving on to the next.



Aaron Pugh (675940)

Masters Project

25/09/2013

Page
30

of
81


4.

Implementation

This section documents
the

development

process

with Libgdx. The Android devices used for te
sting
were a HTC Sensation XE which was running Android 4.0.3 and an Asus Transformer pad 300
(TF300T), running Android 4.2.

For ease of planning, the development process for the application was split into different stages. The
first stage being the prelim
inary stage, followed by the game development stages


alpha and beta.

4.1.

Preliminary stage

The purpose of this stage was to familiarise myself with the layout and basic principles behind Libgdx
and getting started with Android development.

The main purpose o
f this stage was:



To set up and configure Libgdx and the Android development environment.



To draw shapes and textures using the given methods, for example, sprites and
textures.



To implement input handlers, able to process user input.

At
the

time of

devel
opment, Libgdx had gone through some changes in setting up a new project. The
developers at Badlogic games had developed a GUI project manager, able to quickly and effectively
set up a new project with custom settings. This was a huge improvement from how
previous
developers set up Libgdx, and allowed for use by inexperienced developers. Figure 6 shows the
simple set up process of a new Libgdx project.
Figure 6
. A

picture showing the GUI set up of a Libgdx project

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
31

of
81


There are two

different builds of Libgdx, a

stable build and a nightly build. Nightly builds are updated
every night, meaning stability is not always guaranteed, however this build comprises all of the latest
features.
For Experimentation purposes,
the

Universal Tween Engine, and the

latest nightly

build of
Libgdx was downloaded
.

Example code was

not hard to come by, on bitbucket.org there is a lot of example code. However
the problem is that some of the example code is not updated for the latest version of Libgdx and
therefore will not work withou
t adjusting the code. This is also true for some of the tutorials, for
example, some tutorials references classes that have been renamed, changed or overwritten.
Despite the test classes provided, without real documentation, they are hard to understand fo
r a
beginner.

One of the key classes

in Libgdx is the stage class. A stage is a 2 dimensional scenegraph with
hierarchies of actors. This class is a container for the actor class, which is then a child of the stage. An
actor has a position,
a rectangular size based on width and height, a scale in x and y, a rotation
angle, and an origin relative to the position, which is used for rotation and scaling. The stage
handles
distributing touch events, animating actors and requesting actors to
render themselves. The stage
fills the entire screen, the width and height are given through device independent pixels.

4.1.1.

Drawing background Images

Being unfamiliar with OpenGL it took some time before being able to draw any objects on the
screen. Three clas
ses in Libgdx can be used together to create images, the Texture class, the
Sprite
class and the SpriteBatch class. The texture class wraps a standard OpenGL ES texture, and a
Sprite
holds the colour, geometry, and texture information for rendering 2 dimen
sional sprites using the
SpriteBatch class. A
Sprite
is rectangular in all cases and its position (x, y) is located at the bottom
left corner of the rectangle. A SpriteBatch is used to draw 2 dimensional rectangles that reference a
texture.
This

class will

batch the drawing commands together and adjust them for optimal
processing by the GPU. At the alpha stage of the game, a
Sprite
referencing a texture was used to
show background images in the game, this used the SpriteBatch to render the sprite.

Fi
gure 7
shows
the first screen created
using Libgdx.

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
32

of
81




Figure 7
.
My First application created in Libgdx

4.1.2.

Handling events

Libgdx has two different ways of supporting input, event based and polling based. Using polling
based input, each time the game is updated or r
efreshed Libgdx calls a method in the input class
such as isTouched to check if a specific key or button is pressed or touched.

For event based input Libgdx implements the InputProcessor interface and provides various
methods such as touchDragged, or keyU
p. If the developer
doesn’t

want to handle all types of
events they could extend the InputAdapter class, which would provide empty handlers for things not
implemented. Libgdx will then call these methods when an event of the same type occurs. Setting
the i
nput processor to the stage allows the actors, such as text buttons and labels to use the
methods such as clicked, which will fire the events that have been scripted.

4.1.3.

Slowdown problem

While keeping track of memory usage, it was noted that after several sc
reen transitions the game’s
memory use dramatically increased. While the increase in memory usage

wouldn’t be a problem on
a computer,
this would cause a mobile device, with limited memory, to slow down, and eventually
crash. After further research,
it app
ears that Libgdx calls the hide method upon screen change rather
than

the dispose method, causing the

device to crash after only a short time playing.
This was solved
by c
alling the dispos
e method inside the hide method.

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
33

of
81


4.2.

Alpha

Stage

The Alpha

phase was used for implementing the fundamental mechanics and features of the
application. Its main purpose was to further test Android development and the Libgdx framework.
Game concepts and mechanics from the final game will also be introduced in this p
hase. The
following shows some features that will be included:



Be able to navigate between multiple screens



Create button animations



Create a basic character animation



Implement a settings screen



Implement a preferences class



Create at least three puzzles
the user must interact with



Introduce a story element in the game



Introduce some characters



Play music and sound effects



Be able to interact with specific points on the screen



Use OpenGL to create graphics, through sprites and textures

4.2.1.

Fonts

An important step was
creating

the font
s

to be used in the game. A program called “BMfont” (figure

8
) was used to do this. This was a free piece of software from angelcode.com and allowed the
generation of Bitmap fonts, with the specific characters the use
r requires. Once the fonts were
generated they were placed in to the assets folder in the Android game directory. One of the good
things about Libgdx is that placing the assets in the Android asset folder allows them to be used in all
platforms the game wa
s selected to support.

Aaron Pugh (675940)

Masters Project

25/09/2013

Page
34

of
81



Figure 8
. A picture showing the BMfont screen interface

4.2.2.

Creating buttons and json files

Next, the game needed some buttons to be able to navigate through the screens, before now the
screen changes we
re time based. To do this, two images were needed, a button pushed in and a
button out. Using Adobe Photoshop, the images were created and placed in the assets folder.

After researching creating games with Libgdx, the next step was to create a json file co
ntaining all
the required information for the user interface. In this case the button UI. After researching json
files,

writing started on
a file called menuSkin.json. As the game would use Text Buttons, the file
would contain information on colour, font,
and the TextButton Styles the game would use. Clicking
on the text button c
lass
, it required a button up image, a button down image, a font and optionally
code to offset the text, so the animation is more believable. Once all that was written, one more
thi
ng was needed before the buttons could be used. A texture atlas needed to be created with the
existing button images, this is a large image that contains a collection of smaller sub images. In a
game that requires many images to be drawn, it is much more e
fficient to create a texture atlas,
which is treated as a single unit by the graphics processor, it is more efficient to bind one large
texture than many smaller textures as they are drawn. The atlas was created with a program called
GDX texture packer. Th
e menuSkin json file and the texture atlas were used as the components for
Libgdx skin class.

Once the button styles and graphics were created, the next step was to place them on the screen. To
do this
,

familiarity with the table, stage and actor classes
was required. As mentioned before, all
actor
s would be a child of the stage. The Input Processor would be set to the stage, allowing the
Aaron Pugh (675940)

Masters Project

25/09/2013

Page
35

of
81


stage to handle all input processing
. All

actors would be a child of the Libgdx table class
, and the
table would be a c
hild of the stage
. The table class is a group that sizes and positions children using
table constraints. The table wo
uld use the menuSkin.json file

created earlier as the skin for all its
children. The table would be set to the size of the stage then added

to the stage. The
actors

would
be the
buttons
, and would be added to the tab
le
. The layout methods were a little tricky to get to
grips with initially, but proved to be fairly intuitive. For example, table.add added a child to the table,
however it took a

while to realise that setting the actor to the bottom left, does not set it to the
bottom left of the table, it sets it to the bottom left of the rectangular box surrounding the actor.
Using the expand method,
the rectangle was expanded
to the screen spac
e available, (if there were
two actors both using the expand method, the screen would be split in two, with one actors box
covering half the screen).

Along with text buttons, the json file needed to contain other important attributes. This included the
inf
ormation for check box styles, list style, scroll pane style and slider style. All these graphics were
created through Photoshop, added to the texture atlas and imported into the project. The code for
the list style, and the scroll pane style was created f
or an experimental version of the settings
screen. This screen didn’t make the beta version of game development was therefore never used.

Information for the buttons were stored in the json file, however the event on click still needed to be
written. After

watching a few tutorial videos on Libgdx, for each button there is, the developer has
to add a click listener, if the stage is set to the input processor and the button actor is added to the
stage, the user is then able to click the button, thus firing th
e event ha
ndler. During the alpha stage,
the Tween Engine

was used

to fade out of the background sprite. The code that initiated the fading
out would be written inside a button that created a new screen.

4.2.3.

Drawing background images

In the preliminary stage and throughout most of the alpha stage, a
Sprite
referencing a texture was
used, and was drawn through a SpriteBatch, also each screen that was shown in the game
implemented the Libgdx screen class. This meant that methods such as
resize, render, show, hide
etc. needed to be coded. So for every screen, the background needed to be cleared, the colour set to