Computer Games Software Engineering
Computer Games Software Engineering
Edited by
Kendra M. L. Cooper
Walt Scacchi
Computer Games and
Software Engineering
Chapman & Hall/CRC Innovations in Software Engineering
and Software Development
Series Editor
Richard LeBlanc
Chair, Department of Computer Science and Software Engineering, Seattle University
This series covers all aspects of software engineering and software development. Books
in the series will be innovative reference books, research monographs, and textbooks at
the undergraduate and graduate level. Coverage will include traditional subject matter,
cutting-edge research, and current industry practice, such as agile software development
methods and service-oriented architectures. We also welcome proposals for books that
capture the latest results on the domains and conditions in which practices are most ef-
fective.
PUBLISHED TITLES
Edited by
Kendra M. L. Cooper
University of Texas
Dallas, USA
Walt Scacchi
University of California, Irvine
Irvine, USA
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
Contributors, vii
v
vi ◾ Contents
vii
viii ◾ Contributors
Introducing Computer
Games and Software
Engineering
Kendra M.L. Cooper and Walt Scacchi
CONTENTS
1.1 Emerging Field of Computer Games and Software Engineering 1
1.2 Brief History of Computer Game Software Development 3
1.3 Topics in Computer Games and Software Engineering 6
1.3.1 Computer Games and SEE 6
1.3.2 Game Software Requirements Engineering 8
1.3.3 Game Software Architecture Design 8
1.3.4 Game Software Playtesting and User Experience 9
1.3.5 Game Software Reuse 10
1.3.6 Game Services and Scalability Infrastructure 11
1.4 Emergence of a Community of Interest in CGSE 12
1.5 Introducing the Chapters and Research Contributions 14
1.6 Summary 24
Acknowledgments 25
References 25
the everyday world in many positive ways (Reeves and Read 2009). Game
developers, whether focusing on entertainment-market opportunities or
game-based applications in nonentertainment domains such as education,
health care, defense, or scientific research (serious games or games with
a purpose), thus share a common community of interest in how to best
engineer game software.
There are many different and distinct types of games, game engines, and
game platforms, much like there are many different and distinct types of
software applications, information systems, and computing systems used
for business. Understanding how games as a software system are devel-
oped to operate on a particular game platform requires identifying what
types of games (i.e., game genre) are available in the market. Popular game
genres include action or first-person shooters, adventure, role-playing
game (RPG), fighting, racing, simulations, sports, strategy and real-time
strategy, music and rhythm, parlor (board and card games), puzzles, edu-
cational or training, and massively multiplayer online games (MMOGs).
This suggests that knowledge about one type of game (e.g., RPGs such as
Dungeons and Dragons) does not subsume, contain, or provide the game
play experience, player control interface, game play scenarios, or player
actions found in other types of games. Therefore, being highly skilled in the
art of one type of game software development (e.g., building a turn-taking
RPG) does not imply an equivalent level of skill in developing another type
of game software (e.g., a continuous play twitch or action game). This is
analogous to saying that if a software developer is skilled in payroll and
accounting software application systems, this does not imply that such a
developer is also competent or skilled in the development of enterprise
database management or e-commerce product sales over the web systems.
The differences can be profound, and the developers’ skills and expertise
narrowly specialized.
Conversely, similar games, such as card or board games, raise the obvious
possibility for a single game engine to be developed and shared or reused
to support multiple game kinds of a single type. Game engines provide a
runtime environment and reusable components for common game-related
tasks, which leaves the developers freer to focus on the unique aspects of
their game. For example, the games checkers and chess are played on an
8 × 8 checkerboard; though the shape and appearance of the game play
pieces differ and the rules of game play differ, the kinds of player actions
involved in playing either chess or checkers are the same (picking a piece
and moving it to a square allowed by the rules of the game). Therefore,
Introducing Computer Games and Software Engineering ◾ 3
being skilled in the art of developing a game of checkers can suggest the
ability or competent skill in developing a similar game like chess, especially
if both games can use the same game engine. However, this is feasible only
when the game engine is designed to allow for distinct sets of game rules
and distinct appearance of game pieces—that is, the game engine must be
designed for reuse or extension. This design goal is not always an obvi-
ous engineering choice, and it is one that increases the initial cost of game
engine development (Bishop et al. 1998; Gregory 2009). Subsequently,
developing software for different kinds of games of the same type, or using
the same game engine, requires a higher level of technical skill and com-
petence in software development than designing an individual game of a
given type.
Understanding how game software operates on a game platform
requires an understanding of the game device (e.g., Nintendo GameBoy,
Microsoft Xbox One, Apple iPhone) and the internal software run-time
environment that enables its intended operation and data communication
capabilities. A game platform constrains the game design in terms of its
architectural structure, how it functions, how the game player controls
the game device through its interfaces (keyboard, buttons, stylus, etc.)
and video/audio displays, and how they affect game data transmission and
reception in a multiplayer game network.
induce fun or hedonic experiences (Fullerton et al. 2004; Meigs 2003; Rogers
2010; Salen and Zimmerman 2004; Schell 2008). This points to another gap,
as many students interested in making CG choose to focus their attention
toward a playful user experience, while ignoring whether SE can help pro-
duce better quality CG at lower costs with greater productivity. That is part
of the challenge that motivates new research and practice in CGSE.
Claypool 2005), and Wang and students (Wang 2011; Wang et al. 2008)
were among the earliest to call out the opportunity for focusing on the
incorporation of CG deep into SEE coursework.
Oh Navarro and van der Hoek started in the late 1990s exploring the
innovative idea of teaching SE project dynamics through a simulation-
based SE RPG, called SimSE. Such a game spans the worlds of software
process modeling and simulation, team-based SE, and SE project manage-
ment, so that students can play, study, and manipulate different SE tasking
scenarios along with simulated encounters with common problems in SE
projects (e.g., developers falling behind schedule, thus disrupting develop-
ment plans and inter-role coordination). In this way, SE students could play
the game before they undertook the software development project, and
thus be better informed about some of the challenges of working together
as a team, rather than just as skilled individual software engineers.
The Claypools highlight how SE project or capstone courses can focus
on student teams conducting game development projects, which seek to
demonstrate their skill in SE, as well as their frequent enthusiastic inter-
est in CG culture and technology. The popularity of encouraging game
development projects for SE capstone project courses is now widespread.
However, the tension between CG design proffered in texts that mostly
ignore modern SE principles and practices (Fullerton et al. 2004; Meigs
2003; Rogers 2010; Salen and Zimmerman 2004; Schell 2008) may some-
times lead to projects that produce interesting, playful games but do so
with minimal demonstration of SE skill or expertise.
Wang et al. (2008) have demonstrated how other CG and game play
experiences can be introduced into computer science or SEE coursework
through gamifying course lectures that facilitate faculty–student interac-
tions and feedback. Wang (2011) along with Cooper and Longstreet (2012)
(and in Chapter 3) expand their visions for SEE by incorporating contem-
porary SE practices such as software architecture and model-driven devel-
opment. More broadly, Chapters 2 through 6 all discuss different ways and
means for advancing SEE through CG.
Finally, readers who teach SEE project courses would find it valuable
to have their students learn CGSE through their exposure to the history
of CG software development, including a review of some of the pioneer-
ing papers or reports cited earlier in this introductory chapter. Similarly,
whether to structure the SEE coursework projects as massively open
online courses or around competitive, inter-team game jams also mer-
its consideration. Such competitions can serve as test beds for empirical
8 ◾ Computer Games and Software Engineering
SE (or SEE) studies, for example, when project teams are composed by
students who take on different development roles and each team engages
members with comparable roles and prior experience. Such ideas are dis-
cussed in Chapter 12.
and Chapter 11 are new and were prepared specifically for this book.
Finally, it should be noted that Cooper, Scacchi, and Wang were the
co-organizers of GAS 2013.
The topic of how best to elevate the emerging results and discipline of
CGSE was put into motion at the end of GAS 2013; this book is now the
product of that effort. Many participants at the various GAS workshops
were invited to develop and refine their earlier contributions into full
chapters. The chapters that follow are the result. Similarly, other research
papers that speak to CGSE topics that appeared in other workshops, con-
ferences, or journals were reviewed for possible inclusion in this book.
Therefore, please recognize the chapters that follow as a sample of recent
research in the area of CGSE, rather than representing some other criteria
for selection. However, given more time and more pages to fill for publica-
tion, others who were not in a position to prepare a full chapter of their
work would have been included.
As such, we turn next to briefly introduce each of the chapters that were
contributed for this book on CGSE. The interested reader is encouraged to
consider focusing on topics of greatest interest first and to review the other
chapters as complementary issues found at the intersection of CG and SE
covered across the set of remaining chapters.
Based on the results of this survey, the authors propose a set of recommen-
dations for choosing an appropriate game development framework to use
in a course. The recommendations include the consideration of the educa-
tional goals, subject constraints, programming experience, staff expertise,
usability of the game development platform, and the technical environment.
16 ◾ Computer Games and Software Engineering
useful, was recommended by the authors. For example, students who are
struggling with the assignment might want quests covering more basic
aspects of the assignment, whereas students who are doing well might
need quests covering more challenging aspects.
To instill good software design principles, a programming assignment
using a game was used in combination with a competitive game tourna-
ment in an early course. The assignment and tournament centered on
developing the game Battleship. The students were provided with three
interfaces as a starting point for the assignment: game, location, and
player. As long as the students’ code respected the interfaces, they would
be able to take part in the tournament. The teaching staff provided imple-
mentations of the game and location interfaces; each student’s automated
computer player implementation was used. Extra credit was used as an
incentive; even though the extra credit was modest, the combination of
the extra credit and the competitive aspect resulted in almost the entire
class participating in the tournament: a remarkable 92% of the class had
implementations that realized the defined interfaces and were permit-
ted to compete in the tournament. The authors note that the competitive
tournaments require substantial resources (e.g., time, automated testing
frameworks, equipment), in particular for large classes.
In Chapter 5, Tao Xie, Nikolai Tillmann, Jonathan de Halleux, and
Judith Bishop focus on the gamification of online programming exercise
systems through their online CG, Pex4Fun, and its successor, Code Hunt.
These game-based environments are designed to address educational
tasks of teaching and learning programming and SE skills. They are open,
browser based, interactive gaming-based teaching and learning plat-
forms for .NET programming languages such as C#, Visual Basic, and F#.
Students play coding-duel game play sessions, where they need to write
code to implement the capabilities of a hidden specification (i.e., sample
solution code not visible to the student). The Pex4Fun system automati-
cally finds discrepancies in the behavior between the student’s code and
the hidden specification, which are provided as feedback to the student.
The students then proceed to correct their code. The coding-duel game
type within Pex4Fun is flexible and can be used to create games that tar-
get a wide range of skills such as programming, program understanding,
induction, debugging, problem solving, testing, and specification writing,
with different degrees of difficulty. Code Hunt offers additional gaming
aspects to enhance the game play experience such as audio support, a lea-
derboard, and visibility to the coding duels of other players to enhance the
Introducing Computer Games and Software Engineering ◾ 19
study provides a strong foundation for the c ommunity to build upon in the
investigation of adapting serious games, with respect to research method-
ologies and the results reported.
A scalable architecture for MMOGs is presented by Thomas Debeauvais,
Arthur Valadares, and Cristina V. Lopes in Chapter 7. The research considers
how to harmonize the representational state transfer principles, which have
been used very successfully for scaling web applications, with the architec-
ture-level design of MMOGs. The proposed architecture, restful client–server
architecture (RCAT), consists of four tiers: proxies, game servers, caches,
and database. Proxies handle the communication with clients, game serv-
ers handle the computation of the game logic, and the database ensures data
persistence. RCAT supports the scalability of MMOGs through the addition
of servers that provide the same functionality. The authors developed a refer-
ence implementation of RCAT as a middleware solution, and then conducted
experiments to characterize the performance and identify bottlenecks.
Two quantitative performance studies are reported. The first uses a sim-
ple MMOG to analyze the impact of the number of clients on the band-
width: from the proxy to the clients and from the server to the database,
with and without caching. The experiments show that the bandwidth
from the proxy to the clients increases quadratically; the database can be
a central bottleneck, although caching can be an effective strategy for this
component. The second experiment evaluates the performance impact of
scaling up the number of players using an RCAT reference application,
which is a multiplayer online jigsaw puzzle game. These experiments are
designed to quantify how the number of proxies and the number of game
servers scale with the number of players (bots) for different message fre-
quencies. The quantitative results summarize (1) the behavior of CPU uti-
lization and round trip time (latency) as the number of clients increases,
(2) CPU utilization and context switches per second as the number of
clients increases, (3) the maximum number of clients supported under
alternative core/machine scenarios and message frequencies, and (4) CPU
utilization when the maximum capacity is reached.
The authors’ proposal of the RCAT architecture, the development of a
reference implementation, the development of a reference application,
and a quantitative performance study provides the community with a scal-
able architectural solution with a rigorous validation. The game-agnostic
approach to the RCAT architecture, modularizing the game logic in one
tier, means that it can be applied broadly, supporting the development of
diverse MMOGs.
Introducing Computer Games and Software Engineering ◾ 21
concern, such as sensing data. The individual statecharts are used to cre-
ate more complex, higher level groups of intelligent behavior; the exhib-
ited behavior is a function of the superposition of states. Under this model,
the lowest layer contains sensors, which read events created as the game
state changes. Events are passed up to analyzers that interpret and com-
bine diverse data from sensors to form a coherent view of the game state.
The next layer contains memorizers that store analyzed data and complex
state information. The highest layer is the strategic decider, which reacts
to analyzed and memorized data and chooses a high-level goal. The high-
level goal triggers a tactical decider to determine how it will be executed.
Ultimately, executors contained in another layer enact decisions in order
to translate goals into actions. Depending on the current state of the NPC,
certain commands can cause conflicts or suboptimal courses of action,
which are corrected by coordinators. The final layer contains actuators,
which modify the game state.
The reuse approach is illustrated by creating a garbage collector NPC
through the reuse of large portions of the AI designed for a squirrel NPC.
By treating the AI as a collection of interacting modules, many behavioral
similarities emerge; two-thirds of the AI modules in the garbage collector
are reused from the squirrel. The authors have also created tool support to
demonstrate the practical potential of their approach. The tool directs and
facilitates the development process, taking in statecharts and associated
classes, providing an interface for producing novel AIs from a library of
behaviors, and exporting code that can be directly incorporated into a game.
By formally representing and understanding the game code associated with
specific behaviors, the constructed AI can be rigorously analyzed, ensuring
that code and functional group dependencies are properly satisfied.
A collection of five case studies exploring the issue of reuse in game
play mechanics from a repurposing perspective on the design of CGs and
game-based virtual worlds is presented by Walt Scacchi in Chapter 11. The
case studies are research and development projects that have been created
with diverse purposes, target audiences, and external collaborators over
an extended period of time. The projects include a K-6 educational game
on informal life science education; training for technicians in advanced,
semiconductor manufacturing; training for newly hired personnel on
business processes; training for state employees on sexual harassment;
multiplayer mission planning; and games on science mission research
projects. In their creation, designers have drawn upon design-level, game
play mechanics to reuse from the existing games; here the collection of
24 ◾ Computer Games and Software Engineering
1.6 SUMMARY
This chapter serves as an introduction to this collection of research papers
in the area of CGs and SE—a first. It starts with a brief recapitulation of the
history of CG software development that helps set the stage for the intro-
duction of the research contributions in the chapters that follow. Chapters 2
through 11 are the core of this book, which is followed by a brief o utlook
Introducing Computer Games and Software Engineering ◾ 25
on the future of research in CG and SE, as both are identified within the
contributing chapters, as well as with respect to some of the grand chal-
lenges in SE, and other complementary R&D opportunities for CGSE.
ACKNOWLEDGMENTS
The research of Walt Scacchi was supported by grants #0808783, #1041918,
and #1256593 from the U.S. National Science Foundation. No review,
approval, or endorsement is implied. The authors of this chapter are
responsible for statements and recommendations made herein.
REFERENCES
Alexander, T. (Ed.) (2003). Massively Multiplayer Game Development. Charles
River Media, Hingham, MA.
Alspaugh, T.A. and Scacchi, W. (2013). Ongoing software development without
classical functional requirements, Proceedings of the 21st IEEE International
Conference Requirements Engineering, Rio de Janeiro, Brazil, pp. 165–174.
Ampatzoglou, A. and Stamelos, I. (2010). Software engineering research for com-
puter games: A systematic review. Information and Software Technology,
52(9), 888–901.
Au, J.W. (2002). Triumph of the mod. Salon. April 16. http://www.salon.com/tech/
feature/2002/04/16/modding. Accessed June 10, 2014.
Bartle, R. (1990). Interactive multi-user computer games. Technical report, British
Telecom, London, June. http://www.mud.co.uk/richard/imucg.htm.
Berglund, E.J. and Cheriton, D. (1985). Amaze: A multiplayer computer game.
IEEE Software, 2, 30–39.
Bishop, L., Eberley, D., Whitted, T., Finch, M., and Shantz, M. (1998). Designing
a PC game engine. IEEE Computer Graphics and Applications, 18(1), 46–53.
Burnett, M., Cook, C., and Rothermel, G. (2004). End-user software engineering.
Communications of the ACM, 47(9), 53–58.
Callele, D., Neufeld, E., and Schneider, K. (2005). Requirements engineering
and the creative process in the video game industry. Proceedings of the 13th
International Conference on Requirements Engineering, Paris, France, August,
pp. 240–250.
Claypool, K. and Claypool, M. (2005). Teaching software engineering through
game design. Proceedings of the 10th SIGCSE Conference on Innovation
and Technology in Computer Science Education, Caparica, Portugal, June,
pp. 123–127.
Cooper, K. and Longstreet, S. (2012). Towards model-driven game engineering
for serious educational games: Tailored use cases for game requirements.
Proceedings of the 17th International Conference on Computer Games, IEEE
Computer Society, Louisville, KY, July, pp. 208–212.
Drachen, A. and Canossa, A. (2009). Towards gameplay analysis via gameplay
metrics. Proceedings of the International MindTrek Conference, Tampere,
Finland, September, pp. 202–209.
26 ◾ Computer Games and Software Engineering
Fullerton, T., Swain, C., and Hoffman, S. (2004). Game Design Workshop: Designing,
Prototyping and Playtesting Games. CMP Books, San Francisco, CA.
Furtado, A.W.B., Santos, A.L.M., Ramalho, G.L., and de Almeida, E.S. (2011).
Improving digital game development with software product lines. IEEE
Software, 28(5), 30–37.
Gautier, L. and Dior, C. (1998). Design and evaluation of MiMaze, a multi-player
game on the Internet. Proceedings of the IEEE International Conference on
Multimedia Computing and Systems, Austin, TX, July, pp. 233–236.
Gregory, J. (2009). Game Engine Architecture. AK Peters/CRC Press, Boca Raton, FL.
Grossman, A. (Ed.) (2003). Postmortems from Game Developer: Insights from the
Developers of Unreal Tournament, Black and White, Age of Empires, and
Other Top-Selling Games. Focal Press, Burlington, MA.
Hall, T. (1992). DOOM Bible. Revision Number.02, ID Software, Austin, TX,
November 11, 1992. http://5years.doomworld.com/doombible/doombible
.pdf.
IEEE (2014). IEEE Transactions on Computational Intelligence and AI in Games.
IEEE Computational Intelligence Society, New York.
Kushner, D. (2003). Masters of Doom: How Two Guys Created an Empire and
Transformed Pop Culture. Random House, New York.
Lewis, C., Whitehead, J. and Wardrip-Fruin, N. (2010). What went wrong: A
taxonomy of video game bugs. Proceedings of the 5th International Conference
on Foundations of Digital Games, Monterey, CA, ACM, New York, June,
pp. 108–115.
Meigs, T. (2003). Ultimate Game Design: Building Game Worlds. McGraw-Hill,
New York.
Morris, S. (2003). WADs, bots, and mods: Multiplayer FPS games and co-creative
media. Level Up Conference Proceedings: 2003 Digital Games Research
Association Conference, Utrecht, the Netherlands. http://www.digra.org/dl/
db/05150.21522.
Oh Navarro, E. and Van der Hoek, A. (2005). Software process modeling for
an educational software engineering simulation game. Software Process
Improvement and Practice, 10(3), 311–325.
Oh Navarro, E. and Van der Hoek, A. (2009). Multi-site evaluation of SimSE.
SIGCSE Bulletin, 41(1), 326–330.
Petrillo, F., Pimenta, M., Trindade, F., and Dietrich, C. (2009). What went wrong?
A survey of problems in game development. Computers in Entertainment,
7(1), Article 13. doi:10.1145/1486508.1486521.
Pinelle, D., Wong, N., and Stach, T. (2008). Heuristic evaluation for games:
Usability principles for video game design. Proceedings of the SIGCHI
Conference on Human Factors in Computing Systems, Florence, Italy, ACM,
New York, April, pp. 1453–1462.
Reeves, B. and Read, J.L. (2009). Total Engagement: Using Games and Virtual
Worlds to Change the Way People Work and Businesses Compete. Harvard
Business Press, Boston, MA.
Rogers, S. (2010). Level Up!: The Guide to Great Video Game Design. Wiley,
New York.
Introducing Computer Games and Software Engineering ◾ 27
29
Chapter 2
Use of Game
Development in
Computer Science and
Software Engineering
Education
Alf Inge Wang and Bian Wu
CONTENTS
2.1 Introduction 32
2.2 Experiences from Using Game Development in a Software
Architecture Course 33
2.2.1 Software Architecture Course 33
2.2.2 How Game Development Was Introduced in the
Software Architecture Course 35
2.2.3 Experiences Gained 37
2.3 Survey of the Use of Game Development in CS and SE Education 38
2.3.1 Answer to RQ1: In What Context/Topics Is Game
Development Used in CS/SE Education? 39
2.3.1.1 CS Topics/Subjects Where Game Development
Is Being Used 39
2.3.1.2 SE Topics/Subjects Where Game Development
Is Being Used 43
2.3.1.3 Applied CS Topics/Subjects Where Game
Development Is Being Used 43
31
32 ◾ Computer Games and Software Engineering
2.1 INTRODUCTION
Games are increasingly being used in education to improve academic
achievement, motivation, and classroom dynamics (Rosas et al. 2003). Games
are not only used to teach young school children, but also used to improve
the quality of university education (Sharples 2000). There are many good
examples of SE and CS education benefiting from use of games and game
development for teaching (Baker et al. 2003; Natvig et al. 2004; Navarro and
Hoek 2004; El-Nasr and Smith 2006; Foss and Eikaas 2006; Distasio and
Way 2007; Sindre et al. 2009). Over the years, several papers have been pub-
lished that describe how game development has been used to promote, moti-
vate, or teach SE and CS. The goal of this chapter is to present results from
this research through a literature study ranging from the years 2004 to 2012.
Use of Game Development in CS and SE Education ◾ 33
The rest of the chapter is organized as follows: Section 2.2 describes expe-
riences from using game development in a software architecture course,
Section 2.3 presents a literature survey on how game development has been
used in CS/SE education, and Section 2.4 discusses recommendations for
how to select an appropriate GDF; Section 2.5 concludes this chapter.
the phases, and the code and the executable for the first, second, and fifth
phases. The grade awarded is based on the grading of the project (30%)
and a final written examination (70%). The project will not be graded until
the final delivery in the sixth phase, and the students are encouraged to
improve and update deliveries during the whole project cycle.
All in all, the chances were not major, but it required quite a lot of effort
from the course staff. Most of the effort went into getting familiar with
Use of Game Development in CS and SE Education ◾ 37
the XNA framework, adapting the project, and creating and finding the
theoretical foundation to be used in lectures on game architectures.
FIGURE 2.1 (See color insert.) Screenshots from the BlueRose XNA game.
38 ◾ Computer Games and Software Engineering
The screening process of relevant articles was carried out in two steps.
First, the abstracts were checked, and those articles that did not describe
use of game development to learn or motivate for CS or SE were rejected.
Articles rejected were typically about game theory or business games, or
articles with words such as game, learning, and development but focused
on something else. The second step was to read through the whole text of
the remaining articles and exclude those that were too vague or outside
the scope of the survey. Sixty-six articles relevant to game development
and CS/SE education were found from the period 2004–2012. We noticed
that there has been an increase in the number of articles published on this
topic since the year 2004 up to 2009. Between 2009 and 2012, on average,
12 articles per year have been published on this topic. Further, out of the
66 articles, 65% were published by ACM, 26% by IEEE, and the remain-
ing 9% equally divided between Springer, Elsevier, and Hindawi. Another
interesting fact is that 59% of the relevant articles were U.S. studies, 24%
were European studies, 12% were Asian studies, and 5% were international
studies, that is, involving studies across continents and countries.
Data structure
Parallell computing
3% Boolean logic
3%
Algorithm 3%
3%
AI
11%
Programming
77%
Most of the articles within this category describe how game development
was used as an introduction to CS and programming. There were few arti-
cles that described game development used for advanced programming
courses. The second largest topic was found to be artificial intelligence (AI)
(11%). In these articles, students were typically asked to program AI for
nonplayable characters in a game or create or change the AI in a strategy
game. Other topics in CS where game development has been used are algo-
rithm, parallel computing, data structures, and Boolean logic.
Table 2.1 gives an overview of the articles in which game development
was used in CS education at a college/university level. The table describes
the main topics/subjects taught and briefly how game development was
used in the course.
Table 2.1 shows that most articles are about programming courses using
game development to motivate students. However, there is a great variety
in how game development is used in different studies. In some studies,
game development was only used in one or a few student assignments.
Other articles describe approaches where the whole course was designed
around a large game development project. The typical games developed
in these projects and assignments are simple classical 2D games such as
Pacman, Bomberman, or board games.
Use of Game Development in CS and SE Education ◾ 41
TABLE 2.1 Articles in Which Game Development Was Used in CS Education at the
University Level
Article How Game Development Is Used in Course Topic
McGovern and Fager Introduce the addition of AI code to games AI
(2007)
van Delden (2010) Create games in robot simulation AI
Timm et al. (2008) Learn the addition of AI code to board game AI
Barella et al. (2009) Use multiplayer game framework to learn AI AI
Weng et al. (2010) Learn logic through changing Pacman code Logic
in Scratch
Detmer et al. (2010) Develop learning through games for Programming
high-school teachers
Hundhausen et al. Develop the game battleship as an Programming
(2010) assignment
Carter et al. (2011) Improve motivation and learning through Programming
game development
Rick et al. (2012) Use Greenfoot for simulations Programming
Alvarado et al. (2012) Introduce games to make CS more attractive Programming
for women
Coleman and Lang Meta-study of use of game and game Programming
(2012) development in courses
Greenberg et al. Learn CS using the context of art and creative Programming
(2012) coding
Anewalt (2008) Learn programming, math, and logic in Programming
Alice
Eagle and Barnes Change loops and arrays in the game Wu’s Programming
(2009) Castle to learn programming
Chaffin and Barnes Teach students to develop serious games Programming
(2010)
Williams and Create simple games in assignments such as Programming
Beaubouef (2012) Tic-Tac-Toe to learn programming
Sung et al. (2011) Learn programming through developing Programming
games in XNA
Angotti et al. (2010) Learn programming through developing Programming
games in XNA
Goldweber et al. (2013) Motivate CS through game programming Programming
Fesakis and Serafeim Learn programming through developing Programming
(2009) games in Scratch
Kurkovsky (2009) Survey on the use of various mobile Programming
development platforms
Garrido et al. (2009) Use games and visual programming to Programming
learn C++
Jiau et al. (2009) Learn to program using game-based Programming
simulations and metrics
(Continued)
42 ◾ Computer Games and Software Engineering
Table 2.2 presents articles where game development is used for pro-
moting or teaching CS courses in middle and high schools. The articles
reporting from middle- and high-school experiences mainly focus on
how to motivate for CS using a visual programming environment to cre-
ate games. All articles but one focused on programming. Interestingly, the
nonprogramming article gave an example of how parallel computing can
be introduced to high-school students through games and game software.
Parallel computing is a challenging and difficult topic, but through exam-
ples from games the students were able to learn and engage in the topic.
TABLE 2.2 Articles in Which Game Development Is Used for Promoting or Teaching
CS in Middle and High Schools
Article How Game Development Is Used in Course Topic
Wang et al. (2006) Teach ninth graders basic CS through game Programming
programming in StarLogo TNG
Goldberg et al. (2012) Promote CS in middle schools through creating Programming
games such as Frogger and Space Invaders
Rodger et al. (2012) Promote CS in middle schools through Programming
creating games in Alice
Webb and Rosson Promote CS for the eighth-grade girls through Programming
(2011) game programming in Alice
Chesebrough and Demonstrate parallel computing in high Parallel
Turner (2010) schools through games and game software computing
Al-Bow et al. (2009) Use game creation to teach programming to Programming
both students and teachers in high schools
Jenkins et al. (2012) Promote active learning and collaboration in Programming
high schools through game programming
Use of Game Development in CS and SE Education ◾ 43
Software process
6%
Reverse engineering 6%
Outsourcing 6%
Software architecture
41%
Object-oriented
design 23%
Software testing
Teamwork
12%
6%
game design (46%) and game development (31%). One could argue that
game development should be a part of CS, but in the articles described
here game development was typically a course that focused on game design
that also involved game programming, 3D modeling, and similar topics.
The other two identified topics were art design (15%) and literacy (8%).
Use of Game Development in CS and SE Education ◾ 45
Art design
15%
Literacy
8%
Game design
46%
Game development
31%
FIGURE 2.4 Distribution of topics taught using game development in applied CS.
The main difference between game design and art design is that art design
has stronger emphasis on esthetics and artistic style and expression.
Table 2.4 presents an overview of the 12 articles in which game devel-
opment was used to teach applied CS. These articles displayed a much
stronger emphasis on creating or changing games through graphical
tools with less emphasis on programming. Typically, many of the articles
focused on creating game levels using editors and tools to create terrains,
game characters, game objects, and populate levels with game objects.
Half of the articles describe the use of game development at a precollege/
university level.
TABLE 2.4 Articles in Which Game Development Was Used to Teach Applied CS
Article How Game Development Is Used in Course Topic
van Langeveld and Promote CS to create digital characters Art design
Kessler (2009) in 3D
Rankin et al. (2008) Learn CS through game design and Game design
development in GameMaker
Estey et al. (2010) Use game design in Flash and GameMaker Game design
to learn communication and teamwork
skills
Seaborn et al. (2012) Teach CS using game design and Game design
development in GameMaker in high
schools
Huang et al. (2008) Teach integration of programming and art Game design
design through game development
Wynters (2007) Motivate/create CS through modification in Art design
Unreal, Photoshop, and 3ds Max
Robertson and Howells Learn game design through Neverwinter Game design
(2008) Nights 2 in middle schools
El-Nasr and Smith Learn CS, math, and programming Game design
(2006) through changing code in Warcraft 3
and Unreal in high schools and
universities
Ritzhaupt (2009) Use free or cheap game development Game
tools such as Torque, MilkShape 3D, development
Audacity, and GIMP to teach game
development
Sullivan and Smith Teach high-school students CS and Game
(2011) programming skills through game development
development
Werner et al. (2009) Learn programming through game Game
development in Alice in middle schools development
Owston et al. (2007) Motivate and engage students in literacy Literacy
activities in elementary schools through
game development
of the course. Two other popular GDFs are XNA and Java (both 11%).
Many chose XNA because of the flexible and high-level API and good
documentation, whereas many chose Java because it was familiar to
the student or that the context was a Java programming course. Other
popular GDFs are Alice, Android SDK, C++, GameMaker, Flash, and
Scratch. It is interesting to note that the use of the currently very popular
indie game engine Unity 3D was not found in any article. This picture
is likely to change over the years. For example, Microsoft has decided to
Use of Game Development in CS and SE Education ◾ 47
C
Alice Android 2%
Others
6% 6%
15%
C++
Not specified 6%
Flash
8%
4%
GameMaker
XNA 5%
11%
Java
11%
Greenfoot 2%
Scratch Own framework iOS
4% 14% 2%
War craft
2%
Unreal
2%
stop all support for XNA, which will force many developers over to new
platforms.
Figure 2.6 shows the distribution of programming languages used to
teach SE, CS, and applied CS through game development. In the a rticles in
the survey, 27% use some kind of a visual programming/editing to develop
games. The visual programming category includes Alice, GameMaker,
Action
Others script
4% 3%
C 6%
C++
7%
Visual programming
27% C#
12%
Java
Not specified 24%
13%
Objective C
2%
Java script
2%
FIGURE 2.6 Programming languages used to teach SE, CS, and applied CS through
game development.
48 ◾ Computer Games and Software Engineering
Educational goal. The educational goal of the course will greatly affect
the choice of GDF. For instance, if the course focuses on a complete
development cycle, it should be possible to develop a game from
scratch according to specified requirements and have tools available
to specify the design and tools for testing. However, if the educational
goal focuses only on some parts of the development cycle, such as
software testing, AI, teamwork, software maintenance, outsourcing,
or quality assurance, it is possible to use a game editor for an existing
game such as Unreal Tournament or Warcraft.
Subject constraints. Most CS or SE subjects put constraints on what you
should be able to do in the GDF. For example, if you teach a software
architecture, it is very important for students to have the freedom to
design and implement various design and architecture patterns in the
framework chosen. Another example is that if your subject is AI, it is
important that the framework or game being used allow specifying
and implementing AI similar to what is being taught in the textbook.
Often, additional articles must be used to link the subject to how it is
used in games.
Programming experience. The programming experience of the stu-
dents will highly affect the choice of GDF. Typically, young students
without any programming experience should start with visual pro-
gramming environments such as Scratch or Alice. For students with
programming experience, one factor that should be considered when
choosing a GDF is what programming languages the students know.
What is most important here is whether the students only know
Use of Game Development in CS and SE Education ◾ 51
Staff expertise. One thing you have to consider when introducing game
development into a CS or SE course is the course staff’s knowledge
and technical experience with a GDF. This is important both to plan
the project to fit with the educational goals and to provide help to
students getting stuck with technical problems. It is not necessary
for the teacher to know everything about GDF in detail, but it is
very useful to have at least one in the course staff that knows it fairly
well. The minimum requirement is to be able to point the students to
online resources where they can find help.
2.5 CONCLUSION
This chapter focused on describing how game development has been and
can be used to teach and promote SE and CS. We shared our own expe-
riences from introducing game development in a software architecture
course. Further, we presented a literature survey with articles between
2004 and 2012 on game development in CS and SE. Finally, based on our
own experiences and the survey, we gave some recommendations on how
to choose a GDF to be used in a SE/CS course.
The goal of the chapter was to give answers to three research ques-
tions. The first research question was about finding the contexts and top-
ics game development is used in CS/SE education (RQ1). We found that
game development is being used to teach a variety of subjects, but the
most common subject is programming and more specifically introduc-
tion to programming. Other major CS/SE topics are AI, software architec-
ture, object-oriented design, and software testing. We also found that the
majority of articles (81%) are studies from colleges or universities, whereas
the remaining (19%) are from elementary, middle, and high schools. There
is also a great difference in how and how much game development is used
in various courses. Some courses simply use game development in a few
short assignments, whereas others wrap the course around a large game
development project.
The second research question was about what GDFs are being used
for developing games in CS/SE courses (RQ2). The results of the litera-
ture study revealed use of a wide variety of tools and frameworks where
the most frequent ones were own frameworks developed by the authors/
researchers, Java, XNA, Android SDK, Alice, C++, GameMaker, Flash,
and Scratch. In terms of programming languages, the three largest catego-
ries were visual programming frameworks (e.g., Alice, Scratch, etc.), C#,
and Java. We foresee that the GDFs and programming languages used for
this purpose will change significantly in the time to come. For example,
Microsoft has stopped further development and support of XNA. At many
universities, there has been a shift from Java programming courses to
Python and HTML5/Javascript.
The third research question focused on experiences from using game
development–based learning (RQ3). The main conclusion here is that
Use of Game Development in CS and SE Education ◾ 53
ACKNOWLEDGMENT
We thank Richard Taylor and Walt Scacchi at the Institute for Software
Research, University of California, Irvine, California, for providing a stim-
ulating research environment and for hosting a visiting researcher.
REFERENCES
Adipranata, R. (2010). Teaching object oriented programming course using coop-
erative learning method based on game design and visual object oriented
environment. Proceedings of the 2nd International Conference on Education
Technology and Computer, Shanghai, People’s Republic of China, IEEE, June
22–24.
Al-Bow, M. et al. (2009). Using game creation for teaching computer programming
to high school students and teachers. ACM SIGCSE Bulletin 41(3): 104–108.
Alvarado, C. et al. (2012). Increasing women’s participation in computing at
Harvey Mudd College. ACM Inroads 3(4): 55–64.
Ambrósio, A. P. L. and F. M. Costa (2010). Evaluating the impact of PBL and tablet
PCs in an algorithms and computer programming course. Proceedings of the
41st ACM Technical Symposium on Computer Science Education, Milwaukee,
WI, ACM, March 10–13.
Anewalt, K. (2008). Making CS0 fun: An active learning approach using toys,
games and Alice. Journal of Computing Sciences in Colleges 23(3): 98–105.
Angotti, R. et al. (2010). Game-themed instructional modules: A video case study.
Proceedings of the 5th International Conference on the Foundations of Digital
Games, New York, ACM, June 19–21.
Baker, A. et al. (2003). Problems and programmers: An educational software
engineering card game. Proceedings of the 25th International Conference on
Software Engineering, Portland, OR, IEEE Computer Society, May 3–10.
Barella, A. et al. (2009). JGOMAS: New approach to AI teaching. IEEE Transaction
on Education 52(2): 228–235.
Bierre, K. J. and A. M. Phelps (2004). The use of MUPPETS in an introductory
java programming course. Proceedings of the 5th Conference on Information
Technology Education, Salt Lake City, UT, ACM, October 28–30.
Bjørnson, F. O. et al. (2009). Improving the effectiveness of root cause analysis
in post mortem analysis: A controlled experiment. Information Software
Technology 51(1): 150–161.
54 ◾ Computer Games and Software Engineering
Carter, J. et al. (2011). Motivating all our students? Proceedings of the 16th Annual
Conference Reports on Innovation and Technology in Computer Science
Education—Working Group Reports, Darmstadt, Germany, ACM, June 27–29.
Chaffin, A. and T. Barnes (2010). Lessons from a course on serious games research
and prototyping. Proceedings of the 5th International Conference on the
Foundations of Digital Games, Monterey, CA, ACM, June 19–21.
Chang, W.-C. and Y.-M. Chou (2008). Introductory C programming language
learning with game-based digital learning. Proceedings of the 7th International
Conference on Advances in Web-Based Learning, Jinhua, People’s Republic of
China, Springer, August 20–22, pp. 221–231.
Chen, W.-K. and Y. C. Cheng (2007). Teaching object-oriented programming lab-
oratory with computer game programming. IEEE Transaction on Education
50(3): 197–203.
Chesebrough, R. A. and I. Turner (2010). Parallel computing: At the interface of
high school and industry. Proceedings of the 41st ACM Technical Symposium
on Computer Science Education, Milwaukee,WI, ACM, March 10–13.
Clements, P. and R. Kazman (2003). Software Architecture in Practices. Addison-
Wesley Longman, Reading, MA.
Coleman, B. and M. Lang (2012). Collaboration across the curriculum: A dis-
ciplined approach todeveloping team skills. Proceedings of the 43rd ACM
Technical Symposium on Computer Science Education, Raleigh, NC, ACM,
pp. 277–282.
Coplien, J. O. (1998). Software design patterns: Common questions and answers.
In Rising, L. (Ed.), The Patterns Handbooks: Techniques, Strategies, and
Applications. Cambridge University Press, Cambridge, pp. 311–319.
Detmer, R. et al. (2010). Incorporating real-world projects in teaching com-
puter science courses. Proceedings of the 48th Annual Southeast Regional
Conference, Oxford, MS, ACM, April 15–17.
Distasio, J. and T. Way (2007). Inclusive computer science education using a ready-
made computer game framework. Proceedings of the 12th Annual SIGCSE
Conference on Innovation and Technology in Computer Science Education,
Dundee, Scotland, ACM, June 23–27.
Eagle, M. and T. Barnes (2009). Experimental evaluation of an educational game
for improved learning in introductory computing. ACM SIGCSE Bulletin
41(1): 321–325.
El-Nasr, M. S. and B. K. Smith (2006). Learning through game modding. Computer
Entertainment 4(1): 7.
Elfes, A. (1990). Sonar-based real-world mapping and navigation. In Sukhatme, G.
(Ed.), Autonomous Robot Vehicles. Springer-Verlag, New York, pp. 233–249.
Estey, A. et al. (2010). Investigating studio-based learning in a course on game
design. Proceedings of the 5th International Conference on the Foundations of
Digital Games, Monterey, CA, ACM, June 19–21.
Fesakis, G. and K. Serafeim (2009). Influence of the familiarization with scratch
on future teachers’ opinions and attitudes about programming and ICT in
education. ACM SIGCSE Bulletin 41(3): 258–262.
Use of Game Development in CS and SE Education ◾ 55
Model-Driven
Engineering of Serious
Educational Games
Integrating Learning Objectives
for Subject-Specific Topics
and Transferable Skills
CONTENTS
3.1 Introduction 60
3.2 Holistic Approach to SEGs 66
3.2.1 External Entities 67
3.2.2 Traditional Game Elements 67
3.2.3 Educational Game Elements 69
3.3 Overview of the SimSYS Approach 71
3.3.1 Informal Model 71
3.3.1.1 Storyboard 71
3.3.1.2 SimSYS Storyboard 73
3.3.2 SimSYS Use Case Model 75
3.3.2.1 UML Use Case 75
3.3.2.2 SimSYS Use Case 76
3.3.3 Formal Model 78
3.3.3.1 XML 78
3.3.3.2 SimSYS XML Game Script 79
59
60 ◾ Computer Games and Software Engineering
3.1 INTRODUCTION
Educational infrastructure from elementary to higher education to
corporate training faces significant challenges with increasingly limited
resources. Course materials need to address concrete learning objectives,
Model-Driven Engineering of Serious Educational Games ◾ 61
Walker and Shelton 2008; Westera et al. 2008; Nadolski et al. 2010). In the
end, a simulation is primarily task oriented and repetitive; it is not a game
in that it lacks typical game trappings as described below.
In addition to the LMS and simulation, two other recent variations of
e-learning are currently in play in education circles. Edutainment is typi-
cally a rote exercise situated in an entertainment setting, for example, a math
exercise on a tablet PC that requires the player to add and subtract when a
game character levels up. Little or no learning occurs in edutainment, only
the practice of previously acquired knowledge and skills. The concept of
gamification has muddied the waters of e-learning. The term gamification
can be described as the process of adopting game technology, thinking,
mechanics, and game design methods outside of the gaming industry to
solve problems and engage users (Deterding et al. 2011). Whereas gami-
fication incorporates elements of games (Brathwaite and Schreiber 2008;
Deterding et al. 2011), we have determined that serious educational game
development, not gamification, is the more productive path for effective
education. Studies have already indicated the effectiveness of game-based
learning (Prensky 2001; Gee 2003), whereas there are significant questions
concerning the impact of gamification (Deterding et al. 2011).
Refocusing now on educational computer games, let us clarify our
understanding of games and gaming. There are different approaches to
defining a game, and we follow traditional definitions that describe games
as stated rule systems motivated by player competition or adversity toward
particular goals or outcomes (Dempsey et al. 2002; Salen and Zimmerman
2004; Juul 2005). Consequently, unlike simulations and edutainment,
inserting games into a curriculum can create a highly motivating learning
environment; it draws on students’ sense of fantasy and amusement; it is
self-directed, appealing to an individual student’s curiosity; and it is a con-
tinuous challenge wherein any existing tasks or knowledge that appears
incomplete, inconsistent, or incorrect motivates a student to foster deeper
levels of learning. It is necessary, however, to insure that the game goals
are in alignment with desired learning outcomes. And in that necessity
lies the challenge for developing serious educational games (SEGs): creat-
ing a sophisticated pedagogically motivated experience using game design
in which a player learns desired learning outcomes while playing (Malone
1980). At the same time, game development is costly and difficult to scale,
and specific games are difficult to transfer contextually. These factors have
typically limited the rollout and subsequent research on the impact of
gaming in education.
Model-Driven Engineering of Serious Educational Games ◾ 63
for capturing the flow of the game and the desired user interface (UI)
concepts (graphics) (Truong et al. 2006; Williams and Alspaugh 2008),
but need to be transformed into specifications for the game developers
(Figure 3.1) (Cooper and Longstreet 2012b). The relationships (traceabil-
ity) between one document and another document are difficult to estab-
lish and maintain. With a document-centric approach, it is also difficult
to maintain the consistency of the GDD and SRS, which can lead to costly
delays in the project. These approaches do not explicitly support the cre-
ation of SEGs, which have specific learning objectives and assessment
criteria.
The software engineering community continues to move away from
document-centric development approaches. MDE is now an established
approach for systematically developing complex applications (Kent 2002).
Models of the application are created, analyzed (validated/verified), and
subsequently transformed from the requirements level down to the code
level of abstraction; one goal is to (automatically) transform the mod-
els. Engineering standards to support MDE have been broadly adopted,
including the Object Management Group’s model-driven architec-
ture (OMG 2003), Unified Process (OMG 2008), and Unified Modeling
Language (UML) (OMG 2009). UML 2.0 is a well-known notation that
provides graphical notations with semiformal syntax and semantics, and
an associated language, the Object Constraint Language, for expressing
logic constraints. MDE has been applied across diverse domains; how-
ever, little is available on its application to support the rapid, cost-effective
development of SEGs.
To improve the development of SEGs, our research project, SimSYS, is
under way. SimSYS is an MDE-based approach that uniquely integrates
elements of traditional game design, pedagogical content, and software
engineering methodologies. Our approach has three main steps: (1) create
an informal model of the SEG (captured like a storyboard with textual
descriptions of the learning objectives and game play in addition to UI con-
cepts, e.g., graphics and audio); transform the informal model into a semi-
formal, tailored UML use case model (visual and tabular, template-based
Model-Driven Engineering of Serious Educational Games ◾ 65
Challenge class
Knowledge class Learning class
Expressions
Subject • Dialog
• Area 1 Evaluation • Deliberation
• Topic 1.1 Synthesis • Composition
• Area 2 Analysis Conditions
• Topic 2.1 Application • Timed
• Topic 2.2 Comprehension • Limited Resources
• Area 3 Knowledge • Rewards/Punishments
• Topic 3.1
• Antagonistic
• Topic 3.2 • Collaborative
game that has been set out by the instructor. We contend that separating
the functional game components from the rapidly changeable educational
elements is key to developing flexible, scalable, and adaptable educational
games. In SimSYS, the various game components, traditional and educa-
tional, are categorized into functionally determined classes. The primary
entry point into the game for the player entity is the character that he
or she takes on when entering the game. The character class is the set of
actors within the game; every game must include the protagonist (student
player), but then can contain a variety of NPCs. For example, a secondary
NPC likely to be ubiquitous is the antagonist, who provides personified
adversity for the player in a more interactive manner. Each NPC has a pro-
file and a set of variable attributes consisting of name and title, function
type (e.g., Protagonist, Antagonist, Director, Constructor, Interlocutor),
role (e.g., employer, client, colleague, friend, lab partner), relevant tech-
nical skills (i.e., degrees, talents), years of experience (i.e., strength or
effectiveness), communication skill (i.e., intelligence), leadership skill (i.e.,
charisma), and teamwork skill (i.e., dexterity). In addition, NPCs can have
pertinent demographic information for encouraging students’ thought
about studying and working in a diverse social environment (e.g., gender/
ethnicity/nationality). NPCs may be assigned a frequency of presence to
the student player to encourage or limit the level of assistance/challenge
that the NPC offers. Finally, there are two kinds of character behavior:
autonomous or allonomous.
The Context class establishes the simulation environment for the
player/protagonist. It provides a grammar for the simulation environ-
ment and game play. The Context class contains the elements that cre-
ate an immersive world within which students can interface. It includes
the scenario (e.g., an office, a hospital), the game situation (e.g., a mission
briefing or a confrontation), a place within the game’s story arc and transi-
tions and goals (e.g., moving from junior to senior staff, graduating from
college), and provides the framework for the challenges in the game (e.g.,
final exam, a company project, or a roadblock). The interplay between the
player/protagonist within the plot context and the NPCs is designed to
help students better understand the course content from multiple perspec-
tives, as well as reinforcing the effects of good and bad decision making.
The last class within the traditional game elements is Mechanics. The
Mechanics class provides the fundamental, low-level game functions and
coordinates reusable assets such as character interactions, music, and
graphics. It also supports maintaining the state of the game, including
Model-Driven Engineering of Serious Educational Games ◾ 69
the players’ progress (where they are in the game) and the track of their
assessment (how well they are doing in the game, e.g., points). This class
supports the Context class and the Challenge class.
<challengeStructure> <gameElement
xmlns:xsi=“http://www.w3.org/2001/XMLschema-instance” xsi:type=“prop”>
Visual model
<gameElement xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:type=“IDENTIFIER”>
...
... XML—game can be loaded
... and verified by testing
Tabular model
Ini
Sta
... Pla No
... ... ... En Err
Game Act Scene Screen Challenge Sa Pa
72 ◾ Computer Games and Software Engineering
Statechart—game can be
verified by simulation/animation
FIGURE 3.3 Overview of models in the SimSYS approach (informal, semiformal, formal models).
Model-Driven Engineering of Serious Educational Games ◾ 73
graphics and text (Hart 1999; Tumminello 2004; Truong et al. 2006). They
are a planning, or previsualization, tool used to present, discuss, and revise
the concept before costly development work has been done. Storyboards
present a sequence of panels, or cells, which include graphics and text to
explain what is happening. They have been selected for use in this work on
SEGs for the following reasons:
Option Option
Stem
The Option
description Option
strategy Feedback
Option pattern... Option
Stem Option Option
The following description is presented: The designers need to use a complex AI algorithm that is available as
a third-party component with an API. The designers know that there are a number of possible components
available on the marketplace, which are undergoing extensive performance evaluations. The final
recommendation will not be available for several months.
The following question is asked: Which design pattern would be suitable to reduce the impact of this eventual
recommendation?
The possible options (answers) presented are as follows:
1. strategy pattern 2. bridge pattern 3. factory pattern 4. singleton pattern
Answer 2 is correct. Answers 1, 3, and 4 are not correct.
The player can obtain a hint for each answer by hovering the mouse over it; it is displayed in an information
box.
Question feedback is provided to the player.
If the player answers correctly, then she wins 500 points. An information bubble is presented to the player
with the text “The bridge pattern is correct!”
If the player answers incorrectly, then she does not win any points. An information bubble is presented to the
player with the text “Sorry—the correct answer is the bridge pattern.”
Your title is Junior
The quiz and the first screen end; there is no summary for this quiz.
Programmer and you have
1500 points In the second screen, the game presents “Your title is <title> and you
have <points>!” The player ends the game by clicking a button with the
End... text “End...” on it.
If an error occurs, then the game ends.
answer option, but it is not defined at this point. The narrative continues,
describing the second screen, which wraps up the game with a summary
of their title (they may have been promoted by answering the question cor-
rectly) and their point total. Sample images of the game are presented to
help communicate the look and feel of the UI. For our Test Game, we are
using a cartoonlike style to keep the look lighthearted, fun, and engaging.
Model-Driven Engineering of Serious Educational Games ◾ 75
Test game: SE
<<includes>>
<<includes>>
<<includes>> <<includes>> Screen 1 Challenge 1 Show
Test Game Act 1 Scene 1 <<extends>>
Game Designer Screen 2
<<includes>>
Each stereotyped use case has a
Game <<includes>> Act
tabular specification template.
Act <<includes>> Scene
Scene <<includes>> Screen
FIGURE 3.6 A tailored UML use case diagram for Test Game 4.
describe the relationships among these use cases. The built-in association
<<extends>> is used to describe use cases with asynchronous capa-
bilities such as a player (unpredictably) requesting to show a hint, show a
character’s profile, or show a character’s rewards. There is a simple map-
ping from the informal narrative to the visual model: each act in the nar-
rative is an act in the visual model; each scene in the narrative is a scene in
the visual model; and so on.
Each of the tailored use cases (game, act, scene, screen, challenge)
has a tabular specification template. We found that defining a tem-
plate for each level of abstraction in the game provided a clear, easy-to-
understand specification, as opposed to defining one general-purpose
template that could be tailored for different levels (perhaps by leav-
ing some part blank or marking them not applicable). The templates
defined to support the game specification are available elsewhere
(SimSYS 2012). The tabular templates integrate elements from a SEG
meta-model (Longstreet and Cooper 2012) and storyboard features
(game play, graphics, audio) (Truong et al. 2006). The meta-model
uniquely integrates concepts from the game (e.g., game plot, characters,
mechanics) and education (e.g., learning objectives, assessment, course
content) domains. The tabular specifications have been manually cre-
ated; a semiautomated, intelligent wizard to create games and output
formal models is future work (Figure 3.7).
The informal narrative is mapped to the Game, Act, Scene, Screen, and
Challenge templates (SimSYS 2012). The game, act and scene templates
are relatively simple—they provide the structure and sequencing to orga-
nize the screens. The majority of the game play is defined in the Screens
and Challenges. See Appendix 3A for a Challenge represented as a tabular,
semiformal model.
78 ◾ Computer Games and Software Engineering
Identifier Challenge 1
SWEBOK Analysis
Design Patterns
Option
Stem
description Option
Bloom’s Taxonomy: knowledge, application
Option
Understand the purpose of established design patterns Stem
(strategy, bridge, factory, singleton) question Option
Analyze the SE context, understand and solve the SE problem; critically consider alternative design
pattern solutions, select a design pattern to solve an SE problem (application)
Character None
presenting
the quiz
FIGURE 3.7 A tailored tabular use case specification for the example Test Game.
(Continued)
80 ◾ Computer Games and Software Engineering
TABLE 3.1 (Continued) XML Partial Representation of the Test Game Challenge
<! What kind of knowledge is in the challenge?— >
<domainKnowledgeList>
<domainKnowledge>software engineering</
domainKnowledge>
<area>Software Design</area>
<topic_list>
<topic>General_Design_Concepts<\topic>
<topic>Context_of_Software_Design<\topic>
<topic>Software_Design_Process<\topic>
<topic>Software_Design_Re-use<\topic>
</topic_list>
<\domainKnowledgeList>
<transferableKnowledgeList>
<transferableKnowledge>analysis
</transferableKnowledge>
<transferableKnowledge>critical_thinking
</transferableKnowledge>
<transferableKnowledge>problem_solving
</transferableKnowledge>
<\transferableKnowledgeList>
<! How is the knowledge being assessed?— >
<expression>dialog</expression>
<learningTaxonomyList>
<learningTaxonomy>knowledge</learningTaxonomy>
<learningTaxonomy>application
</learningTaxonomy>
</learningTaxonomyList>
<! Challenge item— >
<! The challenge item has a stem, with zero or one
text (description or vignette), zero or more images,
and a question.— >
<!— stem description— >
<stemDescription>
<type>
<typeName>InformationBox</typeName>
<event>
<eventName>NONE</eventName>
<animation>FADEIN</animation>
<time>QUICK</time>
</event>
<color>YELLOW</color>
<location>UUR</location>
(Continued)
Model-Driven Engineering of Serious Educational Games ◾ 81
TABLE 3.1 (Continued) XML Partial Representation of the Test Game Challenge
<size>MEDIUM</size>
<text>
The designers need to use a complex AI
algorithm that is available as a 3rd party
component with an API. The designers know
there are a number of possible components
available on the marketplace, which are
undergoing extensive performance
evaluations. The final recommendation will
not be available for several months.
</text>
</type>
<!— stem question— >
<stemQuestion>
<type>
<typeName>InformationBox</typeName>
<event>
<eventName>NONE</eventName>
<animation>FADEIN</animation>
<time>QUICK</time>
</event>
<color>YELLOW</color>
<location>UUR</location>
<size>MEDIUM</size>
<text> W
hich design pattern would be suitable
to reduce the impact of this eventual
recommendation?</text>
</type>
</stemQuestion>
<!— options (answers)— >
<! Each option has text, hint, evaluation, reward, and
feedback.
<stemOptionList>
<stemOption>
<type>
<typeName>Button</typeName>
<event>
eventName>NONE</eventName>
<animation>FADEIN</animation>
<time>QUICK</time>
</event>
<event>
<eventName>Click</eventName>
<animation>FADEOUT</animation>
<next> FeedbackScreen1 </next>
</event>
(Continued)
82 ◾ Computer Games and Software Engineering
TABLE 3.1 (Continued) XML Partial Representation of the Test Game Challenge
<! -->
<name> Option1 </name>
<location> UUL </location>
<color> Yellow </color>
<text> Strategy Pattern </text>
<! Hint -- >
<type>
<typeName> InformationBox</typeName>
<name> Hint1 </name>
<eventName> HOVER</eventName>
<location> UUL </location>
<color> Yellow </color>
<text>The Strategy pattern defines a family
of algorithms, encapsulates each one, and
makes them interchangeable; algorithms are
selected at runtime. It is a behavioral
pattern. <\text>
<\type>
<! Evaluation -- >
<evaluation> Incorrect </evaluation>
<!—Reward ->
<reward>NONE<\reward>
<type>
<! Feedback -- >
<typeName> MessageBox </typeName>
<location> UC </location>
<color> Yellow </color>
<text>: S
orry – the correct answer is the
bridge pattern<\text>
</type>
</stemOption>
…
<\stemOptionList>
<\item>
…
<\challengeItemList>
…
…
Model-Driven Engineering of Serious Educational Games ◾ 83
are represented in XML using two kinds of tags to define lists of topics
(<domainKnowledgeList>, <transferableKnowledgeList>).
The next tags define the assessment approach for the question, How is the
knowledge being assessed? The question with four answer options—evalu-
ation, hints, rewards, and feedback—follow in the XML file. Although the
file is quite long, it is straightforward to read; the manual mapping from
the semiformal tabular model to the XML is time consuming, but not too
difficult.
REFERENCES
Abran, A., Moore, J.W., and Bourque, P. (2004). Guide to the Software Engineering
Body of Knowledge (SWEBOK): 2004 Version. IEEE Computer Society, Los
Alamitos, CA. Appendix D.
Adams, E. (2010). Fundamentals of Game Design. 2nd edition. New Riders
Publishing, Berkeley, CA.
Anderson, Jr., E.G. and Morrice, D.J. (2000). Simulation game for teaching service-
oriented supply chain management: Does information sharing help manag-
ers with service capacity decisions? Production and Operations Management
9: 40–55.
Anderson, L. W., Krathwohl, D. R., et al. (Eds.) (2001). A Taxonomy for Learning,
Teaching, and Assessing: A Revision of Bloom’s Taxonomy of Educational
Objectives. Allyn & Bacon (Pearson Education Group). Boston, MA.
Brathwaite, B. and Schreiber, I. (2008). Challenges for Game Designers. Charles
River Media, Boston, MA.
Chen, F. and Samroengraja, R. (2000). The stationary beer game. Production and
Operations Management 9: 19–30.
Cooper, K. and Longstreet, C.L. (2012a). Towards model-driven game engineer-
ing for serious educational games: Tailored use cases for game requirements.
Proceedings of the IEEE 17th International Conference on Computer Games,
Louisville, KY, July 30–August 1, pp. 208–212.
Cooper, K. and Longstreet, C.L. (2012b). Towards model-driven game engineering
in SimSYS: Requirements for the Agile software development process game.
Technical report, co-published UTDCS-06-12. The University of Texas at Dallas,
Richardson, TX; MU-CTL-01-12 Marquette University, Milwaukee, WI, March.
Cooper, K., Nasr, E., and Longstreet, C.L. (2014). Towards model-driven require-
ments engineering for serious educational games: Informal, s emi-formal,
and formal models. Proceedings of the 20th International Working Conference
on Requirements Engineering: Foundation for Software Quality, Essen,
Germany, April 7–10, pp. 17–22.
Crookall, D. and Saunders, D. (Eds.) (1989). Toward an integration of communi-
cation and simulation. In Communication and Simulation from Two Fields to
One. Multilingual Matters, Clevedon.
Dantas, A.R., Barros, M.O., and Werner, C. (2005). Simulations models applied to
game-based training for software project managers. Process Simulation and
Modeling Workshop, St. Louis, MO, May 14–15, pp. 110–116.
Dempsey, V.J., Haynes, L.L., Lucassen, B.A., and Casey, M.S. (2002). Forty simple
computer games and what they mean for educators. Simulation and Gaming
33(2):157–168.
Deterding, S., Dixon, D., Khaled, R., and Nacke, L. (2011). From game design
elements to gamefulness: Defining “gamification.” Proceedings of the 15th
International Academic Mindtrek Conference, Tampere, Finland, September
28–30, pp. 9–15.
Gee, J.P. (2003). What Video Games Have to Teach Us about Learning and Literacy?
Macmillan, New York.
Model-Driven Engineering of Serious Educational Games ◾ 85
Identifier Challenge 1
Purpose Multiple choice quiz on design patterns
Challenge type: Dialogue
Learning Domain specific Transferable
objectives Software design Critical thinking
SWEBOK Analysis
Software design Problem solving
Software design fundamentals
General design concepts
Context of software design
Software design process
Software design principles
Software structure and architecture
Design patterns
Understand the purpose of established design patterns (strategy, bridge,
factory, singleton)
Understand the role of design patterns in an SE design evolution
problem
Analyze the SE context, understand, and solve the SE problem; critically
consider alternative design pattern solutions and select a design pattern
to use
Character None
presenting
the quiz
Competing None
characters
Quiz style Layout (overall organization)
Multiple choice Option
Stem
Question (stem description, description Option
stem question) on the left
Answer options on the right Option
Stem
(two or more) question Option
Generic interaction props
Question: information bubbles
Answer: button
Hint: information box
Feedback: information bubble
Reward Correct answer: add 500 points
scheme Incorrect answer: no change to points
(Continued)
88 ◾ Computer Games and Software Engineering
(Continued)
Model-Driven Engineering of Serious Educational Games ◾ 89
Game Play
Interactions Note: Challenge 1 (a multiple
Option
(normal choice quiz) is presented. Stem
flow of description Option
Start Challenge 1
events) Play Challenge 1 Option
Present question and answers Stem
Option
FADE IN stem description, stem
question, and answers as a
QUICK EFFECT
Player displays hint
If the player moves the mouse The Option
over an answer option, display strategy Option
the hint. pattern
Option
If the player moves the mouse ... Option
away from an answer, remove the
hint from the display.
Players’ answers
FADE OUT stem description,
stem question, and answers as a
QUICK EFFECT
Feedback
Evaluate answers
Answer option 1: no change
Answer option 2: add 500 points
for the player
Answer option 3: no change
Answer option 4: no change
Present player feedback
If answer option is 1, 2, 3, or 4,
then display the feedback for a
MODERATE amount of time.
End Challenge 1
Note: At the end of the challenge,
the game needs to remove the
visual setting from the display.
Alternate If an error occurs, then end the game.
flow of
events
Chapter 4
A Gameful Approach
to Teaching Software
Design and Software
Testing*
Swapneel Sheth, Jonathan Bell, and Gail Kaiser
CONTENTS
4.1 Introduction 92
4.2 Background and Motivation 93
4.2.1 Student Software Testing 93
4.2.2 HALO Software Engineering 94
4.2.3 Software Design 95
4.3 Gameful Testing Using HALO 95
4.3.1 HALO Plug-In for Eclipse 95
4.3.2 COMS 1007—Object-Oriented Programming and
Design with Java 96
4.3.3 A Case Study with HALO 97
4.3.3.1 An Assignment on Java Networking: Getting
and Analyzing Data from the Internet—The
CIA World Factbook 97
* This chapter is based on an earlier work “Secret Ninja testing with HALO software engineering,”
in Proceedings of the 4th International Workshop on Social Software Engineering, 2011. Copyright
ACM, 2011. http://doi.acm.org/10.1145/2024645.2024657; A competitive-collaborative approach for
introducing software engineering in a CS2 class, in 26th IEEE Conference on Software Engineering
Education and Training, 2013. Copyright IEEE, 2013. http://dx.doi.org/10.1109/CSEET.2013.6595235.
91
92 ◾ Computer Games and Software Engineering
4.1 INTRODUCTION
Introductory computer science courses traditionally focus on exposing
students to basic programming and computer science theory, leaving little
or no time to teach students about software testing [1,2,3]. A great deal of
students’ mental model when they start learning programming is that “if
it compiles and runs without crashing, it must work fine.” Thus, exposure
to testing, even at a very basic level, can be very beneficial to the students
[4,5]. In the short term, they will do better on their assignments as testing
before submission might help them discover bugs in their implementa-
tion that they had not realized. In the long term, they will appreciate the
importance of testing as part of the software development life cycle.
However, testing can be tedious and boring, especially for students who
just want their programs to work. Although there have been a number
of approaches to bring testing to students early in the curriculum [3,4,5],
there have been significant setbacks due to low student engagement and
interest in testing [1]. Past efforts to teach students the introductory testing
practices have focused on formal testing practices, including approaches
using test-driven development [1,4].
Kiniry and Zimmerman [6] propose a different approach to teaching
another topic that students are often uninterested in—formal methods for
verification. Their approach, which they call secret ninja formal methods,
aims to teach students formal methods without their realizing it (in a
sneaky way). We combine this secret ninja methodology with a social envi-
ronment and apply it to testing in order to expose students to testing while
avoiding any negative preconceptions about it.
Teaching Software Design and Software Testing ◾ 93
We found that 33% of the students had at least one “major” functional-
ity flaw (defined as omitting a major requirement from the assignment)
and over 85% of all students had multiple “minor” functionality flaws
(defined as omitting individual parts of requirements from assignments)
in at least one assignment. We believe that this data shows that students
were not testing appropriately and suggests that student performance
could increase from a greater focus on testing. Similar student testing hab-
its have also been observed at other institutions [9].
FIGURE 4.1 The HALO eclipse plug-in: The bottom part shows the dashboard,
which keeps track of the achievements, experience points, and leaderboards; the
top right part shows the quest list and progress.
4.3.2 COMS 1007—Object-Oriented
Programming and Design with Java
COMS 1007—Object-Oriented Programming and Design with Java was the
second course in the track for CS majors and minors at Columbia University.
The class was also required for majors in several other engineering disci-
plines, including electrical engineering and industrial engineering, and was
used by other students to satisfy their general science or computer science
requirement. The first author taught this course in Spring (January–May)
2012.* The course goals were as follows: A rigorous treatment of object-
oriented concepts using Java as an example language and Development of
sound programming and design skills, problem solving and modeling of real
world problems from science, engineering, and economics using the object-
oriented paradigm [17]. The prerequisite for the course was familiarity with
programming and Java (demonstrated through a successful completion of
* The introductory sequence of courses has undergone a change and COMS 1007 has become an
honors version of the CS1 course since Fall 2012.
Teaching Software Design and Software Testing ◾ 97
be able to deal with this correctly and not crash (or get exterminated).
Completing this quest will reward you with 30 XP and unlock
Achievement: Torchwood. This quest has two tasks:
a. Partners in Crime or Your Companion—You can get help for
parsing through the HTML stuff—you could do it yourself,
you could use regular expressions, or you could use an external
HTML parsing library. Regardless of who your partner in crime
is, are you sure that it is working as expected and not accidentally
removing or keeping information that you would or would not
need, respectively?
b. Blink—Your program does not need to be afraid of the Angels
and can blink, that is, take longer than a few seconds to run and
get all the information. However, this should not be too long, say
1 hour. Does your program run in a reasonable amount of time?
3. The Sonic Screwdriver—This is a useful tool used by the Doctor to
make life a little bit easier. Does your code make it easy for you to
answer the required questions? Completing this quest will reward
you with 40 XP. This quest has three tasks:
a. Human Nature—It might be human nature to hard code certain
pieces of information in your code. However, your code needs to
be generic enough to substitute the italicized parts of the ques-
tions. Is this possible?
b. The Sontaran Stratagem—For some of the questions, you do not
need a clever strategy (or algorithm). However, for some of the
latter questions, you do. Do you have a good code strategy to deal
with these?
c. Amy’s Choice—You have a choice of two wild card questions. Did
you come up with an interesting question and answer it?
1. Perfectly Framed (Task): Is the panel for the hole situated on the
frame? Is there any discrepancy between where you click and what
shows up on the screen? Is the information bar causing problems?
2. Win, Lose, or Draw (Task): Are you able to draw lines and water? Are
you able to place the hole and the tee box? Can you add multiple lines
and multiple ponds? Could you add a new type of line?
3. Like a Rolling Stone (Task): Does the ball move where it is supposed
to? Do you have a good formula for realistic motion of the ball?
4. When We Collide (Task): Does the ball handle collisions correctly?
Is the behavior correct when the ball hits a line, a wall, the hole, or a
water hazard?
4.3.3.3.2 Matrix Code Encoder/Decoder The user will select a text file that
he or she would like to encode or decode and will select the alphabet and
numerical key for use. Encoded messages can be sent to a designated user
using the networking principles we have learned in class.
1. I’ll Handel It: Are your classes passing each other the correct infor-
mation? Make sure there is no overlap between the calculations
performed by one class and those of another. Are variables updated
correctly to reflect user input?
2. Liszt Iterators: During the matrix multiplication process, it is neces-
sary to keep track of several iterators simultaneously. Is each of these
iterators incrementing and/or resetting at appropriate moments?
Does each one accomplish a specific task?
3. What are you Haydn? Encapsulation is key! Encapsulation makes it
much easier to understand code and to make changes later on. Have
you broken tasks into subtasks, each united by a mini-goal? How can
you break up the encoding and decoding methods? Can you break
the GUI into bite-sized pieces?
Teaching Software Design and Software Testing ◾ 101
116 out of 129 students (89.92%) of the class elected to take part in the tour-
nament, and of those that wanted to be in the tournament, 107 (92.24%)
had implementations that functioned well enough (e.g., did not crash) and
competed in the tournament.
1 /**
2 * The game interface – this will control the
Battleship game.
3 * It will keep track of 2 versions of the “board”
– one for each player.
4 * It will let players take turns.
5 * It will announce hits, misses, and ships sunk
(by calling the appropriate methods in the Player
interface/class).
6 * @author swapneel
7 *
8 */
9 public interface Game {
10
11 int SIZE = 10;
12
13 int CARRIER = 5;
14 int BATTLESHIP = 4;
15 int SUBMARINE = 3;
16 int CRUISER = 3;
17 int DESTROYER = 2;
18
19 /**
20 * This method will initialize the game.
21 * At the end of this method, the board has
been set up and the game can be started
22 * @param p1 Player 1
23 * @param p2 Player 2
24 */
25 void initialize(Player p1, Player p2);
26
27 /**
28 * This is the start point of playing the game.
29 * The game will alternate between the players
letting them take shots at the other team.
Teaching Software Design and Software Testing ◾ 103
1 /**
2 * The Location interface to specify how x and y
coordinates are represented.
3 * This can be used to represent the location of a
ship or a shot.
4 * If the location is a shot, the isShipHorizontal()
method can return an arbitrary value.
5 * @author swapneel
6 *
7 */
8 public interface Location {
9
10 /**
11 * Gets the x coordinate
12 * @return the x coordinate
13 */
14 int getX ();
15
16 /**
17 * Gets the y coordinate
18 * @return the y coordinate
19 */
20 int getY ();
21
22 /**
23 * This method will indicate whether the ship
is horizontal or vertical.
24 * Can return an arbitrary value if the location
is used to indicate a shot (and not a ship)
25 * @return true if ship is horizontal, false
otherwise
26 */
27 boolean isShipHorizontal ();
28
29}
104 ◾ Computer Games and Software Engineering
1 /**
2 * The Player interface
3 * Each player will get to choose where to place the 5
ships and how to take turns shooting at enemy ships
4 * @author swapneel
5 *
6 */
7 public interface Player {
8
9 /**
10 * This method will place a ship on the grid.
11 * This method should guarantee correctness of
location (no overlaps, no ships over the edge
of the board, etc.)
12 * @param size the size of the ship to place
13 * @param retry if an earlier call to this method
returned an invalid position, this method will
be called again with retry set to true.
14 * @return The Location of the ship
15 */
16 Location placeShip (int size, boolean retry);
17
18 /**
19 * This method will get the new target to aim
for
20 * @return The Location of the target
21 */
22 Location getTarget ();
23
24 /**
25 * This method will notify the Player of the
result of the previous shot
26 * @param hit true, if it was a hit; false
otherwise
27 * @param sunk true, if a ship is sunk; false
otherwise
28 */
29 void setResult (boolean hit, boolean sunk);
30
31}
Teaching Software Design and Software Testing ◾ 105
I had general
programming
difficulties aside, 1
FIGURE 4.3 Reasons why HALO was not beneficial to students (n = 29).
4.5.2.1.2 Assignment and Quest Design A big advantage with HALO is that
there are no constraints with assignment creation and design. However,
there are a few implications as far as quest design is concerned. First, creat-
ing good and fun quests takes a significant amount of time. In our experi-
ence, quest creation took about 30% of the time that it takes to create an
assignment. In other words, creating quests for three to four assignments is
about the same time as creating an entire new assignment. This needs to be
factored in with the other time constraints that an instructor might have.
Second, quest creation is much easier and faster if the same person creates
both the assignment and the quests for it. In our case, there were a few
assignments that were designed or conceived by TAs, and unfortunately,
they could not create the quests themselves as they had not taken a software
engineering or software testing class yet. This meant that quest creation
had to be done by the first author, and hence needed much more time.
4.7 CONCLUSION
In this chapter, we described how we incorporated gameful elements for
teaching software testing and software design in a CS2 class. Students learnt
software testing using a social learning environment. We described our
HALO prototype, an assignment, and the accompanying quests for HALO
to enhance teaching of software testing in a CS2 class. Students learnt soft-
ware design via a competitive tournament, and we described details of our
assignment and on how the tournament was run. The feedback from the
students for both these aspects was largely positive.
We believe that our approach will make testing and design more engag-
ing and fun for students, leading to better systems. We also feel that this
will inculcate good software engineering habits at an early stage.
ACKNOWLEDGMENTS
We thank Joey J. Lee of Teachers College’s Games Research Lab and Jessica
Hammer of Carnegie Mellon University’s Human-Computer Interaction
Institute, for their assistance with the pedagogical aspects of this work.
We thank all the students who participated in the COMS 1007 class. We
thank the teaching assistants, Lakshya Bhagat, Amrita Mazumdar, Paul
Palen, Laura Willson, and Don Yu, for helping with the class.
The authors are members of the Programming Systems Laboratory
(PSL) at Columbia University. PSL is funded in part by NSF CCF-1302269,
NSF CCF-1161079, NSF CNS-0905246, and NIH U54 CA121852.
Teaching Software Design and Software Testing ◾ 111
REFERENCES
1. Sebastian Elbaum, Suzette Person, Jon Dokulil, and Matt Jorde. Bug hunt:
Making early software testing lessons engaging and affordable. Proceedings
of the 29th International Conference on Software Engineering, pp. 688–697,
IEEE Computer Society, Washington, DC, 2007.
2. Ursula Jackson, Bill Z. Manaris, and Renée A. McCauley. Strategies for effec-
tive integration of software engineering concepts and techniques into the
undergraduate computer science curriculum. Proceedings of the 28th SIGCSE
Technical Symposium on Computer Science Education, pp. 360–364, ACM,
New York, 1997.
3. Edward L. Jones. Integrating testing into the curriculum arsenic in small
doses. SIGCSE Bulletin, 33:337–341, 2001.
4. Stephen H. Edwards. Rethinking computer science education from a test-first
perspective. Companion of the 18th Annual ACM SIGPLAN Conference on Object-
Oriented Programming, Systems, Languages, and Applications, pp. 148–155, ACM,
New York, 2003.
5. Edward L. Jones. An experiential approach to incorporating software test-
ing into the computer science curriculum. In Proceedings of the 31st Annual
Frontiers in Education Conference, vol. 2, pp. F3D–7–F3D–11, IEEE Computer
Society, Washington, DC, 2001.
6. Joseph R. Kiniry and Daniel M. Zimmerman. Secret ninja formal meth-
ods. Proceedings of the 15th International Symposium on Formal Methods,
pp. 214–228, Springer-Verlag, Berlin, Germany, 2008.
7. Swapneel Sheth, Jonathan Bell, and Gail Kaiser. HALO (Highly Addictive,
sociaLly Optimized) software engineering. Proceedings of the 1st International
Workshop on Games and Software Engineering, pp. 29–32, ACM, New York, 2011.
8. Blizzard Entertainment. World of Warcraft. http://us.battle.net/wow/en.
9. David Ginat, Owen Astrachan, Daniel D. Garcia, and Mark Guzdial. “But it looks
right!”: The bugs students don’t see. Proceedings of the 35th SIGCSE Technical
Symposium on Computer Science Education, pp. 284–285, ACM, New York, 2004.
10. Jane McGonigal. Reality Is Broken: Why Games Make Us Better and How
They Can Change the World. Penguin Press, New York, 2011.
11. Joey J. Lee and Jessica Hammer. Gamification in education: What, how, why
bother? Academic Exchange Quarterly, 15(2):2, 2011.
12. John P. Charlton and Ian D.W. Danforth. Distinguishing addiction and high
engagement in the context of online game playing. Computers in Human
Behavior, 23(3):1531–1548, 2007.
13. Patricia Wallace. The Psychology of the Internet. Cambridge University Press,
New York, 2001.
14. SungBok Park and Ha Hwang. Understanding online game addiction:
Connection between presence and flow. In Human-Computer Interaction.
Interacting in Various Application Domains, Lecture Notes in Computer
Science, vol. 5613, pp. 378–386, Springer, Berlin, Germany, 2009.
15. Tracy Hall, Helen Sharp, Sarah Beecham, Nathan Baddoo, and Hugh Robinson.
What do we know about developer motivation? IEEE Software, 25(4):92–94, 2008.
112 ◾ Computer Games and Software Engineering
16. Laurie Williams and Lucas Layman. Lab partners: If they’re good enough for
the natural sciences, why aren’t they good enough for us? Proceedings of the 20th
Conference on Software Engineering Education & Training, pp. 72–82, 2007.
17. Columbia Engineering—The Fu Foundation School of Engineering and
Applied Science. Bulletin 2011–2012. http://bulletin.engineering.columbia.
edu/files/seasbulletin/2011Bulletin.pdf, 2011.
18. Swapneel Sheth, Jonathan Bell, and Gail Kaiser. A gameful approach to
teaching software design and software testing—Assignments and quests.
Technical Report cucs-030-13, Department of Computer Science, Columbia
University, New York, 2013. http://mice.cs.columbia.edu/getTechreport.
php?techreportID=1557.
19. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design
Patterns: Elements of Reusable Object-Oriented Design, Addison-Wesley, 1995.
20. Michael H. Goldwasser. A gimmick to integrate software testing throughout
the curriculum. SIGCSE Bulletin, 34:271–275, 2002.
21. James (Jim) Horning and David B. Wortman. Software hut: A computer
program engineering project in the form of a game. IEEE Transactions on
Software Engineering, 3(4):325–330, 1977.
22. Alex Baker, Emily Oh Navarro, and André van der Hoek. An experimental
card game for teaching software engineering processes. Journal of Systems
and Software, 75(1/2):3–16, 2005.
23. Emily Oh Navarro and André van der Hoek. SimSE: An educational sim-
ulation game for teaching the software engineering process. Proceedings
of the 9th Annual SIGCSE Conference on Innovation and Technology in CS
Education, Leeds, UK, p. 233, 2004.
24. Michael Eagle and Tiffany Barnes. Experimental evaluation of an educational
game for improved learning in introductory computing. SIGCSE Bulletin,
41:321–325, 2009.
25. Ita Richardson, Sarah Moore, Daniel Paulish, Valentine Casey, and Dolores
Zage. Globalizing software development in the local classroom. Proceedings
of the 20th Conference on Software Engineering Education Training, pp. 64–71,
July 2007.
26. Kevin Bierre, Phil Ventura, Andrew Phelps, and Christopher Egert. Motivating
OOP by blowing things up: An exercise in cooperation and competition in an
introductory Java programming course. In Proceedings of the 37th SIGCSE
Technical Symposium on Computer Science Education, pp. 354–358, 2006.
27. Renee Bryce. Bug Wars: A competitive exercise to find bugs in code. Journal
of Computing Sciences in Colleges, 27(2):43–50, 2011.
28. Terhi Kilamo, Imed Hammouda, and Mohamed Amine Chatti. Teaching
collaborative software development: A case study. Proceedings of the 2012
International Conference on Software Engineering, pp. 1165–1174, 2012.
Chapter 5
Educational Software
Engineering
Where Software Engineering,
Education, and Gaming Meet
CONTENTS
5.1 Introduction 114
5.2 Background: Online Programming Exercise Systems 115
5.2.1 CodingBat 115
5.2.2 CloudCoder 117
5.2.3 Practice-It 117
5.2.4 CodeLab 118
5.2.5 Codecademy 118
5.2.6 BetterProgrammers 119
5.2.7 Discussion 119
5.3 Pex4Fun: Gamification of an Online Programming Exercise
System 120
5.3.1 Software Engineering Technologies Underlying Pex4Fun 121
5.3.2 Gaming in Pex4Fun 122
5.3.3 Social Dynamics in Pex4Fun 123
5.3.3.1 Ranking of Players and Coding Duels 123
5.3.3.2 Live Feeds 123
5.3.4 Educational Usage of Pex4Fun 125
5.3.5 Code Hunt 126
113
114 ◾ Computer Games and Software Engineering
5.1 INTRODUCTION
Among various subfields of software engineering, software engineering
education [1] has been an important one, focusing on educational topics for
software engineering (e.g., how to better teach and train software engineering
skills). In general, research work on software engineering education does not
appear in research tracks of major software engineering conferences but appears
in their education tracks or conferences with focus on software engineering
education. For example, the International Conference on Software Engineering
(ICSE; http://www.icse-conferences.org) generally has a track on software
engineering education. The ACM SIGPLAN Conference on Object-Oriented
Programming, Systems, Languages, and Applications has also recently included
a colocated Educator’s Symposium (http://www.splashcon.org/history). The
Conference on Software Engineering Education and Training (http://
conferences.computer.org/cseet) has focused on software engineering educa-
tion and training since 1987. Indeed, research work on software engineering
education sometimes also appears in meetings on computer science education,
such as the SIGCSE Technical Symposium (http://www.sigcse.org/events/
symposia) and the Annual Conference on Innovation and Technology in
Computer Science Education (http://www.sigcse.org/events/iticse).
In this chapter, we define and advocate the subfield of educational soft-
ware engineering (i.e., software engineering for education) within the
domain of software engineering research. This subfield develops software
engineering technologies (e.g., software testing and analysis [2], software
analytics [3,4]) for general educational tasks, going beyond educational
tasks for software engineering. For example, general educational tasks can
even be on teaching math [5–7]. As an analogy, data mining for software
engineering [8] (also called mining software repositories [9]) leverages
data mining technologies (which typically come from the data mining
community) to address tasks in software engineering, whereas educational
software engineering leverages software engineering technologies (which
comes usually from the software engineering community) to address tasks
in education. In addition, in the solution space, gaming technologies often
play an important role together with software engineering technologies.
Educational Software Engineering ◾ 115
* This chapter significantly extends a previous short article [31] presented in the 3rd International
Workshop on Games and Software Engineering (2013). This new extension in this chapter primar-
ily includes surveying-related online programming exercise systems (Section 5.2); restructuring
and enriching the description of Pex4Fun as an example for gamificating an online programming
exercise system, adding the description of Code Hunt (Section 5.3.5), a recent gaming platform
evolved from Pex4Fun; and discussing additional more recent related work.
116 ◾ Computer Games and Software Engineering
The array will be length 2 or more.” In addition, the web page also includes
a table for showing a small number of sample expected input/output pairs:
Then the code editor in the middle of the web page includes an empty
method body for public boolean scoresIncreasing(int[]
scores) (note that when a problem creator creates a problem, the
method, such as scoresIncreasing in the problem, should return
a value). A student who tries to solve the problem is expected to fill in
code in the empty method body to solve the given programming prob-
lem. After the student fills in code and clicks the Go button, CodingBat
displays compilation issues, if any, that are encountered when the code
is compiled; otherwise, CodingBat runs a predefined set of test cases (prepared
by the problem creator) against the code and reports these test cases being
labeled as failing test cases or passing test cases. Note that these test cases
are reported in the form of the preceding example expected input/output
pairs. Based on the feedback (i.e., the reported test cases and their failing/
passing statuses), the student can further attempt to improve his or her
code to make all test cases as passing test cases.
Because the predefined set of test cases is visible to the student, the
student can “fool” CodingBat by writing code that includes a conditional
statement for each reported test case so that the conditional in the condi-
tional statement checks whether the method arguments are the same as the
input in a reported test case and then the true branch of the conditional
statement simply returns the expected output in the reported test case.
Apparently, the code written in this way to overfit the reported test cases is
not the correct code for the exercise problem. However, CodingBat would
still report All Correct because all the predefined test cases are indeed
passing test cases.
CodingBat allows the student to view the progress graph for a prob-
lem, showing the problem-solving history (e.g., the percentage of passing
test cases and percentage of failing test cases) for each version of the code
written and submitted by the student for the problem over time. The stu-
dent can also view graphs from some random users just for fun. A student
can earn code badges by solving problems across all of the fundamental
sections (which include very common code patterns that often come up at
Educational Software Engineering ◾ 117
coding, such as problems related to strings, arrays, and logic). For example,
a student earns a five-star badge when the student solves three problems
in each fundamental section. The student can share his or her account
with a “teacher” account, from which the associated teacher can view the
problem-solving statistics of the student along with the code written by
the student for each problem. However, the teacher is not advised to use
CodingBat as a grading platform of exams or homework assignments, but
is advised to leverage CodingBat as a practice platform for students.
5.2.2 CloudCoder
CloudCoder [17] (http://cloudcoder.org/) and CodeWrite [18] (http://code-
write.cs.auckland.ac.nz/) are two systems closely related to CodingBat.
CloudCoder is an open-source web-based programming exercise system
with exercises in C/C++, Java, Python, and Ruby. CloudCoder provides
similar mechanisms as CodingBat’s for students to solve problems based
on the testing results against a predefined set of test cases. However,
CodeWrite allows a student to construct an exercise problem along with
the test cases for the problem so that other peer students can solve the
exercise problem (in the same way as solving an exercise problem in
CodingBat or CloudCoder). Note that in CodingBat or CloudCoder, only
teachers or platform providers (not students) are supposed to construct
exercises.
5.2.3 Practice-It
Practice-It (http://practiceit.cs.washington.edu/) is an online platform
for students to practice solving Java programming problems. Many of
the problems were drawn from the University of Washington’s introduc-
tory programming courses. A student can select a problem from the list
of problems organized by chapter topics of a programming textbook or
section topics of the University of Washington’s introductory program-
ming courses. Once granted permission by the platform administrators,
users of the platform can also create and upload a problem. If the problem
creator defines some constraints for the problem, Practice-It first checks
the student’s code against such constraints and reports constraint viola-
tion errors such as the following: Error: Your solution doesn’t meet one or
more constraints required by this problem. Your solution must use a static
method. (must appear 2 times in your solution). If the student’s code does
not compile, Practice-It reports repairing hints based on the compilation
errors. After the student’s code compiles, Practice-It runs a predefined set
118 ◾ Computer Games and Software Engineering
of test cases (prepared by the problem creator) against the student’s code.
Then Practice-It reports a table that includes testing information for each
test case: the test input, expected output, actual output (produced by the
student’s code), and result (pass or fail). When the expected output is dif-
ferent from the actual output, the result is fail; the different outcomes of the
actual output and the expected output are also reported.
5.2.4 CodeLab
CodeLab (http://www.turingscraft.com/), providing paid access of full
exercises to students, is a web-based programming exercise system with
exercises in Python, Java, C++, C, JavaScript, C#, VB, and SQL. CodeLab
provides short exercises, each of which typically focuses on a program-
ming concept or language construct. Different from other related systems,
CodeLab does not report any explicit test cases (i.e., input/output pairs)
to a student after the student submits code for a given exercise problem.
Instead, CodeLab informs the student whether his or her submitted code
is correct (the correctness judgment of the code seems to be based on
running a predefined set of test cases, without considering code elegance
or efficiency). If incorrect, CodeLab additionally informs the student of
repairing hints such as likely locations of faulty code portions and hint
sentences, for example, “You almost certainly should be using: /.” These
repairing hints seem to be identified based on syntactic comparison of the
submitted code and the solution code. CodeLab provides no feedback to
the student in terms of specific correct (or incorrect) input/output behav-
iors of the submitted code. CodeLab organizes exercises in a sequence
related to a programming concept or language construct (typically 3–10
exercises in a sequence). The exercises included in a sequence are of gradu-
ally increasing sophistication. The teacher of a class is suggested to allocate
5%–10% of a student’s class grade to be correct completion of the CodeLab
exercises. Besides leveraging the existing exercises in CodeLab, a teacher
can create additional exercises in CodeLab for his or her class to use.
5.2.5 Codecademy
Codecademy (http://www.codecademy.com/) is an online interactive plat-
form that offers free programming classes in Python, PHP, jQuery,
JavaScript, Ruby, HTML, and CSS. In a browser, on the left-hand side, a
student is provided short texts that illustrate a programming knowledge
point and instructions for the student to carry out a related programming
exercise in the online code editor displayed in the middle of the browser.
Educational Software Engineering ◾ 119
The instructions also include a hint portion that can be viewable only after
the student clicks “Stuck? Get a hint.” After the student finishes writing
code in the code editor following the instructions and then clicks the button
“Save and Submit Code,” Codecademy assesses the written code against
the instructions (based on checking the outputs of the code against the
predefined outputs of the exercise); if the code is incorrect, Codecademy
provides a simple hint sentence to the student, such as Did you include two
console.log()s in your code? (This hint is based on syntactic differences of
the student’s code and the solution code.)
Note that, as opposed to programming exercise systems (such as
CodingBat) in which code written by students needs to be in the form of
a method with non-void return, CodeLab and Codecademy allow code
written by students to be just one or multiple lines of code.
5.2.6 BetterProgrammers
BetterProgrammers (http://www.betterprogrammer.com/) is an online plat-
form for Java programmers to solve a sequence of programming tasks
with increasing complexities. Instead of focusing on training, the plat-
form focuses on assessing and certifying programmers so that companies
can leverage such certification information in interviewing and hiring
programmer candidates. The top 50 programmers ranked by the plat-
form are posted on the front page of the platform website. The platform
does not provide a rich code editor but just requests programmers to
copy the code skeleton embedded with the task description as code com-
ments (from the simple code editor in the platform) to the programmers’
favorite Java IDE, finish the programming task, copy the completed code
for the task back to the simple code editor in the platform, and submit
the completed code. It is unclear how BetterProgrammers checks the
correctness of the submitted code. For each programming task, the rec-
ommended time and maximum time for task completion are listed along
with the elapsed task time in real time.
5.2.7 Discussion
Software engineering technologies underlying the existing online pro-
gramming exercise systems [19] are typically simple. For example,
a simple testing technique (i.e., running a predefined set of test cases
against the code submitted by a student to check the code’s correct-
ness) is commonly used in these existing systems. Some systems such
as Practice-It and CodeLab seem to use lightweight static program
120 ◾ Computer Games and Software Engineering
* The method signature of a coding duel must have at least one input parameter. The return type of
a coding duel must not be void.
Educational Software Engineering ◾ 123
a coding duel that the player has created or the player is also trying to win.
Figure 5.3 shows an example screen snapshot of the live feed.
Social dynamics in Pex4Fun share similar motivations as other recent
gamification examples in software engineering. For example, Stack
Overflow badges (http://stackoverflow.com/badges) have been used to
provide incentives for Stack Overflow users to ask or answer questions
Educational Software Engineering ◾ 125
FIGURE 5.4 (See color insert.) The main page of the Code Hunt website.
the underlying Pex tool gives customized progress feedback to the player
via the generated test cases, as displayed in the table on the right-hand side
of Figure 5.6. In addition, Code Hunt might hint a user to focus on a par-
ticular line of code, as shown in the last line of the table on the right-hand
side of the figure. When the player’s code achieves the same result as the
secret implementation, Code Hunt flashes Captured Code and provides a
score to the player based on how good the code was. Other improvements
128 ◾ Computer Games and Software Engineering
FIGURE 5.6 (See color insert.) An example coding duel in Code Hunt.
for Code Hunt beyond Pex4Fun are that Code Hunt offers Java as a supported
language (via a source code translator) and it runs on Microsoft Azure,
making it scalable to a large number of simultaneous users.
5.4 DISCUSSION
Educational software engineering is closely related to the field of educa-
tional games [30] (i.e., games for education), with example conferences such
as the Games+Learning+Society Conference (http://www.gameslearning-
society.org/conference) and example initiatives such as the MacArthur
Digital Media and Learning initiative (http://www.macfound.org/programs/
learning). The field of educational games typically focuses on gaming tech-
nologies for supporting educational purposes, whereas educational soft-
ware engineering typically focuses on software engineering technologies
for supporting educational purposes. In the context of Pex4Fun and Code
Hunt, the field of educational games would focus more on the aspect of
gaming (Section 5.3) whereas the field of educational software engineer-
ing would focus more on the aspect of software engineering technologies
(Section 5.3.1). Note that educational software engineering deals with not
only educational games but also other educational tools not being games.
In addition, it is reasonable to consider that software engineering for devel-
oping educational games or generally educational tools (such as software
quality assurance for educational game software) would be part of educa-
tional software engineering. In other words, educational software engineering
Educational Software Engineering ◾ 129
5.5 CONCLUSION
In this chapter, we have defined and advocated educational software engineer-
ing as an emerging subfield of software engineering. Educational software
engineering develops software engineering technologies for general educa-
tional tasks. In this subfield, gaming technologies often play an important role
together with software engineering technologies. We have presented Pex4Fun
(along with Code Hunt), one of our recent examples on leveraging software
130 ◾ Computer Games and Software Engineering
ACKNOWLEDGMENT
We thank the reviewers for their valuable feedback. Tao Xie’s work is
supported in part by a Microsoft Research Award, NSF grants CCF-1349666,
CNS-1434582, CCF-1434596, CCF-1434590, and CNS-1439481, and the
NSF of China, number 61228203.
REFERENCES
1. Mary Shaw. Software engineering education: A roadmap. In Proceedings of
FOSE, pp. 371–380, Limerick, Ireland, 2000.
2. Mary Jean Harrold. Testing: A roadmap. In Proceedings of FOSE, pp. 61–72,
Limerick, Ireland, 2000.
3. Dongmei Zhang, Yingnong Dang, Jian-Guang Lou, Shi Han, Haidong Zhang,
and Tao Xie. Software analytics as a learning case in practice: Approaches
and experiences. In Proceedings of MALETS, pp. 55–58, Lawrence, KS, 2011.
4. Dongmei Zhang, Shi Han, Yingnong Dang, Jian-Guang Lou, Haidong Zhang,
and Tao Xie. Software analytics in practice. Special Issue, IEEE Software,
5(30):30–37, 2013.
5. Erik Andersen, Sumit Gulwani, and Zoran Popovic. A trace-based frame-
work for analyzing and synthesizing educational progressions. In Proceedings
of CHI, pp. 773–782, Paris, France, 2013.
6. Sumit Gulwani, Vijay Korthikanti, and Ashish Tiwari. Synthesizing geom-
etry constructions. In Proceedings of PLDI, pp. 50–61, San Jose, CA, 2011.
7. Rohit Singh, Sumit Gulwani, and Sriram Rajamani. Automatically generat-
ing algebra problems. In Proceedings of AAAI, Toronto, ON, 2012.
8. Tao Xie, Suresh Thummalapenta, David Lo, and Chao Liu. Data mining for
software engineering. IEEE Computer, 42(8):35–42, 2009.
9. Ahmed E. Hassan. The road ahead for mining software repositories. In
Proceedings of FoSM, pp. 48–57, Beijing, China, 2008.
10. Armando Fox and David Patterson. Crossing the software education chasm.
Communications of the ACM, 55(5):44–49, 2012.
11. Ken Masters. A brief guide to understanding MOOCs. The Internet Journal of
Medical Education, 1, 2011. https://ispub.com/IJME/1/2/10995. doi:10.5580/1f21.
12. Rishabh Singh, Sumit Gulwani, and Armando Solar-Lezama. Automated
feedback generation for introductory programming assignments. In Pro
ceedings of PLDI, pp. 15–26, Seattle, WA, 2013.
13. Nikolai Tillmann, Jonathan De Halleux, Tao Xie, Sumit Gulwani, and Judith
Bishop. Teaching and learning programming and software engineering via
interactive gaming. In Proceedings of ICSE, Software Engineering Education
(SEE), pp. 1117–1126, San Francisco, CA, 2013.
Educational Software Engineering ◾ 131
30. James Paul Gee. What Video Games Have to Teach Us about Learning and
Literacy? Palgrave Macmillan, New York, 2007.
31. Tao Xie, Nikolai Tillmann, and Jonathan de Halleux. Educational software
engineering: Where software engineering, education, and gaming meet. In
Proceedings of GAS, pp. 36–39, San Francisco, CA, 2013.
Chapter 6
CONTENTS
6.1 Introduction 134
6.2 Background 135
6.3 Basis for Exploratory Studies: Development of Four
Serious Games 136
6.4 An Exploratory Study: How to Characterize Players
in Serious Games? 138
6.4.1 Study Design 139
6.4.2 Results 140
6.4.3 Conclusion 143
6.5 An Exploratory Study: How to Provide Help in Serious Games? 143
6.5.1 Study Design 143
6.5.2 Results 144
6.5.3 Conclusion 145
6.6 Threats to Validity 146
6.7 Toward a Definition of Adaptivity 146
6.8 Outlook 148
6.9 Summary and Conclusion 148
References 149
133
134 ◾ Computer Games and Software Engineering
6.1 INTRODUCTION
Serious games can engage the learner in a way most traditional teaching
methods cannot. They provide a platform where the two points, motiva-
tion and interactive learning, can be perfectly put together.
This chapter describes studies that explore the effects of human tutors
in serious games. Observations by developing serious games showed that
without help, children require more time to learn how to play the game
than adults, although both groups could reach the same time with help [1].
Learning theories such as Vygotsky’s social development theory [2], Piaget’s
stages of cognitive development [3], and Erikson’s developmental stages [4]
explain this phenomenon based on the social context of learners during
the learning process.
The reason why learning progresses faster with human tutors than with
other tools is the higher adaptivity to the learner. The problem is that seri-
ous games of the current state of the art do not adapt to the learner [5–8].
Consequently, a major goal in modern serious-game development and
research is to make the game adapt to the learner and provide intelligent
actions in order to achieve higher individuality [1,9].
Although one could argue that techniques to realize adaptivity have
already been developed for e-learning systems, the intelligent tutoring
systems (ITSs) usually foster very different activities than those seen in a
game. The aim of this chapter is therefore, to explore the ways of adaptiv-
ity that are specific to serious games and to build a foundation for software
frameworks for adaptivity in serious games.
The contribution of this chapter is twofold. First, we provide two studies
that explore the role of human tutors in serious games. Second, based on the
Adaptive Serious Games ◾ 135
6.2 BACKGROUND
Learning theories attempt to explain how learners learn. Although behav-
iorism focuses on input and output of the learner [10,11], constructivism
considers the role of human tutors more intricately. This is why we will
focus on constructivistic research throughout this chapter. In construc-
tivistic theories, learners are believed to learn by constructing knowledge
and by interacting with other humans. Learning is seen as an active and
constructive process. Learners actively construct or create their own repre-
sentations of reality. When new information is linked to prior knowledge,
subjective mental representations are created. “Constructivist stance main-
tains that learning is a process of constructing meaning; it is how people
make sense of their experience” [12, p. 261].
Constructivism suggests that learning is not a passive, but an active and
social process [13]. The only way knowledge can be gained is through con-
struction by the learner. Each individual representation of knowledge is
subjective and is based on knowledge schemata where learning is a social,
cultural, and linguistic process. Therefore, teaching should be based on
experiences.
One of the most important and influential theories of the social aspects
of learning is provided by Vygotsky [2]. Vygotsky defines the maximum
level for the challenge of one specific content or topic for each individual as
the upper limit of the zone of proximal development (ZPD) [14]. The lower
limit of the ZPD is the minimum level that can be learned by each indi-
vidual without help. “ZPD is the distance between the actual developmental
level as determined by independent problem solving and the level of poten-
tial development as determined through problem solving under adult guid-
ance, or in collaboration with more capable peers” [2, p. 131] (Figure 6.1).
In this theory, the more knowledged other (MKO) is someone or some-
thing that has a better understanding of a specific topic (task, process, or
concept) than the learner and that has a social interaction with the learner.
The MKO can be a teacher, a coach, an older adult, a peer, or even a com-
puter or a serious game.
Building on these theories the knowledge space theory (KST) has been
developed. Although originally intended for the assessment of knowl-
edge, it was later adapted to support adaptivity in the ITS [15]. In KST,
136 ◾ Computer Games and Software Engineering
to
What I cannot do b le ce
ea n
b sta
w ill y a ssi
l
er nt ent ith
Level of challenge
I can do with help rn de
l ea pen opm ve w an
he e el ie c ly
t t ind dev ach rner ent
What I ha eve l
a a n a nd
W hi im r c he le epe
already can do ac rox rne t
t ind
o f p lea ha eve
e W hi
ne th
Zo hat ac
W
ZPD Level of competence
(a) (b)
FIGURE 6.1 (See color insert.) (a,b) Zone of proximal development can be
expanded and changes over time.
knowledge over a specific topic is not given by a single score, but instead
it also provides information about the specific strengths and weaknesses
of a student within the field. This is done by splitting the content into
several smaller learning goals. The connection between those different
goals is then given in the form of prerequisite relationships. For example,
looking at learning how to divide numbers, the division by a digit, can
be seen as a prerequisite for learning about division by numbers bigger
than 10. This knowledge allows the ITS to select lessons based on the
learners’ skills.
(a)
(b)
FIGURE 6.2 (a) Writing numbers with the guidance of a flashlight. (b) Practice
counting quickly to safe bugs. (Continued)
(c)
(d)
FIGURE 6.2 (Continued) (c) Central screen for “Emil and Pauline in the cave,” where
the kids can track their progress and select which game they want to play. (d) Practice
geometry and generalization. All shapes that fullfil a specific criterion follow the finger
of the kid. The task of the kid is to figure out the commonality (e.g., shape, color, size).
Generate a prototype
Improve the
[improvement ideas exist] game concept of the
serious game
[experts suggest the game is finished]
6.4.2 Results
Interviews with experts during the development process helped us to
identify the game elements and learning content that are related to adap-
tivity as presented in Table 6.1. When we conducted the study, we assumed
Adaptive Serious Games ◾ 141
TABLE 6.1 Game Elements and Learning Content Identified in the Study
Serious games SG1 SG2 SG3 SG4
Learning goals C, W, R C, R A, S A
Game elements 3 7 9 4
Skills for learning content 3 2 4 4
Skills for nonlearning content 1 2 1 1
A, addition; C, count; R, recognize numbers; S, subtraction; W, write numbers.
that the tutor characterizes the learner by recognizing his or her skills.
Therefore, we let the experts identify all skills necessary for the content
of each serious game. As a result of the research question “what can be
observed?” we identified different game elements, learning goals, and
skills in the game as presented in Table 6.1.
According to the social development theory, a tutor makes decisions by
observing skills and relations between different skills. The answer to the ques-
tion “How can this information be used to characterize the skills of the indi-
vidual learner?” is based on the KST in this work [16]. KST is a mathematical
model for the description of learning content and thus provides a mathemati-
cal model for characterizing learners based on their skills [17]. In comparison
with other assessment methods, it provides not only a single value that is sup-
posed to represent the skills of the learner but also provides a more detailed
analysis of the learner regarding different elements of a skill. Furthermore,
it also already provides a representation of the dependencies between differ-
ent elements, thus providing a great basis for adaptivity. Therefore, we use
the concept of KST as described in reference [18] to design the model for the
content of adaptive serious games as presented in Figure 6.4.
Using this model, we can define skills and relations between skills. In
attempting to answer the question of “How do tutors characterize the
learner in these games?” we found the following results: First, a peda-
gogue and different psychologists argued that they need to recognize an
assessment situation, where they need to see if the learner is able to solve
Skill
1
Clause ClauseSet -name
1..*
-description
1..*
contains
FIGURE 6.4 Model for content in adaptive serious games. Content can be pre-
sented as a set of clauses, which in turn consist of skills.
142 ◾ Computer Games and Software Engineering
a specific task. Therefore, the tutor needs to know the possible tasks and
to be able to solve them. Additionally, the tasks need to be associated with
skills that would group the tasks in specific sets. After several iterations,
we found different reasonable task sets groupings as shown in Table 6.2.
This grouping needs to reflect the skills identified in Table 6.1. The differ-
ence in the amount of skills and task sets SG3 is based on the grouping of
the tasks related to addition and subtraction.
To answer the research question, we first rephrase it as follows: “How
can a tutor use the observed information to recognize and rate a skill of
a learner?”
Based on the given observations and data in Tables 6.1 and 6.2, we
found that a tutor would observe the correct and incorrect solutions of the
tasks. Based on the amount of correct and incorrect solutions, the tutor is
able to rate a skill related to the given task set. Additionally, we found that
the correct and incorrect execution of the tasks is not always a binary deci-
sion. In some of the games, the incorrect execution of the task was related
to the difficulty of the game elements. Therefore, the tutors were observing
the intention of the learner while trying to solve the task.
We observed a situation where the learner is trying to throw a stone in
the game to the left side, and the correct solution was also on the left side.
When a learner was not able to throw the stone fast enough to reach the
goal, the tutor would recognize the right intention and count this as cor-
rect, even if the execution was unsuccessful.
We can conclude that the assessment situation produces a result that
can be correct but unsuccessful. However, an incorrect result can be suc-
cessful by coincidence. Figure 6.5 shows the resulting model for the assess-
ment situations.
Adaptive Serious Games ◾ 143
FIGURE 6.5 Assessment situations can produce results. While sometimes the
answer given by the child might be correct, it does not necessarily mean it actually
knows the correct answer.
6.4.3 Conclusion
We found that when observing the players, the human tutor observes the
correct and incorrect execution of the tasks in the game as well as the
motorical execution. We additionally found that tutors rate the skills of
learners in a fuzzy way as illustrated in Figure 6.5.
Based on this study, we conclude that for games that require knowl-
edge as well as hand–eye coordination and timing, there exists a strong
link between the player’s motorical skills and the skills related to learning
content determined by tutors.
Additionally, we observed that changes in game elements are well suited
to change the difficulty of the game. A change of learning content is not
necessary in all cases. This is especially true for skills, where quick retrieval
is crucial. Therefore, changing the difficulty and topic of the learning con-
tent to early even could hinder effective learning in the long term.
Our assumption was that the changes in the game would include both
adaptivity of the game environment and adaptivity of learning content.
6.5.2 Results
In the first interviews, we discussed the four serious games with experts.
As we wanted to find out whether the experts would distinguish between
game elements and content when they wanted to provide help, we
explicitly asked abstract questions where we did not make the distinction.
Adaptive Serious Games ◾ 145
6.5.3 Conclusion
After we agreed with experts on different levels of difficulty for each game,
we found game elements that can be adapted (called adaptable elements)
in order to change the difficulty for the learner. We found a link between
adaptable properties and skills necessary for learning content.
Some of the adaptable properties (such as the speed of a game element)
directly affected some skills necessary for math (such as counting).
We can conclude that the connection between adaptable properties
and learning content makes the development of the game more difficult
because the changes take place on the side of the game elements.
146 ◾ Computer Games and Software Engineering
Each time something needs to be changed, and new game elements are
developed; they need to implement interfaces and apply design principles
required in order to make them adaptable.
(A2) interpreting learner’s actions in the game’s world and (B) to intervene
in the game by (B1) automatically adjusting the learning content and (B2)
the game elements according to (C) the student’s individual ZPD as neces-
sary and using the principles of (D) MKO, where adaptivity is an MKO for
the learner according to the social development theory.
According to this definition, the adaptivity process in a serious game
consists of four stages: monitoring players (A1), learner characterization
(A2), assessment generation (B1), and adaptive intervention (B2). We note
here that adaptivity describes in this definition the following four factors:
A, B, C, and D.
Factor (A): The adaptive serious game monitors the learner using pos-
sible sensors and the state-of-the-art technology. All observations are used
for collecting user data and characterizing the user (e.g., rating his or her
mathematical skills).
Factor (B): The adaptive serious game adapts both game elements and
learning content. There are game elements that affect the ability to solve
the tasks related to learning content (e.g., the speed of a car that moves
fast over the screen, where something is written on the car, and where the
goal of the learner is to interpret the content). Those adaptable properties
can provide powerful tools to adapt to a specific learner more fluently,
although changes in learning content very often lead to discreet big jumps
in the level of difficulty.
Factor (C): The adaptive serious game always individually challenges
each learner.
Factor (D): The adaptive serious game takes the role of the MKO in
the social development theory, where the following statement can be
applied: Every function in the child’s cultural development appears
twice—first, on the social level, and second, on the individual level. The
social level can be an interaction with the serious game or with peers in
the serious game.
An adaptive serious game is a serious game that implements the adaptiv-
ity approach.
We can then map adaptation approaches as used in e-learning and ITS
[20,21] to the definition of adaptivity in serious games:
6.8 OUTLOOK
Adaptivity provides a great potential for the future of serious games.
Even with the simple adjustments to the learners in our games, we
already could observe some great results. However, during the two
studies described here, we merely focus on skill-and-action games. We
already identified huge differences between adaptivity for ITS and our
serious games. More complex serious games, which include story line,
strategy, or sandbox elements, probably require an evergrowing set of
strategies for adaptivity.
In reference [17], we already started to explore some aspects of adap-
tivity in connection with a story line, which is intertwined with learning
contents. However, we feel that more interesting types of serious games
could be achieved by researching different types of adaptivity.
REFERENCES
1. Damir Ismailović, Dennis Pagano, and Bernd Brügge. weMakeWords—An
adaptive and collaborative serious game for literacy acquisition. In IADIS
International Conference—Game and Entertainment, Rome, Italy, 2011.
2. Lev Semenovich Vygotsky. Mind in Society: The Development of Higher
Psychological Processes. Harvard University Press, Cambridge, 1978.
3. Jean Piaget. The Essential Piaget, vol. 18. Jason Aronson, New York, 1977.
4. Rolf Eduard Helmut Muuss (Ed.) Erik Eriksons’s theory of identity develop-
ment. In Theories of Adolescence, pp. 42–57, 1994.
5. Kurt VanLehn, Collin Lynch, Kay Schulze, Joel A. Shapiro, Linwood Taylor,
and Don Treacy. The Andes physics tutoring system: Five years of evalua-
tions. In Gord McCalla and Chee-Kit Looi (Eds.), Artificial Intelligence in
Education. IOS Press, Amsterdam, the Netherlands. 2005.
6. Richard Niemiec and Herbert J. Walberg. Comparative effects of computer-
assisted instruction: A synthesis of reviews. Journal of Educational Computing
Research, 3, 19–37. 1987.
7. Benjamin S. Bloom. The 2 sigma problem: The search for methods of group
instruction as effective as one-to-one tutoring. Educational Researcher, 13(6),
4–16. 1984.
8. John A. Anderson, Albert T. Corbett, Kenneth R. Koedinger, and Ray
Pelletier. Cognitive tutors: Lessons learned. Journal of the Learning Sciences,
4(2), 167–207. 1995.
9. Damir Ismailović, Barbara Köhler, Juan Haladjian, Dennis Pagano, and Bernd
Brügge. Towards a conceptual model for adaptivity in serious games. In IADIS
International Conference—Game and Entertainment, Lisbon, Portugal, 2012.
10. Burrhus Frederic Skinner. Science and Human Behavior. Free Press, New York,
1953.
11. Burrhus Frederic Skinner. Contingencies of Reinforcement: A Theoretical
Analysis. Appleton-Century-Crofts, New York, 1969.
150 ◾ Computer Games and Software Engineering
151
Chapter 7
RESTful Client–Server
Architecture
A Scalable Architecture
for Massively Multiuser
Online Environments
CONTENTS
7.1 Introduction 154
7.2 Overview of Techniques for Scaling Up Multiuser Games 156
7.2.1 Space Partitioning 157
7.2.2 Other Game-Specific Techniques 158
7.2.3 Data Management 159
7.2.4 Network and System Approaches 160
7.3 Restful Client–Server Architecture 161
7.3.1 Representational State Transfer 162
7.3.2 RCAT Architecture 164
7.4 RCAT Reference Implementation 166
7.4.1 WebSockets 168
7.5 RCAT Reference Application: Jigsaw Puzzle 168
7.6 Experiments and Results 170
7.6.1 Experiment 1: Proxy and Database Bottlenecks 170
7.6.2 Experiment 2: Scaling Up the Number of Players 172
7.6.2.1 Experimental Setup 172
7.6.2.2 Results 173
153
154 ◾ Computer Games and Software Engineering
7.1 INTRODUCTION
Massively multiuser online games (MMOs) such as World of Warcraft,
EVE Online, and Second Life are virtual 3D environments in which play-
ers interact in real time with each other inside a virtual world. However,
interactions in current MMOs are not truly massive: designers craft the
games so that users can only interact with at most around a hundred other
users at the same time. When more than the expected number of players
gather together, the game usually crashes.*
The demand for high user concurrency is now going well beyond
games. Applications such as Facebook and Twitter distribute massive
numbers of events among massive numbers of users. Although these
applications are not exactly real time, the updates are relatively fast
paced, and therefore present similar challenges to those seen in online
games. As web technologies become more capable of supporting rich 2D
and 3D media, the line between online games and (serious) web applica-
tions will become fuzzier. The goal of our work is to be able to support
the next generation of cloud-based massively multiuser online environ-
ments, such as massive online open courses [1], and social environments
for medical applications [2].
Looking at how MMOs have approached scalability can provide
insights to scale other types of multiuser applications. MMO players are
generally seen as event producers and consumers: each player generates
a stream of events that other players are interested in. For example, if a
player orders his or her character to move forward, other players should be
notified or the character’s movement, update their local state of the world,
and render the updated state. If all the players subscribe to all the other
players, the number of event messages to deliver increases quadratically
with the number of players [3]. Quickly, the system is overwhelmed by the
number of events, and the latency (i.e., the time taken to forward an event)
increases. The game becomes much less responsive. Thus, there is a trade-
off between scalability and responsiveness. That is, as the number of users
increases, so does the latency.
To give the illusion that players can interact with thousands of other
players, MMOs use interest management techniques [4]. They assume that
players are only interested in events happening near them in the virtual
world. The world is therefore partitioned in self-contained regions (e.g., a
city or a forest), and each region is handled by a different process. Systems
implementing space partitioning assume that players are interested in
events generated in their current region, and maybe also in the adjacent
regions, but never in the entire world. Using this partitioning strategy,
MMOs have been able to support hundreds of users while keeping the
latency relatively low.
Space partitioning works well until too many players decide to meet in
the same region. For example, the maximum number of directly interact-
ing users ever achieved in a commercial MMO is around 3000 in the game
EVE Online.* This record was achieved thanks to very expensive hardware
infrastructure, a tiered software architecture, and a game design solu-
tion called time dilation. Time dilation compensates for the server load by
slowing down the region’s time. Regions may support more players, but
some have found time dilation “absolutely unplayable.”† MMOs that can-
not afford this kind of infrastructure, architecture, or game design tricks
have much lower player limits: World of Warcraft supports around 120
users per region‡ and Second Life up to 100.§
Research has tried to dynamically adapt the shape and size of regions
to the distribution of players. However, solutions such as dynamic binary
space partitioning suffer from a high overhead due to synchronization
and data handover between regions [5]. In fact, the CAP theorem (for
Consistency, Availability, and Partitioning) states that a partitioned sys-
tem cannot be both highly available (i.e., responsive) and strongly consis-
tent [6,7]. Because a scalable MMO system involves multiple partitioned
processes, the MMO developer inherently has to trade some consistency
to stay responsive.
In the past two decades, the number of MMO players has tremendously
increased, but so as the number of web users. To scale, web applications
follow a very constrained architectural style called representational state
transfer (REST) [8]. One of the pillars supporting REST is the stateless-
ness of the Hypertext Transfer Protocol (HTTP) protocol: web servers do
* See http://themittani.com/news/asakai-aftermath-all-over-cobalt-moon.
† See https://forums.eveonline.com/default.aspx?g = posts&t = 108331.
‡ See http://www.wowwiki.com/Wintergrasp#Queuing.
§ See http://wiki.secondlife.com/wiki/Limits#Land.
156 ◾ Computer Games and Software Engineering
not remember any client data between two requests. This way, it is easy to
scale a web application by adding more machines running the exact same
application code.
In this work, we explore how REST could be applied to scale MMOs.
Even though some game developers doubt that REST can be applied to
MMOs [9], the suitability of REST for MMOs remains an open question.
Moreover, recent web technologies such as HTML5 WebSockets or WebGL
show serious opportunities for browser-based MMOs.
Although scalability is our main concern, we keep in mind the trade-
off with consistency and responsiveness. Other requirements such as fault
tolerance (if a machine falls, it is at minimal cost for the system) or resil-
ience (recovering quickly from peaks or crashes) are desirable, but they are
not the main focus of this chapter.
The contributions of this work are as follows:
In the rest of this chapter, we first cover the current techniques used to scale
MMOs to large numbers of users. Then we introduce RCAT, our own archi-
tecture designed to scale to large number of users without being bound to a
particular type of application. We then detail the reference implementation
and an application based on this architecture. Finally, we report our labo-
ratory experiments, discuss the implications, and conclude the chapter.
Probably the most popular current technique for scaling MMOs is space
partitioning. We detail space partitioning in the next subsection. We also
describe other game-specific techniques that help scaling while maintaining
consistency and responsiveness. Then we look at scaling techniques appli-
cable to MMOs from the database community and finish with approaches
from the network and systems communities.
severely reduces the responsiveness of the game. EVE Online and Second
Life are two MMOs using time dilation.*
Finally, some online games such as first-person shooters place a strong
emphasis on latency. For these games, it is better to be wrong but on time,
than right but late [29]. Commercially, the Source Engine from Valve fol-
lows an optimistic client–server architecture†: If player A hits player B, A
actually only predicts that B is hit. Client A sends the hit message to the
server. If the server determines that player B was indeed hit when A fired,
that is, several frames ago, it forwards the hit to B. However, B could have
reacted faster than the latency between A and the server. In that case, A’s
view would be slightly inconsistent with B’s and the server’s. Thus, the server
would determine that A actually missed his or her shot. The server noti-
fies A of the missed shot, and A rollbacks its state. This rollback results in
local inconsistencies [30]. In academic research, Gupta et al. [31] suggest that
each client should run the game logic, and the server should only act as a
message forwarder and be in charge of persistence. Clients apply their own
actions to an optimistic model, and actions are received from the server to a
stable model. If applying the same action to the optimistic and stable mod-
els results in two different models, the system needs to roll back. The client
asks the server to broadcast a fix it proposes; all other clients execute the
fix and, if they conflict, send their own fix to the fix. This can result in long
chains consuming a lot of bandwidth and CPU. Thus, the server rejects fixes
past a certain chain length. Both academic and commercial approaches are
examples of the consistency–responsiveness trade-off mentioned earlier.
persist their state in the database tier. Proxies are useful to externalize the
load due to client handling on the server (e.g., socket management and
data prioritization) [38]. Even though the average MMO packet size is less
than 30 bytes [39], the number of messages to send is between linear and
quadratic with the number of players. Tiered architectures were already
mentioned in research in the early 2000s [40,41] and have been used in
Intel’s Distributed Scene Graph (DSG) [42] and many commercial MMOs
[25,43,44].
Intel’s DSG does more than just a tiered architecture. It aims at breaking
down the monolithic simulator-centric architecture and offloading services to
external processes [42]. Although external services provide a nice separation
of concerns, they add extra latency due to the extra hop in forwarding tasks to
services. Once again, we see the responsiveness–scalability trade-off. Carlini
et al. mixed peer-to-peer and cloud networks by using virtual nodes as an
abstraction layer for the physical node location. Virtual nodes allow for trans-
parent node relocation, are cheaper than a pure client–server solution, and are
more reliable than a pure peer-to-peer solution [45]. S-VON is a peer-to-peer
Voronoi-based overlay network with super peers. Although a pure peer-to-peer
Voronoi-based overlay network only accounts for in-game proximity, the super
peers also take into account the network proximity to reduce the latency [11].
Another system approach consists of using lockless tasks to avoid dead-
locks between cores. This has been tried academically in Reference [46] and
commercially in the MMO called The Exiled Realm of Arborea (TERA) [47].
Compared to offloading services to other machines, lockless game servers
do not suffer from additional latency due to the extra hop. However, lock-
less game servers can only scale up to the number of cores in one machine.
We see once again the trade-off between scalability and responsiveness.
• It can scale horizontally, that is, the demand for larger number of
interacting users can be met simply by adding more servers doing
the same functions.
1. Client–server: The state of the system is stored on the server side, not on
the client side. Client–server architectures are commonplace in MMOs.
2. Tiers: Hardware proxies, load balancers, and software-level interme-
diaries are recommended to decouple clients from servers. Tiered
architectures are not a new topic in the MMO architecture [51].
RESTful Client–Server Architecture ◾ 163
Clients Clients
Application/ Application/
service service
Database
server), or per-client/“sticky” (all the messages from a given client are sent
to the same server). Besides message forwarding, proxies can prioritize,
bucket, piggyback, or filter messages based on certain network heuristics
(e.g., upload rate or Transmission Control Protocol [TCP] window size).
However, they do not have any knowledge whatsoever about the game
(e.g., areas of interest or friend lists). Proxies can also help mitigating
denial of service attacks against game servers.
Game servers receive and process client requests according to the
game logic. When a server receives a request from a client (through a
proxy), it computes which clients have to be notified and broadcasts to
all the proxies the response to forward as well as the concerned clients.
Servers can perform any game logic treatment, from low-latency state
updates (e.g., avatar movement) to more reliable bulk transfer content
delivery (e.g., textures or streaming the world state when a client first
logs in). Servers can be added on the fly to the server tier at no synchro-
nization cost. They only have to notify the proxies when they join in, and
retrieve data from their cache.
Caches live on the same machines as the game servers so as to provide
for the game servers a quick access to the data and to alleviate the load on
the database. Determining which object lives in which cache, so as to opti-
mize data accesses, is the concern of the developer. For example, in space
partitioning, two objects that are close to each other in the game world
would live in the same cache. Other types of partitioning include by users,
as is currently done by Zynga [53], or by data types.
Caches are only a temporary storage to improve performance; it is up to
the developer to specify which objects can be cached, the delay for cached
objects to become stale, and whether replicas should be instantiated on
other machines for faster reads. Basically, the cache tier is the place where
the developer specifies the degrees of latency and consistency he or she
needs for which objects.
Finally, the bottom tier is the database. It ensures persistence and may
still be directly accessed by the game server for transactional operations
that must be atomic, consistent, isolated, and durable. When a cached
object expires, the cache may retrieve the object’s state from the data-
base. If an object living in the cache must be strongly consistent, all the
writes performed on the object should also be forwarded to the database.
However, if latency is important, the object’s state can be flushed to the
database only periodically.
166 ◾ Computer Games and Software Engineering
Client handler
Game handler
Proxy connector
Game logic
Mapper
API API
Persistence Object
manager API manager
FIGURE 7.2 The RCAT components. The Game logic and Mapper components
are game specific and implemented by the game developer.
RESTful Client–Server Architecture ◾ 167
* Tornado has been used extensively in real-time web applications such as FriendFeed and
Facebook’s timeline. See http://www.tornadoweb.org.
† See http://www.sqlalchemy.org/.
168 ◾ Computer Games and Software Engineering
7.4.1 WebSockets
The RCAT reference implementation uses WebSockets in order for the cli-
ents to receive messages from the servers. Here, we give a brief description
of WebSockets.
A WebSocket is a standard TCP connection initiated over HTTP and
growing in popularity for real-time web applications. The use of TCP
in MMOs is a controversial debate in both research and industry. Some
game developers would even rather implement a reliable protocol on top
of the User Datagram Protocol (UDP) rather than using TCP.* We opt for
TCP for three reasons:
• Players may scroll from one end of the board to another instantly.
• Players may grab any piece at any time.
* See http://gafferongames.com/networking-for-game-programmers/udp-vs-tcp/.
RESTful Client–Server Architecture ◾ 169
FIGURE 7.3 (See color insert.) Multiplayer jigsaw puzzle with 25 pieces.
• Players must know immediately the pieces that are grabbed, moved,
and dropped by other players.
• Players may zoom in or out to see the overall picture, or to check for
small details.
A screenshot of the HTML5 client is shown in Figure 7.3. Clearly, space par-
titioning will not be as effective for a multiplayer jigsaw puzzle as for MMOs
with clearly defined regions such as World of Warcraft. However, interactions
between players are minimal, and players may be likely to pick the same piece
again. Thus, we configure the proxy to “stick” each client to a server: all the
messages sent by that client are forwarded to the same server. Clients are
stuck to game servers in a round-robin fashion. We also configure the mapper
to partition by players. When a game server receives a message concerning
a particular piece from a particular player, it checks if the piece is cached in
another server. If it is, the server retrieves the remote piece and places it in the
local cache. If the piece is not cached anywhere, the server retrieves it from
170 ◾ Computer Games and Software Engineering
the database and places it in the local cache. In short, w henever the server
needs a piece, it will relocate that piece to the local cache.
* See http://alchemyWebSockets.net/.
RESTful Client–Server Architecture ◾ 171
4000
P to all C
All C to P
Bandwidth (kbps) 3000
2000
1000
0
5 10 15 20 25 30 35 40 45 50
Number of clients
FIGURE 7.4 Bandwidth between all clients (all C) and proxy (P).
the avatar’s new position, and (2) the list of clients to send the message
to (i.e., everyone currently connected). To estimate the magnitude of the
database bottleneck, we compare a scenario where the game server has to
retrieve the list of all connected users for every client message and another
scenario where the game server caches the list of users and does not have
to ask the database every time.
As shown in Figure 7.5, the bandwidth from the server to the database
increases linearly with the number of users and decreases slightly when
1400
DB to S (no cache)
S to DB (no cache)
S to DB (cache)
1000
DB to S (cache)
Bandwidth (kbps)
600
200
0
5 10 15 20 25 30 35 40 45 50
Number of clients
FIGURE 7.5 Bandwidth between database (DB) and server (S) with or without cache.
172 ◾ Computer Games and Software Engineering
the list of current clients is cached (compare the two S to DB curves). More
strikingly, the bandwidth from the database to the server increases qua-
dratically with the number of clients. By caching the list of users, we have
reduced a quadratic increase into a linear increase (compare the two DB
to S curves). This proves that the database can be a central bottleneck and
that caching can be an effective strategy.
* See http://lwn.net/Articles/502585/.
RESTful Client–Server Architecture ◾ 173
7.6.2.2 Results
Figure 7.6 shows that the maximum capacity is reached at 229 clients for
the scenario 4 + 4/4 + 4/2.5. In this scenario, the proxy is the bottleneck,
and the server reaches slightly past half of its total CPU capacity (400%
out of 800% available). On the one hand, the total CPU consumed by the
game servers increases linearly with the number of clients. On the other
hand, the CPU consumed by the proxies increases quadratically at first,
then flattens around 100 clients, and finally seems to increase linearly.
We remark this behavior in most of the scenarios where the proxy is a
bottleneck.
Figure 7.7 shows that the number of voluntary context switches also
reaches a plateau around 100 clients. Voluntary context switches occur
when Tornado polls the client sockets, whereas involuntary context
switches are triggered by the kernel scheduler.† Thus, there may be a
bottleneck on the proxy well before the maximum capacity is reached.
On the plus side, this bottleneck does not seem to impact the latency
observed on the client side. It is possible that the TCP congestion control
* See http://linux.die.net/man/2/getrusage.
† See http://www.lindevdoc.org/wiki/Involuntary_context_switch.
174 ◾ Computer Games and Software Engineering
800
Proxy CPU
700
Game server CPU
CPU (%) and RTT (ms)
600
Average latency
500
99% latency
400
300
200
100
0
0 100 200 300
Number of clients
FIGURE 7.6 Evolution of the proxies’ central processing unit (CPU), game s ervers’
CPU, average latency, and 99th percentile of the latency with the number of clients
when using 4 + 4 proxies and 4 + 4 game servers. The last 99th p ercentile of the
latency to be below 100 ms is the maximum capacity: 229 clients.
Proxy CPU
CPU (%) and context switches (second−1)
1600
Voluntary context
switches
800
400
0
0 100 200 300
Number of clients
FIGURE 7.7 Evolution of the proxies’ CPU and context switches with the number
of clients when using 4 + 4 proxies and 4 + 4 game servers.
mechanisms (e.g., piggybacks and ACK delays) buffer the extra delay
taken by the proxy.
However, these mechanisms are not enough to prevent the number
of voluntary context switches to fall and the latency to spike around
200 clients. Context switches remain the principal reason: because each
RESTful Client–Server Architecture ◾ 175
core ticks 250 times per second,* the maximum number of context switches,
voluntary or not, for a system with eight proxies is 8 × 250 = 2000 per
second. This is the cap reached around 190 clients. The proxies’ cores are
overwhelmed.
Interestingly, the proxies are only using half of their CPU capacity
when this happens. Clearly, the proxies’ CPU capacity is not a sufficient
metric by itself to assess the quality of experience of the players, or even
the load on the system.
Figure 7.8 plots the maximum capacities for various scenarios. Simply
put, to be able to handle twice more players, the system needs 4 times more
cores. And this is independent of the message frequency. It is not because
a game is slower paced that it scales more linearly. Yet slower paced games
can handle more players per core.
Finally, Figure 7.9 illustrates that message frequencies can result in
different bottlenecks. We take the scenario with eight proxies and eight
game servers as an example. At 2.5 messages per second, the maximum
capacity (229 clients) is reached, whereas the game servers only consume
around 250% CPU. Meanwhile, the proxies consume twice as much CPU.
By contrast, when clients send 10 messages per second, the game servers
consume more CPU than the proxies when reaching the overall system’s
maximum capacity (125 clients). In this scenario, it is difficult to know
250
Maximum capacity (number of clients)
2.5 msg/s
200
5 msg/s
10 msg/s
150
100
50
0
1/1 2/2 4/4 4 + 4/4 + 4
Scenarios
FIGURE 7.8 Scaling the number of clients with the number of cores and
machines, when bots send 2.5, 5, and 10 messages per second (msg/s).
700
Proxy
Game server
600
400
300
200
100
0
2.5 msg/s 5 msg/s 10 msg/s
which of the proxies or the game servers is the bottleneck. Yet it seems,
surprisingly, that handling many slow-paced connections is more costly
than handling few active connections.
Thus, for slow message rates, the proxy is the bottleneck. However, for
fast message rates, the game server may be limiting. In fact, the game logic
of our jigsaw puzzle is very simple (e.g., no collision detection). Therefore,
the server CPU may actually increase faster with the message frequency
than shown in Figure 7.9. Provisioning how many proxies and game serv-
ers are needed for a given game is not trivial: 1-to-1 ratios may rarely be
optimal.
7.7 DISCUSSION
Research has paid much attention to MMOs that are easy to partition spa-
tially. We showed one example of MMO where space partitioning does not
apply: a multiplayer jigsaw puzzle. We partitioned the data by user, but did
not try other partitioning schemes. Which type of partitioning is best for a
multiplayer jigsaw puzzle remains an open question. In fact, this question
is not specific to MMOs: developers of other multiuser online applications,
such as massive open online courses, are facing the same challenges. We
are actively looking for more examples of massively multiuser online appli-
cations, as they may highlight new scalability challenges and solutions.
However, space partitioning may still be appropriate for many MMOs.
In fact, picking the appropriate load partitioning algorithm is a problem
common to any massively multiuser application. In our jigsaw puzzle, we
RESTful Client–Server Architecture ◾ 177
7.8 CONCLUSION
In this chapter, we have presented RCAT, a scalable and adaptable three-
tiered architecture for MMOs. RCAT aims at delivering the flexibility
of choosing the individual trade-offs found in the extensive variety of
MMOs, while providing a solid infrastructural middleware that abstracts
the complexities of scaling through a distributed system. It also provides a
common platform for developers and researchers to develop applications
and compare results of different partitioning schemes.
We have demonstrated the potential of the architecture by presenting
a multiplayer jigsaw puzzle, featuring full broadcasting of events, data
locality, and massive number of users. Despite the unavoidable and essen-
tial quadratic event distribution, we can support 229 concurrent clients
sending 2.5 messages per second and 125 clients sending 10 messages per
second, using commodity servers with 16 cores total. Scaling to higher
numbers of clients is possible simply by deploying more proxies and game
servers such that a target of twice the number of users requires 4 times the
number of cores.
As the web becomes more supportive of rich interactive applications,
we believe that our work can be the foundation for a variety of massively
multiuser online applications.
REFERENCES
1. Pierre Baldi and Cristina Lopes. The universal campus: An open virtual 3-D
world infrastructure for research and education. eLearn, 2012(4), 2012.
2. Hossein Mousavi, Maryan Khademi, Lucy Dodakian, Steven C. Cramer, and
Cristian V. Lopes. A spatial augmented reality rehab system for post-stroke
hand rehabilitation. Studies in Health Technology and Informatics, 184:279,
2013.
3. Huaiyu Liu, Mic Bowman, Robert Adams, John Hurliman, and Dan Lake.
Scaling virtual worlds: Simulation requirements and challenges. In Winter
Simulation Conference, Baltimore, MD, December 2010.
4. Jean-Sébastien Boulanger, Jörg Kienzle, and Clark Verbrugge. Comparing
interest management algorithms for massively multiplayer games. In Proceedings
of the 5th ACM SIGCOMM Workshop on Network and System Support for
Games. ACM, New York, 2006.
RESTful Client–Server Architecture ◾ 179
5. Huaiyu Liu and Mic Bowman. Scale virtual worlds through dynamic
load balancing. Proceedings of the 14th International Symposium on
Distributed Simulation and Real Time Applications, pp. 43–52. Fairfax,
VA, October 2010.
6. Eric Brewer. Towards robust distributed systems, Principles of Distributed
Computing (PODC), Portland, OR, July 2000.
7. Eric Brewer. Cap twelve years later: How the “rules” have changed. Computer,
45(2):23–29, 2012.
8. Roy Thomas Fielding. Architectural styles and the design of network-based
software architectures. PhD thesis, University of California, Irvine, CA, 2000.
9. John Watte. REST and games don’t mix. http://engineering.imvu.com/
2010/12/18/rest-and-games-dont-mix/.
10. John L. Miller and Jon Crowcroft. The near-term feasibility of P2P MMOG’s.
In 2010 9th Annual Workshop on Network and Systems Support for Games,
Taipei, Taiwan, November 2010.
11. Shun-Yun Hu, Chuan Wu, Eliya Buyukkaya, Chien-Hao Chien, Tzu-Hao
Lin, Maha Abdallah, Jehn-Ruey Jiang, and Kuan-Ta Chen. A spatial pub-
lish subscribe overlay for massively multiuser virtual environments. In
International Conference on Electronics and Information Engineering, vol. 2,
pp. V2-314–V2-318. Kyoto, Japan, August 2010.
12. Christer Carlsson. DIVE—A multi-user virtual reality system. Proceedings of
Virtual Reality Annual International Symposium, pp. 394–400, 1993.
13. Takuji Iimura, Hiroaki Hazeyama, and Youki Kadobayashi. Zoned federa-
tion of game servers: A peer-to-peer approach to scalable multi-player online
games. In Proceedings of the 3rd ACM SIGCOMM Workshop on Network
and System Support for Games, Portland, OR, pp. 116–120. ACM, New York,
2004.
14. Shinya Yamamoto, Yoshihiro Murata, Keiichi Yasumoto, and Minoru Ito.
A distributed event delivery method with load balancing for mmorpg. In
Proceedings of the 4th ACM SIGCOMM Workshop on Network and System
Support for Games, Hawthorne, NY, pp. 1–8. ACM, New York, 2005.
15. Laura Itzel, Florian Heger, Gregor Schiele, and Christian Becker. The quest
for meaningful mobility in massively multi-user virtual environments. In
Proceedings of the 10th Annual Workshop on Network and Systems Support
for Games, pp. 1–2. Ottawa, Canada, October 2011.
16. Eliya Buyukkaya and Maha Abdallah. Data management in Voronoi-
based P2P gaming. In Proceedings of the 5th Consumer Communications
and Networking Conference, pp. 1050–1053. IEEE, Las Vegas, NV, January
2008.
17. David Almroth and Christian Lonnholm. PikkoTekk—Technical summary.
Technical report, MuchDifferent, Uppsala, Sweden, February 2011.
18. Bart De Vleeschauwer, Bruno Van Den Bossche, Tom Verdickt, Filip De
Turck, Bart Dhoedt, and Piet Demeester. Dynamic microcell assignment
for massively multiplayer online gaming. In Proceedings of the 4th ACM
SIGCOMM Workshop on Network and System Support for Games, Hawthorne,
NY, pp. 1–7. ACM, New York, 2005.
180 ◾ Computer Games and Software Engineering
19. Alexandre Denault, César Cañas, Jörg Kienzle, and Bettina Kemme. Triangle-
based obstacle-aware load balancing for massively multiplayer games. In
Proceedings of the 10th Annual Workshop on Network and Systems Support
for Games, Ottawa, Canada, pp. 4:1–4:6. IEEE Press, Piscataway, NJ, 2011.
20. Bruno Van Den Bossche, Bart De Vleeschauwer, Tom Verdickt, Filip De
Turck, Bart Dhoedt, and Piet Demeester. Autonomic microcell assignment
in massively distributed online virtual environments. Journal of Network and
Computer Applications, 32(6):1242–1256, 2009.
21. Kuan-Ta Chen and Chin-Laung Lei. Network game design: Hints and impli-
cations of player interaction. In Proceedings of the 5th ACM SIGCOMM
Workshop on Network and System Support for Games. ACM, New York, 2006.
22. Ashwin R. Bharambe, Sanjay Rao, and Srinivasan Seshan. Mercury: A scalable
publish-subscribe system for internet games. In Proceedings of the 1st Workshop
on Network and System Support for Games, pp. 3–9. ACM, New York, 2002.
23. Stefan Fiedler, Michael Wallner, and Michael Weber. A communication archi-
tecture for massive multiplayer games. In Proceedings of the 1st Workshop on
Network and System Support for Games, pp. 14–22. ACM, New York, 2002.
24. Mahdi Tayarani Najaran and Charles Krasic. Scaling online games with
adaptive interest management in the cloud. In Proceedings of the 9th Annual
Workshop on Network and Systems Support for Games, pp. 9:1–9:6. IEEE
Press, Piscataway, NJ, 2010.
25. David H. Brandt. Scaling EVE Online, under the hood of the network layer.
Technical report, CCP Games, Reykjavik, Iceland, 2005.
26. Daniel Horn, Ewen Cheslack-Postava, Tahir Azim, Michael J. Freedman, and
Philip Levis. Scaling virtual worlds with a physical metaphor. IEEE Pervasive
Computing, 8: 50–54, 2009.
27. Ashwin Bharambe, John R. Douceur, Jacob R. Lorch, Thomas Moscibroda,
Jeffrey Pang, Srinivasan Seshan, and Xinyu Zhuang. Donnybrook: Enabling
large-scale, high-speed, peer-to-peer games. In Proceedings of the ACM
SIGCOMM 2008 Conference on Data Communication, pp. 389–400. ACM,
New York, 2008.
28. Jeffrey Pang. Scaling peer-to-peer games in low-bandwidth environments.
In Proceedings of the 6th International Workshop on Peer-to-Peer Systems,
Bellevue, WA, February 2007.
29. Martin Mauve. How to keep a dead man from shooting. In Proceedings of the
7th International Workshop on Interactive Distributed Multimedia Systems
and Telecommunication Services, pp. 199–204. Enschede, the Netherlands,
October 2000.
30. Eric Cronin, Burton Filstrup, Anthony R. Kurc, and Sugih Jamin. An effi-
cient synchronization mechanism for mirrored game architectures. In
Proceedings of the 1st Workshop on Network and System Support for Games,
Braunschweig, Germany, pp. 67–73. ACM, New York, 2002.
31. Nitin Gupta, Alan Demers, Johannes Gehrke, Philipp Unterbrunner, and
Walker White. Scalability for virtual worlds. In Proceedings of the 2009
IEEE International Conference on Data Engineering, pp. 1311–1314. IEEE
Computer Society, Washington, DC, 2009.
RESTful Client–Server Architecture ◾ 181
32. Mike Lewis. Managing the masses. In Game Developers Conference, San
Francisco, CA, March 2012.
33. Walker White, Alan Demers, Christoph Koch, Johannes Gehrke, and
Rajmohan Rajagopalan. Scaling games to epic proportions. In Proceedings of
the 2007 ACM SIGMOD International Conference on Management of Data,
Beijing, People’s Republic of China, pp. 31–42. ACM, New York, 2007.
34. David Almroth and Christian Lonnholm. PikkoTekk—Horizontal scalability.
Technical report, MuchDifferent, Uppsala, Sweden, February 2011.
35. BigWorld. Server overview. Technical report, BigWorld, Sydney, Australia,
2009.
36. Matthias Rudy. Inside tibia—The technical infrastructure of an MMORPG.
In Game Developers Conference Europe, Cologne, Germany, August 2011.
37. Jim Waldo. Scaling in games and virtual worlds. Communications of ACM,
51:38–44, 2008.
38. Carsten Griwodz and Pål Halvorsen. The fun of using TCP for an MMORPG.
In Proceedings of the 2006 International Workshop on Network and Operating
Systems Support for Digital Audio and Video, pp. 1:1–1:7. ACM, New York,
2006.
39. Szabolcs Harcsik, Andreas Petlund, Carsten Griwodz, and Pål Halvorsen.
Latency evaluation of networking mechanisms for game traffic. In Proceedings
of the 6th ACM SIGCOMM Workshop on Network and System Support for
Games, pp. 129–134. ACM, New York, 2007.
40. Carsten Griwodz. State replication for multiplayer games. In Proceedings
of the 1st Workshop on Network and System Support for Games, pp. 29–35.
ACM, New York, 2002.
41. Martin Mauve, Stefan Fischer, and Jörg Widmer. A generic proxy system for
networked computer games. In Proceedings of the 1st Workshop on Network
and System Support for Games, pp. 25–28. ACM, New York, 2002.
42. Dan Lake, Mic Bowman, and Huaiyu Liu. Distributed scene graph to enable
thousands of interacting users in a virtual environment. In Proceedings of the
9th Annual Workshop on Network and Systems Support for Games, Taipei,
Taiwan, 2010.
43. David Almroth. Pikko server. In Erlang User Conference, Stockholm, Sweden,
2010.
44. Seungmo Koo. How to support an action-heavy MMORPG from the angle
of server architecture. In Chinese Game Developers Conference, Shanghai,
People’s Republic of China, 2010.
45. Emanuele Carlini, Massimo Coppola, and Laura Ricci. Integration of P2P and
clouds to support massively multiuser virtual environments. In Proceedings of
the 9th Annual Workshop on Network and Systems Support for Games, Taipei,
Taiwan, November 2010.
46. Kjetil Raaen, Håvard Espeland, Håkon Kvale Stensland, Andreas Petlund,
Pål Halvorsen, and Carsten Griwodz. A demonstration of a lockless, relaxed
atomicity state parallel game server (LEARS). In Proceedings of the 10th
Annual Workshop on Network and Systems Support for Games, Ottawa,
Canada, pp. 19:1–19:3. IEEE Press, Piscataway, NJ, 2011.
182 ◾ Computer Games and Software Engineering
Software Engineering
Challenges of
Multiplayer Outdoor
Smart Phone Games
Robert J. Hall
CONTENTS
8.1 Motivation 184
8.2 Three Geocast Games 184
8.2.1 iTron 185
8.2.2 iTESS 185
8.2.3 Butterflies 188
8.3 Engineering Challenges 190
8.3.1 Architecture 190
8.3.2 Design 191
8.3.3 Coding 193
8.3.4 Requirements 193
8.3.5 Validation 194
8.4 The GGA 194
8.4.1 Variants 195
8.5 Summary 196
References 196
183
184 ◾ Computer Games and Software Engineering
8.1 MOTIVATION
Video games are extremely popular in today’s world. People who spend
too much time with video games, however, are prone to many health
and cognitive risks, including obesity, poor socialization, and repetitive
stress injuries. Children are particularly sensitive to these problems and
developmental delays as well. To combat these problems, our goal in the
Geocast Games Project [1] is to build attractive games that inherently
incorporate vigorous physical activity outdoors and encourage multi-
player interactions.
In pursuance of this goal, if the games we build were to require addi-
tional equipment that must be bought and brought solely to support the
game experience, it could harm our ability to reach a broad segment of
the population. Moreover, we wish to allow as unrestricted an experience
outdoors as possible; having to leave one’s laptop, for example, unattended
in the dirt while running off into a public park, has obvious risks and
disincentives. Moreover, such supernumerary devices would need to be
powered and administered, further increasing the burden and reducing
the constituency for our games.
Instead, we wish to provide the games solely on equipment people are
likely to carry anyway for other purposes, namely smart phones, iPods, and
so on. In this way, people can play spontaneously whenever and wherever
a willing group is present. More specifically, we want devices that are loca-
tion aware and capable of 802.11 wireless communications (or other wireless
communications technologies as may become available). Richer experiences
are possible when devices have other features that are becoming prevalent
today, such as azimuth sensors, accelerometers, wide area wireless (e.g.,
4G [4th Generation], LTE [Long Term Evalution], GSM [Global System for
Mobility]), cameras, and rich audio capabilities. For this chapter, we will
term this class smart phones, even though not all of them necessarily have
telephone capability. The decision to restrict to smart phones has major con-
sequences for the architecture and software engineering of the games.
8.2.1 iTron
iTron [3] is a real-world “snake” game. Essentially, players must move
around in the real world; while doing so, they leave a trail of “walls” in the
virtual world (Figure 8.1). Players must avoid running into walls by moving
so that their represented position crosses a wall on the display. Figure 8.1
shows real-world and virtual-world views of a three-person iTron game in
progress. One player has crashed into the tail of another early on, whereas
one is in danger of hitting the area boundary. The object is to be the last
one remaining after all others have crashed. The game is both a strategy
game in which one tries to surround and cut off one’s opponents from ter-
ritory and an athletic game involving running fast enough and accurately
enough to carry out these strategies.
Note also the player using an inexpensive Kyle Wrist Mount to convert the
smart phone into a hands-free wearable, a key innovation that reduces risk
to the device and allows more freedom for the athletic activities of the game.
This game was played in a relatively small, clear area like a parking lot
or football field. iTron can also be played in larger areas having complex
terrain, such that climbing and terrain traversal become a significant part
of the planning and athleticism. This style of iTron game is termed iTron/
Parkour. The final state of such a game is shown in Figure 8.2.
8.2.2 iTESS
iTESS [4] is a hide-and-seek conflict game that provides virtual weaponry
and intelligence assets to players in the real world. The object of the game
186 ◾ Computer Games and Software Engineering
is for a player to last as long as possible without being hit by a weapon shot
(either artillery or shotgun weapon), with one’s score being the maximum
of such interval achieved during an extended game session. One searches
for one’s opponents either in the real world or by commanding a virtual
unmanned aerial vehicle (UAV) on the screen of the smart phone that “flies”
over the map and paints red dots if it spots opponents (see Figure 8.3). The
green-shaded (lightly shaded circle in lower right corner) circle is the UAV
lookdown region. The blue dot with compass arrow is the location of the
Outdoor Smart Phone Games ◾ 187
FIGURE 8.3 Screen capture from iTESS showing artillery shots. Upper right
numeric display shows top three scores in game at any time.
player of the device shown, and the red dot represents the enemy players
spotted by the UAV. The red-shaded circles are warnings for incoming artil-
lery rounds, whereas the blue circle is the effect area of one’s own round.
One targets artillery by moving a crosshair and then tapping the fire
button. By contrast, one targets the shotgun by physically pointing the
device and then doing a screen drag to pull the trigger (see Figure 8.4).
In either case, shotgun shot or artillery shot, opponents in the effect
area of the weapon are notified and shown the area they must escape in the
brief time before the round reaches them. iTESS is designed to have slow
weapon effects to encourage and allow rapid reactions and fast running to
save players (see Reference [4] for details).
188 ◾ Computer Games and Software Engineering
(a)
(b)
FIGURE 8.4 (See color insert.) (a) Point-and-shoot interface for the iTESS shot-
gun weapon and (b) screen display during a shotgun shot animation.
8.2.3 Butterflies
Butterflies provides virtual creatures interacting with human players in
the real world. Figure 8.5 shows a game situation, with blue dot (dark dot
with arrow through it) being one’s own position on the map, red dots being
other human players’ positions, and the other symbols representing but-
terflies and butterfly net acquisition areas. Essentially, the human’s goal is
to collect as many good butterflies as possible by running so as to move
onto their bodies while avoiding being touched by (running within) bad
butterflies. A butterfly net (if one has one available) can extend one’s reach
to capture hard to reach or fast butterflies, such as those that fly on top of
Outdoor Smart Phone Games ◾ 189
FIGURE 8.5 Screenshot of a Butterflies game. Blue (larger) butterflies are good,
red (smaller) ones are bad, blue dot is my position, and red dots are other play-
ers’ positions. Green lollipop symbols are positions at which a player can obtain
butterfly nets.
buildings. As game level increases, butterflies gain more and more com-
plex behaviors. At lowest levels, they move randomly in predetermined
pseudorandom patterns. At higher levels, they can run away from humans
or chase them, at varying speeds. Humans can find butterfly nets that help
catch or defend against them. This game therefore involves a lot of move-
ment, planning, and social interaction as, for example, some butterflies
are so fast and clever that often the only way to catch them is for humans
to coordinate their actions.
190 ◾ Computer Games and Software Engineering
8.3.1 Architecture
Outdoor play in natural environments such as parks, beaches, and remote
camps will often involve play without or weak network coverage, with no
WiFi hot spots or even 3G coverage available. The devices, however, are
capable of device-to-device ad hoc networking. This will generally mean
that communications between distant players will become disconnected
unpredictably and for extended periods. For example, two iTESS players
might run off into a valley while continuing to shoot at each other, yet still
be out of network contact with the other players due to terrain. Similarly,
subsets of iTron or Butterflies players can move apart, to opposite sides
of a building, for example. Because to be successful the game experience
must continue (to the extent physically possible) even when out of infra-
structure coverage areas and even when partitioned from distant players,
I term this first major problem in architecting an outdoor smart phone
game the communication problem.
Following from this first problem is the fact that any two devices can
become unpredictably partitioned from one another for extended periods.
This means that game experience must not require a central controller. That
is, for games intended for play in remote areas, not only can we not require a
console or Internet game server in the architecture of the game, but also we
cannot even designate one of the smart phones as the controller. If we did so,
any time devices become partitioned away from it, they lose game experi-
ence until contact is reestablished. I term this the full distribution problem.
Finally, another architecture issue, the long-range play problem con-
cerns games playable at long distances. It makes perfect sense for a group
in California to play iTESS against groups in New Jersey, the United
Kingdom, and Tokyo. Obviously, this requires Internet connectivity,
because device-to-device relaying is clearly inadequate. If we assume that
enough players have devices that are in coverage of an Internet access
point (e.g., receiving 3G/GSM coverage), we would like our game architec-
ture to support the communications necessary as seamlessly as possible.
My initial progress on attacking these problems is captured in the
Geocast Games Architecture (GGA) (see Section 8.4).
Outdoor Smart Phone Games ◾ 191
8.3.2 Design
When designing games involving virtual structures, objects, or creatures
that can have evolving states, there is a need for the game system to man-
age state evolution in a way that yields the desired game experience to
all players. As an example, consider virtual creature control. A butterfly
that reacts to human proximity by flying away changes state in response
to environment events. But how do players located away from this but-
terfly’s location, maybe even network partitioned from the area, gain a
coherent view of its state? The problem is compounded when events from
multiple different devices cause state changes, as we must be concerned
with how the different players view the creature, given that different sub-
sets of players will have been made aware of different subsets of the events.
Figure 8.6 shows screen captures from two Butterflies players at nearly
the same time; the two players have been out of network contact due to
being on opposite sides of a building. Consequently, their devices have
different views of what the butterflies have been doing. Positions of but-
terflies and even positions of other players are significantly different. This
FIGURE 8.6 (a,b) Two device screens at nearly the same time (13 seconds apart)
in a Butterflies game with radio obstacles.
192 ◾ Computer Games and Software Engineering
is because players have moved while out of radio contact due to the inter-
vening school building.
Now, we cannot hope to defeat the Physics of the situation; given the
presence of communications partitions due to terrain, there is no way to
keep all devices having identical states at all times. Fortunately, we do not
need this to provide playable and fun game experiences. Instead, we can
demand that once devices come back together (i.e., reestablish contact),
they come to agree as quickly as possible on a common coherent view of
the state. I term this property rapid recoherence (RRC). Figure 8.7 shows
the same Butterflies game as earlier, approximately 90 seconds later in
time, after the players have met up and the devices have undergone RRC.
The two displays differ only in that the dot representing one’s own position
is different for the two devices.
This issue goes beyond the question of rapidity into how to recohere in a
way that seems fair to players; for example, if one works hard to gain points,
can points be taken away just because someone far away did something in
the past of which one was unaware? Similarly, if the process of recoherence
involves retracting state changes, how far into alternate history extrapolation
FIGURE 8.7 (a,b) Two device screens after RRC in the same Butterflies game.
Outdoor Smart Phone Games ◾ 193
can or should a system delve to reconstruct what would have happened had
the newly discovered information been known earlier? In aggregate, I group
all these issues under the term the distributed joint state problem. Specifically,
can we come up with a design methodology that allows a coherent creature
behavior to be implemented on top of a fully distributed architecture subject
to sporadic communication? The Butterflies game is an initial experiment
in RRC and distributed joint state management, but there is still room for
future research in this area.
8.3.3 Coding
Pursuing our goal of appealing to (and thereby benefiting) as large a
cross section of the population as possible, we cannot provide our games
on merely one brand or model of smart phone. Therefore, we must seek
abstractions and tool support in cross-platform development that not only
helps with cross-compilation of source code, but can help the developer
compensate for differences in hardware performance, sensor capabilities,
communications systems differences, and operating system and language
differences.
Cross-platform code development frameworks such as Cocos2d-x [5]
for iOS, Android, Windows, and Blackberry smart phones are a promising
start in this area.
8.3.4 Requirements
It is clear that not every possible game semantics that is implementable in
a central server architecture is achievable in a fully distributed outdoor
gaming context. This is simply because of the sporadic communications
problem: if I capture a creature at time t, but there is no way for your
device to hear about this for a delay Δ > 0, from your viewpoint, the
creature is still available to be captured prior to t + Δ. If my game require-
ments included the notion that all players shall have a consistent descrip-
tion of which creatures are captured and which are not at every instant
of time, it would simply not be implementable in this architecture. I term
this the (outdoor games) requirements restriction problem. Specifically, we
need to develop a domain-specific set of meta-requirements applicable to
outdoor game design. Such meta-requirements would comprise guide-
lines and constraints on requirements models to help developers better
understand when they are posing impossible or impractical requirements
for new games. Prior work on tolerating inconsistency [6] would seem
relevant here.
194 ◾ Computer Games and Software Engineering
8.3.5 Validation
Testing and formal validation of distributed systems is well known to be
difficult; however, fully distributed smart phone games exacerbate this dif-
ficulty. The requirements one is validating are often relative to the distrib-
uted joint state of the system, so validating means to understand the relaxed
semantics of systems designed and specified to allow temporary network
partitions leading to inconsistent state views. For example, two devices dis-
agreeing on who captured a creature due to being out of network contact is
no longer indicative of a validation failure unless the condition remains well
after the devices have reestablished network contact. How can one express
such a notion of correctness and test for it, or formally validate compliance
with it? I term this the (outdoor games) semantic validation problem.
On a more pragmatic level, tests will often involve many to tens of
devices. Simply gathering, merging, synchronizing, and cleaning test data
in order to even start analyzing a run is now quite complex, because it
would seem to need a substantial tool infrastructure to gather and analyze
the data from the devices and the wireless medium. The Capture Calculus
Toolset (CCT) [7] is one such tool suite that can capture, transform, com-
bine, analyze, and animate real-world test data.
Scale and load testing requires even more devices, seemingly requiring
some sophisticated tool support or else an army of willing helpers. I term
this the (outdoor games) pragmatic testing problem. Just maintaining a lab
with tens of devices involves a lot of charging, app loading, configuring,
and tracking of devices. The CCT provides combinators for combining
and enlarging captured test run data with procedurally generated scenar-
ios to increase the scale of the data. This can then be animated, analyzed,
and simulated. However, one future work problem is a tool capable of tak-
ing such synthesized large-scale scenarios and actually executing them on
real devices automatically.
8.4.1 Variants
The above definition is a bit of an idealization in that there can be situa-
tions where one needs or desires to alter the GGA somewhat to accommo-
date restrictions or changed requirements. For example, one may wish to
incorporate devices that do not have a compatible 802.11 (WiFi) capabil-
ity; such could be incorporated as a separate, non-ad hoc tier within the
SGAF. Similarly, one may wish to interface to low-cost networked sensors
that do not have their own location sensing capabilities or may have low
memory or CPU resources. In such cases, we may compromise the ideal of
full distribution and allow some devices to offload computation, sensing,
and/or storage to other devices.
Extensive testing and trial experience (over 175 users have played at least one
of the three geocast games) show that the GGA-based games meet our goals
196 ◾ Computer Games and Software Engineering
for fun and athletic play outdoors. See References [3] (iTron) and [4] (iTESS)
for descriptions of the implementations of games according to GGA princi-
ples. However, the GGA is only a foundation. In particular, much future work
needs to be done to address the challenges discussed in Section 8.3.
8.5 SUMMARY
I have briefly overviewed the motivation for healthy outdoor multiplayer
smart phone games and the challenges they bring for software engineer-
ing. I have also provided overviews of three implemented games that have
allowed experimentation with the concepts and provided initial trials of
the GGA and RRC.
In scratching the surface of the many challenges brought by this game
domain, I have touched on five facets of software engineering:
In short, this is a rich and challenging area that is ripe for research that
can contribute toward worthwhile social goals.
REFERENCES
1. Scalable ad hoc wireless geocast project. www.research.att.com/projects/
Geocast/.
2. R. J. Hall. Cheating attacks and resistance techniques in geogame design. In
Proceedings of ACM FuturePlay Conference, Vancouver, BC, May 2010.
3. R. J. Hall. The iTron family of geocast games. IEEE Transactions on Consumer
Electronics, 58(2), 2012.
4. R. J. Hall. A point and shoot weapon design for outdoor multiplayer smart-
phone games. In Proceedings of the 2011 International Conference on the
Foundations of Digital Games, Bordeaux, France, June 2011.
5. Cocos2d-x.org. n.d. www.cocos2d-x.org.
6. R. Balzer. Tolerating inconsistency. In Proceedings of the 13th International
Conference on Software Engineering, Austin, TX, September 1991.
7. R. J. Hall. The capture calculus toolset. In Proceedings of the 26th IEEE/
ACM International Conference on Automated Software Engineering, Research
Demonstrations Track, Lawrence, KS, November 2011.
Outdoor Smart Phone Games ◾ 197
Understanding
User Behavior
at Three Scales
The AGoogleADay Story
Daniel M. Russell
CONTENTS
9.1 Introduction 200
9.2 Background 201
9.3 Our Game: AGAD 201
9.4 Three Views of the User: Micro, Meso, and Macro 203
9.4.1 Micro Level: How Players Behave over Short Timescales 204
9.4.2 Meso Level: How Humans Behave Minute by Minute 206
9.4.3 Macro Level: How Humans Behave over Days
and in the Large 208
9.4.4 Integrating Research and Design across the Three Levels 210
9.5 Summary 212
References 212
Abstract: How people behave is the central question for data analytics,
and a single approach to understanding user behavior is often limiting.
The way people play, the way they interact, and the kinds of behaviors they
bring to the game are factors that ultimately drive how our systems per-
form and what we can understand about why users do what they do. I sug-
gest that looking at user data at three different scales of time and sampling
199
200 ◾ Computer Games and Software Engineering
resolution shows us how looking at behavior data at the micro, meso, and
macro levels is a superb way to understand what people are doing in our
systems and why. Knowing this lets you not just understand what is going
on, but also how to improve the user experience for the next design cycle.
9.1 INTRODUCTION
Although there are many motivations for creating games, serious games
are usually vehicles for teaching and learning. Although serious games
are important in many educational settings, they sometimes suffer from
a lack of attention to the details of game design. Although the goal is to
teach and instruct, the game experience sometimes suffers. Face it, some
of those serious games are not so much fun to play. How is it possible that
a game can be created and deployed without anyone noticing that it has
some playability issues?
Many people have reported on ways to instrument and monitor a game.
We have found that a particularly useful approach to understand the over-
all user experience has been to analyze game player behavior at three dif-
ferent timescales of behavior, from very short millisecond-by-millisecond
behaviors, up to the timescale of millions of players as they use the game
to learn over weeks and months.
The AGoogleADay.com (AGAD) game had a simple goal. We simply
wanted to show the public some more sophisticated ways to use the Google
search engine. Although Google is simple to use, there are many features
within Google that are not widely used. By building a “trivia question” style
game where the use of Google was required (and not prohibited, as in most
such games), we hoped to introduce new features to the players by creating
questions that were difficult (and obscure) enough to motivate their use.
Originally planned as a 3-month experiment, the AGAD game con-
tinues to run more than 2 years after its launch, serving millions of game
players each month and improving players’ ability to seek out answers to
questions by searching.
Here we describe some of the analyses we did to understand what was
happening with the players—what they did and what effect changes to the
game would have.
Although this chapter is about AGAD, the game, the approach of
understanding complex user behavior at these three different timescales,
and using three different kinds of studies, is applicable to software systems
with complex user interfaces (UIs) in general.
Understanding User Behavior at Three Scales ◾ 201
9.2 BACKGROUND
There has been a practice of developing games with an eye toward testing
and analysis (Pinelle 2008; Nacke 2009; Koeffel 2010). Typically, the analy-
sis of games has followed traditional usability analysis methods or logging
player behavior.
Human computer interaction (HCI) researchers have grown increas-
ingly interested in studying the design and experience of online games,
creating methods to evaluate their user experience (Bernhaupt 2010),
“playability” heuristics for their design (Schaffer 2008), and models for the
components of games (Schaffer 2008) and game experience (Sweetser and
Wyeth 2005). Each of these approaches, although useful, is primarily situ-
ated within a single scale of analysis—playability heuristics are defined at
the microscale, whereas game experience is primarily studied at the meso-
scale. Likewise, the work of Bell et al. (2006) is definitely a macroscale
study (by means of diaries), but does not take into account the behavior of
players across the scales.
However, in an age when online games are played by a large number of
gamers, from potentially many places around the world, a more compre-
hensive method for understanding game use early on in the design process
is often fruitful. This desire to bridge the gap between the lowest levels of
use and the behavior of players in the very large led us to apply a broad-
spectrum analysis to our game.
fraction of the game-playing population) and being too easy (and therefore
unsuitable for competitive play). For AGAD, we selected questions that are
purposefully unlikely to be known by even a small fraction of the gamers, yet
answers that are discoverable with a few Google searches. The questions also
had to be of some intrinsic interest—truly trivial questions, such as what is
the 23rd digit in the decimal expansion of pi?—are unsuitable for game play.
AGAD is a fairly simple game to construct. The UI presents a few ques-
tions each day, with daily updates to the set. Players work through the
questions, doing Google searches in a separate iframe that allows the
search engine to be visible alongside the question. Each question has a
simple answer that can be recognized by a regular expression. Writing the
regexp is slightly tricky, as most questions have multiple variants on an
answer (e.g., “three,” “3,” or “the number 3”).
As shown in Figure 9.1, the questions are presented in a frame at the
bottom of the page, with typical game mechanics such as unlocking sub-
sequent questions, buttons to let the player skip a question, and ways to
compare your score (and time to answer the question) with friends via the
Google+ social network.
As we developed AGAD, it quickly became clear that user testing
would have to be an important part of the design cycle. This is true for
FIGURE 9.1 (See color insert.) The AGAD game shows a search question (3),
then lets you search for the answer with Google (1). You work through the ques-
tions (2) scoring points as you unlock and solve additional questions.
Understanding User Behavior at Three Scales ◾ 203
Logs of user behavior have been a standard practice for some time. Traces
of behavior have been gathered in psychology studies since the 1930s
(Skinner 1938), and with the advent of web- and computer-based applica-
tions, it became common to capture a number of interactions and save
them to log files for later analysis. More recently, the rise of web-based
computing platforms has made it possible to capture human interactions
with web services on a large scale. Log data let us observe how to compare
different interfaces for supporting e-mail uptake and sustained use pat-
terns (Dumais et al. 2003; Rodden and Leggett 2010).
Let us look at each of these timescale analysis methods in more detail.
As shown in Figures 9.2 and 9.3, perhaps the most useful way to visualize
the millisecond-by-millisecond behavior stream is as either eye tracks on
the display.
With this kind of very detailed information about what the player is
doing, we can identify distractors and invisible portions of the interface. For
instance, in an earlier version of the game, we did not have the Learn How
to Play and Tips & Tricks tabs in the upper right corner. As can be seen by
the eye movement chart in Figure 9.2, although they were rarely used, they
would be scanned by game players from time to time, ensuring that they
knew about their presence, even if only rarely actually used in game play.
More importantly, understanding how a player visually scans the display,
and where they spend most of their time (especially when game play is pro-
ceeding poorly), is a valuable resource for tuning the game play mechanics.
When the player gets stuck, does he or she exhibit visual search behaviors,
or is he or she able to quickly determine what the next plausible course of
action should be?
The lab setting is useful, allowing demographic and other data to be
easily collected about participants and allowing control over variables that
are not of interest, while allowing instrumentation of novel systems that
could not be easily deployed broadly. However, we have found that in the
lab, researchers ask behavioral questions that do not originate with the
FIGURE 9.2 (See color insert.) The movement of the eye on the display is shown
by a connected graph. The numbers indicate which fixation, or pause, it repre-
sents and the size of the circle represents the duration of the eye fixation at that
point. The number 1 is near the bottom right, where the player clicked the button
on the previous page.
206 ◾ Computer Games and Software Engineering
FIGURE 9.3 (See color insert.) The heat map display shows how much time the
eye spent at any one spot during the sample time. Here we can see the player
spent most of the time reading the question (next to the theatrical mask glyph at
the bottom and near the top at the search query).
modification to help people who were having difficulty, but not to disclose
anything to players who really wanted to solve the full challenge.)
From a game design perspective, this kind of mesoscale user behavior
in a natural setting was invaluable. It is the kind of information that can
deeply influence a system design by providing feedback during the course
of play. It is the kind of player behavior that is impossible to abstract from
microscale behaviors and difficult to infer from the macro level.
8,000
4,000
0
4/30/2011 5/1/2011 5/2/2011 5/3/2011 5/4/2011 5/5/2011
FIGURE 9.4 (See color insert.) Tracking data on questions by day. The graph
shows player volume for 6 days for three different questions (“Triple Point,”
“Lonesome,” and “Hamangia”). “Triple Point” was introduced on 4/30/2011, yet
players kept backing up to that question 4 days later.
a given day’s challenge would strangely change after the fact. In essence,
what this did was to give a very long tail of data for any particular search
question (Figure 9.4).
We also found through logs analysis that players were doing a sig-
nificantly larger number of queries/visit. Players had a nearly 2× query
volume increase overall in distinct queries (Figure 9.5). This increase in
total search volume would not be explained simply by playing the game,
but due to additional searches outside the scope of AGAD. Because one of
the goals of the game was to help people become more effective users, this
20 10
8
15
% visitors
6
10
4
5
2
0 0
0 10 20 30 40 50 0 10 20 30 40 50
Distinct queries Distinct queries
might seem to be evidence that searchers were becoming less effective, not
more. However, in a survey of 200 AGAD players in September 2011, we
discovered that after playing for several days, the perception was that they
were taking on much more sophisticated search tasks, requiring additional
searches. In fact, this was suggestive that the approach of additional time
spent practicing actually improved the quality of their search skills.
Surprisingly, several months after launch, there was a start-of-year error
in the way our co-marketing ads were being launched (in particular, in the
2011 New Year, our partners were not getting the feeds that were set up)
(see Figure 9.6). As this was over the holiday, we only checked the logs every
2 weeks; it was a fortnight before the error was noticed in the logs. It was
through this error that we discovered that although AGAD has a large return-
ing visitor rate, the genesis of their return was the presence of a reminder in
a media stream. Once a player saw the reminder, he or she would go to the
site and play (and often, as noted above, play more than one day at a time).
% New visits
56.09%
FIGURE 9.6 An example of the unexpected. The Analytics view of AGAD over
the 2011 New Year’s holiday. A mistake in advertising leads to a huge drop in
players for several weeks.
Understanding User Behavior at Three Scales ◾ 211
% New visits
40.90%
FIGURE 9.7 Total audience participation in AGAD over a 2-year period. Various
spikes and plateaus correspond to marketing events. Note the returning visitor
rate in the lower right; this is an extremely high-returning player rate.
212 ◾ Computer Games and Software Engineering
9.5 SUMMARY
A useful way to look at user behavior is at three different cognitive
levels—first, the fast/rapid/millisecond level; second, the minute-to-minute
behavior; and third, the effect of long/slow cognition over days/weeks.
Each timescale reveals substantially different kinds of information about
how the user/player uses, thinks about, and responds to the game.
Examining user behavior across these three levels is as productive for
understanding applications as it is for games. The same underlying user
experience research methods apply and can be immensely useful when
developing a game.
The design space for a complex game is huge. User experience research,
seen from a multiscale perspective, gives insights into what opportunities
and issues will arise in the game. What is more, looking at insights found
at one scale often gives insights into behaviors at another.
In general, a good software engineering practice is to tightly weave
together not just great software engineering but also great attention to the
user experience moment to moment as well as play experience over an
extended period.
Great games have these characteristics, performing on all of these levels
of design simultaneously. They have great visuals; they have great audio;
they have great backend engineering, interactions, controllers, and stories.
Great games go on to have multiple editions and last for years. You can
see how analyzing the game at multiple levels, with attention to different
kinds of user interactions, will lead to improved design and user enjoy-
ment overall.
REFERENCES
Bell, M., Chalmers, M., Barkhuus, L., Hall, M., Sherwood, S., Tennent, P., Brown, B.,
Rowland, D., Benford, S., Capra, M., and Hampshire, A. Interweaving mobile
games with everyday life. In Conference on Human Factors in Computing
Systems, pp. 417–426, Montreal, Quebec, Canada, 2006.
Bergstrom, Jennifer Romano, and Andrew Schall, eds. Eye Tracking in User
Experience Design. Elsevier, 2014.
Bernhaupt, R. (ed). Evaluating User Experience in Games: Concepts and Methods.
Springer, London, 2010.
Dell, N., Vaidyanathan, V., Medhi, I. Cutrell, E. and Thies, W. “Yours is better!”:
Participant response bias in HCI. In Proceedings of CHI, pp. 1321–1330, 2012.
Dow, S.P., Mehta, M., MacIntyre, B., and Mateas, M. Eliza meets the wizard-of-oz:
Blending machine and human control of embodied characters. Proceedings of
the SIGCHI Conference on Human Factors in Computing Systems. ACM, New
York, 2010.
Understanding User Behavior at Three Scales ◾ 213
Dumais, S.T., Cutrell, E., Cadiz, J.J., Jancke, G., Sarin, R., and Robbins, D.C.
Stuff I’ve Seen: A system for personal information retrieval and re-use. In
Proceedings of SIGIR, pp. 72–79, Toronto, Canada, 2003.
Itsuki, H., Takeuchi, A., Fujita, A., and Matsubara, H. Exploiting MMORPG log data
toward efficient RMT player detection. Proceedings of the 7th International
Conference on Advances in Computer Entertainment Technology. ACM,
Taipei, Taiwan, 2010.
Koeffel, C., Hochleitner, W., Leitner, J., Haller, M., Geven, A., and Tscheligi, M.
Using heuristics to evaluate the overall user experience of video games
and advanced interaction games. In Evaluating User Experience in Games,
pp. 233–256. Springer, London, 2010.
Nacke, L.E., Drachen, A., Kuikkaniemi, K., Niesenhaus, J., Korhonen, H.J., van
den Hoogen, W.M., Poels, K., IJsselsteijn, W., and Kort, Y. Playability and
player experience research. In Proceedings of DiGRA, Brunel University,
London, UK, 2009.
Newell, A. Putting it all together. In Klahr, D. and Kotovsky, K. (eds.), Complex
Information Processing: The Impact of Herbert A. Simon. Psychology Press,
New York, 1989.
Newell, A. Unified Theories of Cognition. Harvard University Press, 1994.
Pinelle, D., Wong, N., and Stach, T. Heuristic evaluation for games: Usability
principles for video game design. Proceedings of the SIGCHI Conference on
Human Factors in Computing Systems. ACM, New York, 2008.
Rodden, K. and Leggett, M. Best of both worlds: Improving Gmail labels with the
affordance of folders. In Proceedings of CHI, pp. 4587–4596. Atlanta, GA,
2010.
Russell, D.M., and Grimes, C. Assigned tasks are not the same as self-chosen web
search tasks. System Sciences. HICSS. 40th Annual Hawaii International
Conference on IEEE, IEEE, Hawaii, 2007.
Schaffer, N. Heuristic evaluation of games. In Isbister, K. and Schaffer, N. (eds.),
Game Usability: Advice from the Experts for Advancing the Player Experience,
pp. 79–89. Morgan Kaufman, Amsterdam, the Netherlands, 2008.
Skinner, B.F. The Behavior of Organisms: An Experimental Analysis. Appleton-
Century, Oxford, 1938.
Sweetser, P. and Wyeth, P. GameFlow: A model for evaluating player enjoyment in
games. Computers in Entertainment 3(3):3, 2005.
Thawonmas, R., Kashifuji, Y., and Chen, K.-T. Detection of MMORPG bots based
on behavior analysis. In Proceedings of the 2008 International Conference on
Advances in Computer Entertainment Technology. ACM, 2008.
Chapter 10
Modular Reuse of
AI Behaviors for
Digital Games
Christopher Dragert, Jörg Kienzle,
and Clark Verbrugge
CONTENTS
10.1 Introduction 216
10.2 Background and Related Work 218
10.2.1 Layered Statechart-Based AI 219
10.2.1.1 Sample AI for a Squirrel NPC 220
10.3 AI Module 222
10.3.1 AI Module Interaction 223
10.3.1.1 Event-Based Interaction 223
10.3.1.2 Synchronous Communication 223
10.3.1.3 Miscellaneous AI Module Properties 224
10.3.2 AI Module Interface 225
10.4 Reuse and Component Integration 226
10.4.1 Event Renaming 227
10.4.2 Associated-Class Connection 228
10.4.3 Functional Groups 229
10.4.3.1 Group-Private Events 230
10.5 Case Study: Squirrel to Trash Collector 231
10.5.1 Trash Collector Specification 231
10.5.1.1 Exploring 232
10.5.1.2 Collecting Trash 232
10.5.1.3 Using Trash Receptacles 233
215
216 ◾ Computer Games and Software Engineering
10.1 INTRODUCTION
Complex and ubiquitous artificial intelligence (AI) has become a staple of
modern computer games; players expect nonplayer characters (NPCs) to
intelligently react to player actions while exhibiting appropriate behaviors
depending on their role within the game context. Developing a good AI
for a real-time game environment, however, is a difficult task. Although a
variety of formalisms are employed, practical AI designs typically resort
to strongly customized approaches closely connected to the underlying
game architecture and the NPC type. This results in a relative lack of reuse
in game AI, increasing development costs and requiring the repetitive
development of often quite similar AI behaviors.
The narrow game-by-game focus is a source of consternation for game
developers. At GDC 2011, Kevin Dill raised this issue, arguing that the
lack of behavioral modularity was stymieing the development of high-
quality AI [1]. Previous work has argued that the fundamental cause for
this lies within the formalisms employed [2]. The applicability of software
engineering practices becomes limited due to the use of nonmodular cus-
tom approaches. As an alternative, the layered statechart-based approach
[3] provides inherent modularity with nesting capabilities.
Our approach to AI reuse builds from layered statechart-based AI.
Here, we provide a formalism and structure that encapsulates behaviors;
we are able to define a development strategy that allows the extensive reuse
of different AI components, including both high- and low-level elements.
Partial behavioral composition is enabled by the introduction of functional
groups, providing an efficient way to reuse groups of related behaviors.
Clear identification of code dependencies further permits analysis and
the tool-based presentation required to ensure proper integration into the
actual game code. This yields a faster development process with the a bility
Modular Reuse of AI Behaviors for Digital Games ◾ 217
and used to perform this task and reifies our general design. Finally, we
offer conclusions and discuss future work in Section 10.7.
pick_up_item_request/
Idle this.setTarget(_eventdata)
[this.isTargetReachable()]/
this.createEvent(“pick_up_item,” target)
Executing
move_successful/
this.createEvent(“pick_up_item,” target)
[!this.isTargetReachable()]/
Moving this.prepareDestination();
this.createEvent(“stop_move”);
this.createEvent(“move ,” destination)
The next layer provides executors that enact execution decisions, translat-
ing goals into actions. Depending on the current state of the NPC, certain
commands can cause conflicts or suboptimal courses of action, which are
corrected by coordinators. The final layer contains actuators, which exe-
cute actions by modifying the game state.
In Figure 10.1, a sample Pickup Executor statechart is presented.
It reacts to pick _ up _ item _ request events by determining if the
item is reachable. The guard condition [this.isTargetReachable()]
only allows the guarded transition to fire when the guard evaluates to true.
The transition then fires the event to either pick up the item or first move
to the appropriate location and then pick up the item. Statecharts have
become of interest relatively recently to the game development industry,
with initial designs focusing on low-level issues such as efficient interpreta-
tion within a game context [17].
General Brain
event flow
Items Flee
Threat Wander
Eat
Objects
Eat
Eat
Players Subsumptive
event flow Move
Pickup
Energy
Pickup
Sensors Analyzers Memorizers Strategizer Deciders Executors Actuators
10.3 AI MODULE
Layered statechart-based AI is built around combining individual stat-
echarts to produce the overall behavior. This implies that the fundamental
module is the statechart itself. We define an AI module as a statechart
along with its associated class and will use this as our fundamental mod-
ule in the reuse process. This is similar to game graphics, wherein models
built from texture-mapped triangles form the basic reusable component.
Models can easily be reused in new contexts, and by clearly defining the
reusable component, we provide a method for AI modules to be just as
reusable when building new game AIs.
Modular Reuse of AI Behaviors for Digital Games ◾ 223
context or referenced classes must also be reused such that the associ-
ated class can compile correctly. If an AI module has no game imports,
then it is game agnostic and can be safely reused in a different game
without issue.
The final property relates to nonmodal properties of the AI module.
Such properties, stored as variables in the associated class, allow for cus-
tomization as the module is reused. An example comes in the form of
the KeyItemMemorizer module, found in the definition of the squir-
rel AI. The associated class has a type parameter. If a spotted item is of
the same type as the type parameter, then it is a key item (type Acorn, in
the case of the squirrel). A game implementing several important items
(such as flowers, shirts, and boxes) could have a KeyItemMemorizer for
each item relevant to the AI. When a KeyItemMemorizer receives an
item _ spotted event from a sensor, the payload would be inspected
and compared against the key item parameter, and then memorized if it
is a matching type. By exposing parameters in the interface, it makes it
possible to modify them at time of reuse, and thus customize the module
to the new context.
Statechart Name
Events Calls
KeyItemMemorizer
Events Calls
FIGURE 10.5 The module interface for the Key Item Memorizer.
Statechart A B
α?
C D
Mammoth Listener
Events Calls
Events Calls
are to explore the game world, spot garbage bins and pieces of trash, pick up
pieces of trash, and drop trash into receptacles.
The high-level behavior of the trash collector differs from that of the
squirrel. While the squirrel has four high-level goals (wandering, gather-
ing food, eating, and fleeing), the trash collector only has three: searching,
picking up trash, and depositing trash. Searching and wandering seem
similar, and gathering food and picking up trash are also similar; we start
our reuse from there.
10.5.1.1 Exploring
In the squirrel, wandering is performed by means of a start _ wander
event that is received by the Wander Executor. In turn, the Wander
Executor uses the Move Actuator to effect movement plans. These
already perform a wandering behavior, and thus can be directly reused in
the trash collector.
In order to preserve the existing connection, we create a new func-
tional group called Wander Move, comprised of the Move Actuator
and the Wander Executor. This new group is connected through the
move, move _ successful, and move _ failed events. However,
other parts of the squirrel AI connect to the Move Actuator, and so
in creating the group, we will not reclassify these events as being group-
private events.
Imports
+
Module library
Associated
Statechart class
Composes, renames, and verifies
Exports
Project
+ Scythe AI
Associated
Statechart class
Game ready AI
class are extracted, so that values can be specified when that AI module
is reused. Synchronous calls are addressed next, covering calls made to
other classes, and calls made available for other classes to utilize. When
this guided process is complete, the new AI module is added to Scythe AI’s
module library, and copies of the associated class and statechart are made
and stored.
10.6.1.2 AI Construction
The building process consists of adding modules from the library to the
new AI. Assuming that a module’s logic is internally correct, that is, the
statechart correctly does what it claims to do, the task for the user is to
coordinate module communication such that the modules in the new AI
will cooperate as desired. Most frequently, this means ensuring that events
sent by a statechart are correctly received by target statecharts, while not
being incidentally received by nontarget statecharts. This is done by event
renaming as described in Section 10.4.1. Once a module is added, values
for parameters should be specified.
A number of issues can arise while constructing a new AI. These are
classified as errors if they will prevent the AI from running (e.g., a syn-
chronous call is not satisfied), and must be corrected before completion.
Modular Reuse of AI Behaviors for Digital Games ◾ 237
REFERENCES
1. Brian Schwab, Dave Mark, Kevin Dill, Mike Lewis, and Richard Evans.
GDC: Turing tantrums—AI developers rant. http://www.gdcvault.com/
play/1014586/Turing-Tantrums-AI-Developers-Rant, 2011.
2. Christopher Dragert, Jörg Kienzle, and Clark Verbrugge. Toward high-
level reuse of statechart-based AI in computer games. In Proceedings of the
1st International Workshop on Games and Software Engineering, pp. 25–28.
Honolulu, HI, May 2011.
3. Jörg Kienzle, Alexandre Denault, and Hans Vangheluwe. Model-based design
of computer-controlled game character behavior. In MODELS, vol. 4735,
LNCS, pp. 650–665, 2007.
4. Unreal Technology. The Unreal Engine 3. http://www.unrealengine.com, 2007.
Modular Reuse of AI Behaviors for Digital Games ◾ 239
Repurposing Game
Play Mechanics as
a Technique for
Designing Game-Based
Virtual Worlds
Walt Scacchi
CONTENTS
11.1 Overview 242
11.2 Related Research on the What and How of Repurposing
Game Play Mechanics 242
11.3 Case Studies in Repurposing Game Play Mechanics 243
11.3.1 Case 1—Producing Functionally Similar Games 244
11.3.2 Case 2—Modding an Existing Game via New Game
Play Levels, Characters, and Play Objectives 246
11.3.3 Case 3—Replacing Multicharacter Dialogs and
Adding Rashomon-Style Role-Play 248
11.3.4 Case 4—Recognizing Resource Allocation
Challenges with Uncertainty in Problem Domain 251
11.3.5 Case 5—Choosing Meta-Problem Solving Domains
for Game Development, Extension, and Play 254
241
242 ◾ Computer Games and Software Engineering
11.1 OVERVIEW
This chapter examines the concept and practice of repurposing game play
mechanics as a game design technique. Section 11.2 begins with a review
of related research that informs this view of repurposing as a game design
technique that may be adopted and practiced by new game developers or
game players who want to engage in end-user game software development.
Next, the chapter describes five game design case studies where different
forms of repurposing are employed. These case studies include the iden-
tification of the example games and play mechanics that served to inform
the resulting game designs from each. Each case study also categorizes the
kinds of repurposing methods that were employed in reusing and adapt-
ing the source game mechanics into those employed in the new game
design. Finally, the chapter includes a simple comparative analysis and
a summary of these repurposing methods, as a basis for generalizing the
method as a reusable and adaptive game design technique.
FIGURE 11.1 Screenshot of Tetris (left) and Dr. Mario (right) games. (Tetris:
Courtesy of http://en.wikipedia.org/wiki/Tetris; Dr. Mario: Courtesy of http://
en.wikipedia.org/wiki/Dr._Mario. Accessed on July 1, 2014.)
Repurposing Game Play Mechanics as a Design Technique ◾ 245
must be matched to fit in with other tile patterns already in place (Tetris),
or form a repeated pattern like three-in-a row (Dr. Mario). The arriving
tile patterns may be rotated or slid across the playing field in order to align
and match the in-place patterns. Game play is motivated by time, as the
patterns fall into and progress across the playing field at a certain pace, so
that rapid recognition matching patterns and geometric spatial reasoning
are helpful cognitive skills for an effective game play.
This game encourages and relies on such cognitive skills as game play
increases in complexity and repetition. As the few people involved in the
game project team were all experienced in Tetris game play, we quickly
began to see how the basic Tetris play mechanic could be repurposed by
substituting a carnivore, herbivore, plant, and mulch as the four (color)
kinds of tiles. The resulting prey–predator food chain game is seen in
Figure 11.2. However, we elected to rotate the Tetris/food chain game
board 90°, so that prey–predator tetrominoes emerge and flow left to right,
rather than top to bottom.
When carnivores (predators) are aligned with herbivores (prey), they
form a simple food chain, allowing the survival of the carnivore and the
consumption of the prey. Similarly, when herbivores are aligned with
plants, the herbivore survives, as the plant is consumed. When plants are
aligned with mulch, they thrive and the mulch is consumed. When one
or more carnivores are aligned with plants or mulch, they will eventu-
ally die and turn into mulch. Therefore, our game enacts a prey–predator
food chain relationship where mulch contributes to plants, plants to herbi-
vores, herbivores to carnivores, and carnivores to mulch as the circle of life
(or food web), and game play enables players to score points as they recog-
nize and reenact the prey–predator and food chain relationships through
their game play moves. As such, we were fortunate to recognize that Tetris
and Dr. Mario could serve as functionally similar games and game play,
whose game play mechanics could be abstracted, reused, and tailored as
part of our game design.
FIGURE 11.4 Images for the development and use of the FabLab game mod
developed with UnrealEd and Unreal Tournament 2004. (With kind permission
from Springer Science+Business Media: Online Worlds: Convergence of the Real
and the Virtual, W.S. Bainbridge, Ed., Game-based virtual worlds as decentral-
ized virtual activity systems, Scacchi, W., Springer, New York, 2010, 225–236.)
the game design and development process in ways that might be reused by
corporate eLearning specialists who develop on-the-job training materials
for newly hired business process personnel. Also, our development budget
was limited to be comparable to that available for these specialists to develop
conventional training materials (e.g., PowerPoint presentation slide decks).
The selected business process was order management, which focuses on the
activities of business specialists who handle incoming customer orders for
products that are manufactured either built to external order or built to fill
internal inventory. The result of this internal-only game development and
deployment (due to nondisclosure agreement at the time) was a simple,
single-player 2D role-playing game called Customer Business Analyst (CBA)
that covered 3–4 weeks of simulated order management problem-solving
tasks in a cubicle office environment, from simple to problematic (with
nagging customers making phone calls to complain, communicating with
customers and manufacturing operations via email, accessing in-house
corporate enterprise resource planning systems—the Hub—and unreliable
order status information). These features are highlighted in Figure 11.5—the
two figures on the left provide a bird’s eye view of the office space, whereas
FIGURE 11.5 Four screenshots from the Customer Business Analyst game for
training order management business analysts.
250 ◾ Computer Games and Software Engineering
the two figures on the right provide an analyst’s desktop view of their order
management work activities.
After the delivery and retirement of the CBA game, about two years later,
we received a new challenge from a large statewide government agency in
California responsible for deploying state-mandated annual training for
state employees in recognizing, avoiding, and reporting sexual harassment
in public workplaces. Once again, our game prototyping budget and dem-
onstration schedule was extremely limited, so this called for a game design
and demonstration that could be done quick and dirty.
Our choice was to repurpose the role-playing CBA game through the
substitution of in-game characters dialog while also providing support for
the Rashomon effect (Heider 1988), but through in-game characters and
nonplayer characters. The substitution of character dialog and situations as
the basis for a new/adapted story is a common practice found in the litera-
ture, cinema, and game-based machinima. For example, the Shakespearian
story of The Tempest was repurposed into the cinematic science-fiction
story of the Forbidden Planet, whereas the popular Red vs. Blue machinima
series represent the substitution of human voices over in-game character
dialogs/taunts from various HALO FPS games. The Rashomon effect refers
to the situation where multiple actors in a common situation or interac-
tion provide differing, sometimes conflicting, interpretations of what
they perceive (cf. the allegory of the blind men feeling the elephant). This
exploration of characters acting in different roles encountering a common
situation also appears in interactive game-based worlds, where players can
switch between characters to reinterpret and reexperience a recent game
play situation, as a play mechanic, appears in games such as The Residents:
Bad Day at the Midway released in 1996 (Residents 2014). Our new game
play experience was thus designed to demonstrate how to provide scenario-
based character encounters that feature innocent, ambiguous, or abusive
verbal interactions different/competing perspectives of in-game characters
regarding whether or not they perceived multicharacter dialog or inter-
actions as engendering sexual harassment activities. A screenshot of the
repurposed CBA-into-sexual harassment game is shown in Figure 11.6.
To be clear, this game is not envisioned as a game to play to win, but
instead to provide a sufficiently engaging experience, so that state employ-
ees would play through dozens of different possible sexual harassment
scenarios to fulfill the state-mandated training requirement. The state’s
harassment liability insurance provider eventually argued against the
development and deployment of the game in part because it was a game,
Repurposing Game Play Mechanics as a Design Technique ◾ 251
FIGURE 11.6 A screenshot from the repurposed CBA game now including
s ubstituted in-game character dialogs (here, highlighting a scenario where one
character uses possibly ambiguous terms of endearment or sexual innuendo,
drawn from a current sexual harassment training scenario).
though the Rashomon effect was highlighted as very original and likely
well suited for sexual harassment training (though a few other reviewers
objected to its value for this subject, as they preferred clear and unambigu-
ous interpretations of what is or is not harassment).
FIGURE 11.7 Scenes from a physical facility for mission planning, and mirror
virtual world for mission planning in DECENT. (Data from Scacchi, W. et al.,
Exploring the potential of computer games for decentralized command and
control, Proceedings of the 17th International Command and Control Research
and Technology Symposium, Paper no. 104, Fairfax, VA, June, 2012.)
cards on a large virtual wall display visible to all. We also repurposed the
poker cards to now be denominated in four types of military services (land,
sea, air, and cyber), with card point values expressing a corresponding
quantity of military objects (e.g., tanks, ships, planes, and staff). We also
added meta-game nonplayer cards drawn at random that serve to modify
the value of cards held/shown, as another way to introduce uncertainty into
the resource allocation game play. In multiplayer games, only the winning
hand gets its resource allocation effected, based on the cards in the final
round, while losing hands do not get allocations. Otherwise, game play fol-
lows the rules and procedures of the Texas Hold’em card game. Figure 11.8
displays a scene from in-world game play, and a photograph of multiple
students playing the game.
Finally, we have taken the multiplayer virtual world of DECENT and have
also repurposed its characters and objects for nonmilitary applications. For
instance, we have repurposed from the virtual world for mission planning
to adult teachers and children students in an elementary classroom setting
with desks, tabletop computers, and a large-screen projector to support new
experimental studies of classroom-based science and health care education.
254 ◾ Computer Games and Software Engineering
FIGURE 11.8 Scenes of game play in the DECENT virtual world for mission planning.
(Data from Scacchi, W. et al., Exploring the potential of computer games for decen-
tralized command and control, Proceedings of the 17th International Command and
Control Research and Technology Symposium, Paper no. 104, Fairfax, VA, June, 2012.)
FIGURE 11.9 Example game objects and affordances for near-earth space explo-
ration games for prototyping future space science missions and educational out-
reach. (Data from Scacchi, W., The future of research in computer games and
virtual worlds: NSF workshop report, Technical Report ISR-12-8, Institute for
Software Research, University of California, Irvine, CA, August. http://www.isr.
uci.edu/tech_reports/UCI-ISR-12-8.pdf, 2012a.)
256 ◾ Computer Games and Software Engineering
are currently investigating for space science missions that focus on travel
to, capture, and retrieval of near-earth objects or small planetary objects,
such as near-earth asteroids (Hasnain et al. 2012; Scacchi 2012a; Wall 2013).
11.5 CONCLUSIONS
This chapter examines the concept and practice of repurposing game
play mechanics as a game design technique. In addition to a review of
related research, the chapter briefly describes five game design case stud-
ies, where the different forms of repurposing were employed. These case
studies include the identification of the source game and play mechanics,
as well as categorizing what kinds of repurposing methods were employed
in reusing and adapting the source game mechanics into those employed
in the new game design. The chapter also includes a simple comparative
analysis of these repurposing methods, as a basis for generalizing the
method as a reusable and adaptive game design technique. Repurposing
appears to be a promising new heuristic approach for identifying, rapidly
258 ◾ Computer Games and Software Engineering
ACKNOWLEDGMENTS
Support for this research was provided by grants #0808783, #1041918, and
#1256593 from the U.S. National Science Foundation. No review, approval,
or endorsement is implied. Only the author of this chapter is responsible
for statements and recommendations made herein.
REFERENCES
Alspaugh, T.A. and Scacchi, W. (2013). Ongoing software development without
classical functional requirements, Proceedings of the 21st IEEE International
Conference Requirements Engineering, Rio de Janeiro, Brazil, pp. 165–174.
Bartle, R.A. (2004). Designing Virtual Worlds, New Riders, Indianapolis, IA.
Cappiello, C., Daniel, F., Matera, M., Picozzi, M., and Weiss, M. (2011). Enabling
end user development through mashups: Requirements, abstractions and
innovation toolkits, in End-User Development, Lecture Notes in Computer
Science, Vol. 6654, pp. 9–14.
El-Nasr, M.S. and Smith, B.K. (2006). Learning through game modding, ACM
Computers in Entertainment, 4(1), Article 3B.
Frakes, W.B. and Kang, K. (2006). Software reuse research: Status and future, IEEE
Transactions on Software Engineering, 31(7), 529–536.
Fullerton, T., Swain, C., Hoffman, S. (2004). Game Design Workshop: Designing,
Prototyping and Playtesting Games, CMP Books, San Francisco, CA.
Hasnain, Z., Lamb, C.A., and Ross, S.D. (2012). Capturing near-Earth asteroids
around Earth. Acta Astronautica, 81(2), 523–531.
Heider, K.G. (1988). The Rashomon effect: When ethnographers disagree, American
Anthropologist, 90(1), 73–81.
Howard, J. (2008). Quests: Design, Theory, and History in Games and Narratives,
A.K. Peters, Wellesley, MA.
Ko, A.J., Abraham, R., Beckwith, L. et al. (2011). The state of the art in end-user
software engineering, ACM Computing Surveys, 43(3), Article No. 21.
Koehne, B., Redmiles, D., and Fisher, G. (2011). Extending the meta-design theory:
Engaging participants as active contributors in virtual worlds, in End-User
Development, Lecture Notes in Computer Science, Vol. 6654, pp. 264–269.
Lopes, C. (2011). Hypergrid: Architecture and protocol for virtual world interop-
erability, IEEE Internet Computing, 15(5), 22–29.
Repurposing Game Play Mechanics as a Design Technique ◾ 259
Neighbors, J.M. (1984). The Draco approach to constructing software from reus-
able components. IEEE Transactions on Software Engineering, SE-10(5),
564–574, 1984.
Nelson, L. and Churchill, E. (2006). Repurposing: Techniques for reuse and
integration of interactive systems, Proceedings of the 2006 IEEE Conference
Information Reuse and Integration, pp. 490–495. Waikoloa, HA, September
2006.
Prieto-Diaz, R. and Arango, G. (1991). Domain Analysis and Software Systems
Modeling, IEEE Computer Society, Los Alamitos, CA.
Residents (2014). Bad Day at the Midway, Wikipedia.com, http://en.wikipedia.
org/wiki/Bad_Day_on_the_Midway, accessed April 2014.
Scacchi, W. (2002). Understanding the requirements for open source software
development, IEE Proceedings-Software, 149(1), 24–39, February 2002.
Scacchi, W. (2010). Game-based virtual worlds as decentralized virtual activity
systems, in W.S. Bainbridge (Ed.), Online Worlds: Convergence of the Real
and the Virtual, Springer, New York, pp. 225–236.
Scacchi, W. (Ed.) (2012a). The future of research in computer games and vir-
tual worlds: NSF workshop report, Technical Report ISR-12-8, Institute for
Software Research, University of California, Irvine, CA, August. http://www.
isr.uci.edu/tech_reports/UCI-ISR-12-8.pdf, accessed August 2012.
Scacchi, W. (2012b). Modding as an approach to extending computer game
systems, International Journal of Open Source Software and Processes, 3(3),
36–47.
Scacchi, W., Brown, C., and Nies, K. (2012). Exploring the potential of computer
games for decentralized command and control, Proceedings of the 17th
International Command and Control Research and Technology Symposium,
Paper no. 104, Fairfax, VA, June.
Scacchi, W., Nideffer, R., and Adams, J. (2008). A collaborative science learning game
environment for informal science education: DinoQuest online, in New Frontiers
for Entertainment Computing, IFIP International Federation for Information
Processing, P. Ciancarini, R. Nakatsu, M. Rauterberg, M. Roccetti (Eds.), Vol. 279,
Springer, Boston, MA, pp. 71–82.
Schell, J. (2008). The Art of Game Design: A Book of Lenses, Morgan Kaufmann,
Amsterdam, the Netherlands.
Sicart, M. (2008). Defining game mechanics, Game Studies, 8(2), December.
Wall, M. (2013). Capturing an asteroid: How NASA could do it, Space.com, April 10.
http://www.space.com/20591-nasa-asteroid-capture-mission-feasibility.html,
accessed June 2014.
Chapter 12
Emerging Research
Challenges in Computer
Games and Software
Engineering
Walt Scacchi and Kendra M.L. Cooper
CONTENTS
12.1 Overview 262
12.2 Looking Forward from the Preceding CGSE Chapters 263
12.3 Grand Challenges in Software Engineering through
Computer Games 267
12.3.1 Using Games to Solve Challenge Problems in
Large-Scale Software Engineering 267
12.3.2 Game Software Requirements Engineering 268
12.3.3 Game Software Design 270
12.3.4 Game Software Testing 272
12.3.5 Teamwork Processes in CGSE 274
12.3.6 GSD and Global CGSE 275
12.3.7 Game-Based Software Engineering Education 276
12.4 Other Research Opportunity Areas for CGSE 277
12.5 Future Investment Opportunities in CGSE R&D Programs 280
12.6 Conclusions 281
Acknowledgments 282
References 282
261
262 ◾ Computer Games and Software Engineering
12.1 OVERVIEW
There are many possible future directions for research in computer games
and software engineering (CGSE). Computer games may well be the quint-
essential domain for computer science (CS) and SE R&D. Why? Modern
multiplayer online games must address core issues in just about every major
area of CS research and education. Such games entail the development, inte-
gration, and balancing of software capabilities drawn from algorithm design
and complexity, artificial intelligence (AI), computer graphics, computer-
supported cooperative work/play, database management systems, human–
computer interaction and interface design, operating systems and resource/
storage management, networking, programming/scripting language design
and interpretation, performance monitoring, and more. Few other software
system application arenas demand such technical mastery and integration
skill. Yet, game development is expected to rely on such mastery, still provide
a game play experience that most users find satisfying, fun, and engaging.
Computer games are thus an excellent domain for research and development
of new ways and means for (game) software engineering.
This chapter highlights future R&D opportunities in CGSE. Some are
found in Chapters 2 through 11, while others are emerging research trends
at the intersection of computer games (CG) and SE with each other, and
with other disciplines. A starting question to ask is, “how CG development
is different from SE?” (Murphy-Hill et al. 2014) More broadly, an overall
question for the student or professional reading this book is “how will
future computer games succeed/fail with/without SE tools, techniques, and
concepts?” For example, if SE is mostly irrelevant to the successful develop-
ment, deployment, and sustained evolution of computer games, then how
or why is SE irrelevant? Is (1) traditional SE no longer relevant overall to the
upcoming generations of game software developers, or is (2) there some-
thing about the ways and means by which computer games, game develop-
ment projects, and game development organizations operate and engage
players that eludes recognition and comprehension by SE researchers and
educators? Although the former (1) seems unlikely and unpopular to con-
template, the latter (2) points to opportunities for future research in SE. The
challenges are thus yours to consider and address.
The mainstream CG industry is a global endeavor with multibil-
lion dollar game development companies, as well as untold numbers of
independent small-to-mid-sized game studios that make games for com-
mercial markets or specialty applications (e.g., game-based training).
Emerging Research Challenges in Computer Games ◾ 263
game design courses that have not yet been studied following his survey
would include game playtesting, playtesting-based incremental game devel-
opment, game production, and SE project management, to suggest a few.
Similarly, courses designed to facilitate or complement competitive game
jams (described subsequently) also represent opportunities for future CGSE
research and educational practice.
In Chapter 3, Cooper and Longstreet introduce the use of model-driven
SE techniques to the development of serious games for education. Their
meta-model foundation explicitly represents traditional game elements
(e.g., narrative and characters), educational elements (e.g., learning objectives
and learning taxonomy), and their relationships. Well-established informal,
semiformal, and formal requirements engineering techniques are tailored
and integrated in the approach. The adoption of comic-style storyboards, for
example, for different SE project efforts is likely to be popular. Future efforts
in this direction can include case studies on the use of these techniques in the
development of different serious games by different groups of student devel-
opers. Semiautomated transformations, with tool support for their approach,
could further provide an effective, easy-to-use game development platform.
In Chapter 4, Sheth, Bell, and Kaiser from Columbia University
describe their efforts in using game play motifs inspired from the
massively multiplayer online role-playing games (MMORPG) to intro-
duce students to the challenges of formal software testing process. Their
use of RPG quests to perform and substantiate game progress, together
with achievements acquired and experience points earned along the way,
represents a playful gamification of SE processes that can be embedded
within m ainstream interactive development environments (IDEs) such as
Eclipse. Gamification of other programming, design, debugging, multitar-
get source code build and release, configuration management, and other SE
production tasks associated with IDEs are likely candidates for further
study, as are how RPG play motifs might be integrated into different kinds
of IDEs, whether for introductory or advanced skilled software students.
In Chapter 5, Xie at University of Illinois at Urbana-Champaign, along
with Tillman, de Halleux, and Bishop at Microsoft Research, examines the
potential for game-based SE tools for gamifying SE techniques in educational
settings. Their Pex4Fun and its successor Code Hunt, provide a game-based
programming environment that poses increasingly challenging program
development tasks as coding duels, along with automated scoring of the
results. The potential for gamifying other aspects of SE is thus a natural
extension of such efforts, as might be the adoption of different kinds of game
Emerging Research Challenges in Computer Games ◾ 265
Modding and repurposing are two forms of software reuse and extensibility
that start from the existing games and game engines that are open to f urther
customization, modification, or total conversion. How best to design and
deploy domain-specific languages, game development frameworks, and
game run-time environments (game engines) for scripting-based repur-
posing are promising areas for CGSE research. Similarly, how best to
design or generate game content assets (e.g., NPCs, behavioral objects,
and extensible rule sets for modifying game play mechanics) for modding
or repurposing is open for research, along with new domain analysis and
domain modeling techniques that can support them.
Overall, the Chapters 2 through 11 all point to different opportunity
areas for future research into CGSE topics that merit further exploration,
prototyping, and deployment to CG or SE researchers, educators, practitio-
ners, and students. With this in mind, we can next turn to examine other
opportunities for future CGSE research that arise in mainstream SE.
SE processes, and technologies (e.g., Musil et al. 2010; Zook and Riedl 2013)
can be comparatively investigated, following empirical SE approaches
introduced 30 years ago (cf. Bendifallah and Scacchi 1989; Boehm et al.
1984). Such field sites allow for a careful empirical study of teams using
a new game SDK or development technique (e.g., SCRUM, agile develop-
ment, game modding) versus those who do not, or those who produce tra-
ditional SE documents (requirements specifications, architectural designs,
and test plans) and follow SE processes for their game versus those who
just focus on game design methods. These game jams may, therefore, be
better suited for longer durations (e.g., 1–2 weeks). Inter-mural or open-
participation game jams may not be so readily structured or balanced at
little cost, but instead may address other CGSE questions that better match
their natural field organization. These jams may stress short duration and
co-location, along with targeted game production on a single randomly
chosen topic that is announced at the beginning of the competition.
More generally, game jams offer the opportunity to organize, design,
and conduct empirical studies in CGSE that, in turn, may inform both
new game design practices or processes and new SE practices and tech-
nologies (Dorling and McCaffery 2012). These jams can be used to address
CGSE research questions in ways not previously utilized in SE research.
Ultimately, this can mean that SE can be viewed as a competitive team-
based sport activity that can be fun for students, as well as structured to
support a careful empirical study (Scacchi 2012a), rather than SE being
a business endeavor to produce application systems hosted on back-end
infrastructures accompanied by documents that few will ever read. It also
suggests that game jams may be designed as a kind of meta-game, so as
to structure the outcomes (i.e., the games produced) to embody certain
functional features, or the game production process to reward accumu-
lative levels of progress achieved or skills mastered by different teams
(leveling up), rather than leading to winning and losing teams.
(most often English). Yet, many large-budget AAA games are developed
in multiple international sites, or for use in global markets with different
user language cultures. This implies not just the need for international-
ization (or localization) of game user interfaces, but also for international
game production management. It should, therefore, be unsurprising that
culturally grounded misunderstandings and miscommunication will arise
during game software development, much like they do in other GSD proj-
ects. Although business efforts to reduce software development costs (e.g.,
through offshoring certain tasks to lower cost software labor markets) are
being tried with both traditional applications and computer games, it is also
apparent that critical product design feature choices or system integration
activities are closely held by the lead development organization. Therefore,
some software product knowledge is purposely withheld in proprietary
GSD projects from global collaborators. In contrast, FOSS development
of commercial games is not (yet) widely practiced (Scacchi 2004), so it
is unclear whether such approaches (Huang et al. 2014; Scacchi 2010a)
can overcome the challenges found in proprietary GSD projects (Smite
and Wohlin 2011). In sum, most of this is still poorly understood from a
research perspective, and a few tools and techniques are being investigated
to address cultural challenges in GSD, yet alone in global CGSE.
may or may not care about the underlying purpose or domain for the game.
Therefore, it is unclear whether little/no engagement of the game players
with the underlying problem domain is a relevant UX factor in game play,
or in user satisfaction with a fun and playful game. But the development of
GWAP, game-based virtual worlds (Bartle 2004; Scacchi 2010c), or other
kinds of serious games in nongame play domains such as protenomics
via the Foldit game (Cooper et al. 2010), RNA sequencing via the EteRNA
game (Lee et al. 2014), and mapping the retina or brain connectome via the
EyeWire game (Frank 2013) may itself represent a new avenue for CGSE
research to address—for example, how best to design and software engineer
games for different scientific research problem domains (Scacchi 2012b).
The areas identified throughout this chapter for future research in CGSE
is a small sample rather than a comprehensive set. CGSE itself represents a
new arena for SE research and development. Other CGSE challenges may
be found in how best to: (1) engineer cybersecurity software capabilities for
multiplayer games, where financial services, user privacy, and anti-cheating
requirements must be addressed while insuring online socialization and
convivial/competitive game play; (2) integrate CG with social media ser-
vices and other cloud-based services; (3) develop frameworks or SDKs for
implementing games that incorporate heterogeneous devices arising within
an Internet of Things; (4) develop automated or semiautomated game pro-
duction tools that allow nonengineers to rapidly produce and deploy serious
games for nonentertainment and scientific research applications (Cooper
et al. 2010); (5) engineer remote game client services for display update man-
agement and run-time monitoring to improve game QoE; (6) investigate
software architectural alternatives for orthogonal, multi-tier middleware
services (for game character AI, data analytics, financial payment services,
user account management, etc.) developed by independent game service
providers; (7) design rapid, iterative, and incremental approaches to mini-
mum playable games (or game feature sets) that allow remote user play to
help drive subsequent game play features and functionality, as well as how to
adapt such an approach to nongame applications; (8) articulate techniques
that combine playtesting with play analytics and visualizations; (9) develop
games, game engines, or game development frameworks for educational
games in other CS subdisciplines (e.g., serious games for network protocol
design, database management, compiler construction, and operating sys-
tem configuration); and (10) investigate the roles of FOSS tools and tech-
niques for game development in enabling SEE, global knowledge transfer,
and socioeconomic development of local game development enterprises.
280 ◾ Computer Games and Software Engineering
Last, the concept and the initiative of using games to explore new ways
and means for solving long-standing problems in SE is profound, bold, and
ambitious. Whether it succeeds is an open issue for now. But whether it
can and will be adopted to explore other challenges in SE is, therefore, an
opportunity at hand. Similarly, whether such effort can be mobilized and
deployed on a regional, national, or global scale without a large g overnment
research investment is also a challenge to be addressed. However, we
should look for (and perhaps encourage) such efforts to address challenges
in CGSE, whereby game development serves game play whose purpose is to
inform new ways to develop games.
12.6 CONCLUSIONS
Overall, the future of CGSE is filled with many diverse opportunities for
research studies and technology development. These opportunities may
be of some interest to the extant computer game industry, but the likeli-
hood of interest for the near-term research funds may be found outside
of the entertainment-focused computer game studios (Scacchi 2012b).
Whether government agencies and corporate sponsors who support high-
risk research projects will embrace CGSE as a new opportunity area is
an open question, but one that readers of this book may be compelled to
advocate and pursue.
Finally, we do not expect the world of SE to suddenly pivot around the
emerging area of CGSE, though it might be interesting to see and experi-
ence such a transformation. Similarly, it will take time for our colleagues
in mainstream computer science to come to recognize how computer
games are engaging a new generation of students and researchers, though
the emergence of new academic research centers and degree programs for
282 ◾ Computer Games and Software Engineering
ACKNOWLEDGMENTS
The research of Walt Scacchi was supported by grants #0808783, #1041918,
and #1256593 from the U.S. National Science Foundation. No review,
approval, or endorsement is implied. Only the authors of this chapter are
responsible for statements and recommendations made herein.
REFERENCES
Alspaugh, T.A. and Scacchi, W. (2013). Ongoing Software Development with-
out Classical Requirements, Proceedings of the 21st IEEE International
Conference on Requirements Engineering, Rio de Janeiro, Brazil, pp. 165–174,
July 15–19.
Bartle, R.A. (2004). Designing Virtual Worlds, New Riders, Indianapolis, IN.
Bendifallah, S. and Scacchi, W. (1989). Work Structures and Shifts: An Empirical
Analysis of Software Specification Teamwork, Proceedings of the 11th
International Conference Software Engineering, Pittsburgh, PA, ACM and
IEEE Computer Society, pp. 260–270, May.
Boehm, B., Gray, T., and Seewaldt, T. (1984). Prototyping versus Specifying: A
Multiproject Experiment. IEEE Transactions on Software Engineering, 10(3):
290–303.
Callele, D., Neufeld, E., and Schneider, K. (2005). Requirements Engineering
and the Creative Process in the Video Game Industry, Proceedings of the
13th International Conference on Requirements Engineering, Paris, France,
pp. 240–250, August.
Claypool, K. and Claypool, M. (2005). Teaching Software Engineering through
Game Design, Proceedings of the 10th SIGCSE Conference Innovation and
Technology in Computer Science Education, Caparica, Portugal, pp. 123–127,
June.
Cooper, K. and Longstreet, C. (2014) Integrating Learning Objectives for Subject
Specific Topics and Transferable Skills, in Cooper, K. and Scacchi, W. (Eds.),
Computer Games and Software Engineering, CRC Press, Boca Raton, FL.
Cooper, K., Nasr, E., and Longstreet, C.L. (2014). Towards Model-Driven Requirements
Engineering for Serious Educational Games: Informal, Semi-formal, and
Formal Models. Proceedings of the 20th International Working Conference on
Requirements Engineering: Foundation for Software Quality, Lecture Notes in
Computer Science, Vol. 8396, pp. 17–22.
Cooper, S., Treuille, A., Barbero, J. et al. (2012). The Challenge of Designing Scientific
Discovery Games, Proceedings on Foundations of Digital Games, Monterey,
CA, pp. 40–47, June.
Emerging Research Challenges in Computer Games ◾ 283
to
le
What I cannot do
e ab nc
e
ll
b
i s ta
i s
r w tly nt h as
ne den t
Level of challenge
FIGURE 6.1 (a,b) Zone of proximal development can be expanded and changes
over time.
Clients Clients
Application/ Application/
service service
Database
(a)
(b)
FIGURE 8.4 (a) Point-and-shoot interface for the iTESS shotgun weapon and
(b) screen display during a shotgun shot animation.
FIGURE 9.1 The AGAD game shows a search question (3), then lets you search for the answer with Google (1). You work through the
questions (2) scoring points as you unlock and solve additional questions.
FIGURE 9.2 The movement of the eye on the display is shown by a connected graph. The numbers indicate which fixation, or pause,
it represents and the size of the circle represents the duration of the eye fixation at that point. The number 1 is near the bottom right,
where the player clicked the button on the previous page.
FIGURE 9.3 The heat map display shows how much time the eye spent at any one spot during the sample time. Here we can see the
player spent most of the time reading the question (next to the theatrical mask glyph at the bottom and near the top at the search query).
16,000 Triple Point
Lonesome
Hamangia
12,000
8,000
4,000
0
4/30/2011 5/1/2011 5/2/2011 5/3/2011 5/4/2011 5/5/2011
FIGURE 9.4 Tracking data on questions by day. The graph shows player volume for 6 days for three different questions (“Triple Point,”
“Lonesome,” and “Hamangia”). “Triple Point” was introduced on 4/30/2011, yet players kept backing up to that question 4 days later.
Software Engineering & Systems Development
K22498
w w w. c rc p r e s s . c o m