Table of Contents

Cover

Title

Copyright

Dedication

About the Authors

About the Technical Editor

Credits

Acknowledgments

Introduction

Part I: Context

Chapter 1: Spoilers

A Sneak Peek at Simulations …

…And Games …

…For Education and Training

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 2: Fundamentals

Why Definitions Matter

Modeling versus Simulation

What Is a Simulation?

Simulations and Games before Computers

Brief History of Computer Simulation

Video Games

Serious Games

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 3: Going Digital

Traditional versus Digital Simulations in Education

What Is a Game?

The Problem with Reality

All Games Are Simulations

Synergy: Analog Sims and Games Meet Computer Simulations and Games

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 4: How Programs Work

Demystification

Algorithms

Example 1: A Bad Algorithm and Basic Flowcharts

Example 2: Navigating an Automated Telephone Answering System: Decisions, Input, Output

Example 3: Mowing the Lawn: Modules

Example 4: Making an Egg Salad: Iteration, Complexity, and Parameters

Summary

Concepts

Terminology

Notes and Other Resources

Part II: It's About Time: Simulation Technicalities

Chapter 5: The Stuff of Which Simulations Are Made

The Passage of Time

Continuous Simulations

Discrete Simulations

When Discrete Becomes Continuous

Hybrid Simulations

How Simulations Advance Time

Designing a Simulation

Sample Systems

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 6: Randomness

What Does Randomness Mean?

Randomness in Games: Dice, Cards

Defining Randomness

Measuring Randomness

Generating Random Values

Simulating Reality and Intelligence

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 7: A Single Server Queuing System

Queuing Systems

System Analysis

The Arrival Process

The Queue

The Server

The Simulation

System Output

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 8: Visualization

The Many Faces of Simulation Output

Text

Graphics

Animations

Sound

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 9: Verification and Validation

What Is Verification and Validation in a Simulation or a Game?

How Do We Know There's a Problem?

Collecting Confirming Data

Verification

Validation

Validation and Verification of Games

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 10: Sims and Games for Learning

Design

Simulation Design

What Changes When the Simulation Is a Game?

Gamified Simulation Design Process

Instructional Design

Combining Instructional Design with Simulation and Game Design

Beware the Decorative Media Trap

Synergy: Serious Game Design

Summary

Concepts

Terminology

References

Part III: Designing and Building Simulations

Chapter 11: Simulation Tools

Game-Making Software

Spreadsheet Games and Sims

Simulation SDKs

The Right Tool for the Job

Summary

Terminology

References, Notes, and Other Resources

Chapter 12: A Hospital Emergency Department (Single Server Queuing System II)

Hospital Emergency Department

System Analysis

System Synthesis

Implementation

Verification and Validation

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 13: Boarding a Passenger Airliner (Decision Making)

Aircraft Loading

System Analysis

System Synthesis

Implementation

Verification and Validation

Summary

Concepts

Terminology

References, Notes, and Other Resources

Chapter 14: Cooking Simulation and Food Safety

Discovery

Research and Preparation

Design Phase

Create Conceptual Model

Create Operational Model

Testing

Summary

Terminology

References, Notes, and Other Resources

Chapter 15: The Stock Market (Serious Game)

Discovery

Research and Preparation

Design Phase

Create Conceptual Model

Create Operational Model

Testing

Summary

Concepts

References, Notes, and Other Resources

Chapter 16: Now What?

Where We've Been

What Next?

References

Appendix: Simulations, Games, and Software

Glossary

End User License Agreement

List of Tables

Chapter 2: Fundamentals

Table 2.1 Differences between Experimental and Experiential Simulations

Chapter 3: Going Digital

Table 3.1: Digital vs. Non-Digital Simulations and Games

Chapter 5: The Stuff of Which Simulations Are Made

Table 5.1: Brief Original System Descriptions

Chapter 7: A Single Server Queuing System

Table 7.1 Output from a Discrete Event Simulation (the Hot Dog Vendor)

Chapter 8: Visualization

Table 8.1: Results From a Continuous Simulation (the Simple Spring System)

Table 8.2: Output from a Discrete Event Simulation (the Hot Dog Vendor)

Chapter 9: Verification and Validation

Table 9.1: Single Server Queue Values—Simulated and Calculated

Chapter 10: Sims and Games for Learning

Table 10.1: Examples of Purposes and Premises in Games

Table 10.2: Sim Design/Game Design/Instructional Design Comparison

List of Illustrations

Chapter 1: Spoilers

Figure 1-1: A simulation of traffic.

Figure 1-2: Simulated traffic at a lane closing, for various speed limits.

Figure 1-3: Various configurations of the Virtual Remotely Operated Vehicle (VROV) simulation.

Figure 1-4: A screen from Portal 2. The portals in this scene are the two circular doorways in two quite different places. You enter into one of them and exit the other, wherever they are.

Figure 1-5: The Service Rig Simulator, a game-like training simulator.

Figure 1-6: The console for Real Lives showing the player's character image, his characteristics, a script of his life as it occurs, and educational features.

Figure 1-7: Informational pop-ups provided by Real Lives.

Figure 1-8: FloodSim. Click on policies on the left and then on a region on the map to implement a policy in a region. The man on the right speaks to you, explaining each policy that you select.

Figure 1-9: One of the example puzzles from Foldit showing a tutorial panel. Note the score display at the top. If the player can reach a score of 8,850, then this puzzle is complete.

Figure 1-10: The Booze Cruise being played. (Left) The blurred motion perception imposed by the game. (Right) A typical scene. Note the time to completion counter at the top of the screen.

Chapter 2: Fundamentals

Figure 2-1: Consensus, conflict, correspondence and contrast among experts, used with permission (Shaw & Gaines, 1989)

Figure 2-2: The Royal Game of Ur, the oldest board game known

Figure 2-3: The Link trainer, a primitive flight simulator

Figure 2-4: The NASA LM Mission Simulator, a larger and more complex version of the Link trainer, was used for training astronauts.

Chapter 3: Going Digital

Figure 3-1: Word wars

Figure 3-2: The education view of the simulations - games continuum

Figure 3-3: The Technical View of the Simulations - Games Relationship

Chapter 4: How Programs Work

Figure 4-1: Flowchart symbols

Figure 4-2: Algorithm for washing hair

Figure 4-3: Algorithm for washing hair, version 2

Figure 4-4: Flowchart symbols, version 2

Figure 4-5: Automated telephone answering system

Figure 4-6: Mowing the lawn, version 1

Figure 4-7: Flowchart symbols, version 3

Figure 4-8: Module: do one row

Figure 4-9: Mowing the lawn, version 2

Figure 4-10: Module make <N> eggs

Figure 4-11: Algorithm: Make egg salad

Chapter 5: The Stuff of Which Simulations Are Made

Figure 5-1: Timeline of car simulation

Figure 5-2: The model for the continuous predator-prey simulation. (Lotka, 1925; Volterra, 1931)

Figure 5-3: General steps in the modeling and simulation process

Figure 5-4: Steps in the development of a simulation

Chapter 6: Randomness

Figure 6-1: The set of outcomes for the tossing of a pair of six-sided dice.

Figure 6-2: The complete set of outcomes for the toss of two coins.

Figure 6-3: Rand Corporation. 1955. A million random digits with 100,000 normal deviates, Glencoe, Ill., Free Press. Used with permission.

Figure 6-4: A bus stop, an example of a system that can be simulated. The real system (above right) must be abstracted into a model (bottom) before a simulation can be created.

Figure 6-5: (Left) A real group of pedestrians would have random orientations and spacing. (Right) Too much organization in a group of pedestrians looks strange and not real.

Chapter 7: A Single Server Queuing System

Figure 7-1: A hot dog cart, an example of a single server queuing system.

Figure 7-2: A hot dog cart abstracted into a model before the simulation is created.

Figure 7-3: Histograms of interarrival times of customers at a hot dog vendor. (a) 1,200 times measured and plotted shows the shape of what is called the distribution function. (b) Plotting 10,000 interarrival times shows that the curve becomes smoother. (c) Plotting a million samples has the histogram approaching the shape of a smooth continuous function.

Figure 7-4: Calculating the area under the probability density function between two points. (a) The area between t₀ and t₁ is the probability of the interarrival time falling into that range. (b) Using the average of the function value of D at the points t₀ and t₁ to make a rectangle, for which the area is easy to calculate.

Figure 7-5: Other probability distributions. (a) The well-known bell-shaped curve of the normal distribution. (b) The uniform distribution, which is what the values from a basic random number generator produce.

Figure 7-6: Converting a uniformly distributed random number into an exponentially distributed one. A random number generator yields a uniformly distributed number (left). The area under the curve between 0 and X equals X in this case, and is the probability of a value less than X being generated. On the right, the exponential distribution has a different shape, but the exponentially distributed variable Y that corresponds to X should have the same area under the curve between 0 and Y. In this case X=0.35 and Y=0.12.

Figure 7-7: How a queue works in a simulation. Top to bottom: A new arrival means the creation of a new record; the record is placed at the end of the queue, and contains a link to the record in front of it; when a departure occurs it leaves from the front of the queue; the remaining records all move ahead in the queue.

Figure 7-8: Flowchart for main loop

Figure 7-9: Flowchart for scheduling an event

Figure 7-10: Flowchart for an arrival

Figure 7-11: Flowchart for starting the server

Figure 7-12: Flowchart for a departure

Chapter 8: Visualization

Figure 8-1: A spring and weight system that will be the basis of a simulation. The distance the weight is moved from its starting position determines the force the spring exerts to restore the weight.

Figure 8-2: Raster graphics. (a) A toy that can be used as an excellent illustration of the principle of raster graphics. (b) A raster image is an array of numbers (top) that represents grey level values (center) or colors, that in turn can represent lines (bottom) and shapes. (c) A computer display and television screen both consist of sets of pixels close together. Each red, green, and blue bar together represents one pixel, and there are 158,000 pixels in a standard U.S. broadcast TV picture.

Figure 8-3: Graphical representations of the spring/weight system that forms the basis of our simulation.

Figure 8-4: Drawing a graph of the spring simulation results using Excel.

Figure 8-5: Different graphs of the same data, focusing on different aspects.

Figure 8-6: Using a logarithmic axis for graphing variables. (a) Graph of y = x². (b) The same graph, but with the vertical axis as log(x²). (c) Both axes on a log scale.

Figure 8-7: Building objects from polygons only approximates the true shape of a complex object, but this can be a pretty close approximation, and it is easier to do this way on a computer. (a) Drawing triangles that share edges can save space and time. (b) Folding along edges in the third dimension gives shape and volume to the object. (c) The more polygons that are used, the more accurately we can represent the true shape, in this case a sphere.

Figure 8-8: A viewing transformation maps the 3D coordinates of the object onto 2D coordinates of a viewing plane, taking into account the relative 3D position of the viewer. The viewing plane has 3D coordinates, but because they lie on a plane the third dimension can ultimately be removed, and the resulting 2D image mapped directly onto a computer screen.

Figure 8-9: The sequence of animation frames resulting from the simulation data in Table 8.1. There are 70 frames in one complete cycle, and this set is sampled every 7 frames.

Figure 8-10: Parts of an interactive simulation—a video game named The Booze Cruise. (left) The car used in the game. It consists of over 57,000 triangles. (right) The car rendered within the game. The complete context is now visible; there are about 20 objects present here.

Chapter 9: Verification and Validation

Figure 9-1: Position of the weight plotted as a function of time, as generated by the first version of the Simple Harmonic Motion simulation.

Figure 9-2: How a debugger looks while running. The computer program is in source code form and is executed statement-by-statement. The yellow arrow indicates the current statement, while red dots mark statements where execution will pause so that the programmer can examine variables.

Chapter 10: Sims and Games for Learning

Figure 10-1: Combining design

Figure 10-2: The gamified simulation design process

Figure 10-3: Bloom's Taxonomy (Image from Media Commons)

Figure 10-4: The original ADDIE model

Figure 10-5: Revised ADDIE model

Figure 10-6: Dick and Carey Systems Approach model

Figure 10-7: Morrison, Ross, and Kemp model

Figure 10-8: Rapid Instructional Design model

Figure 10-9: Serious Instructional Design process

Chapter 11: Simulation Tools

Figure 11-1: A GameMaker window shown during the construction of a spaceship object.

Figure 11-2: A screenshot from the Space Battle game, developed using GameMaker.

Figure 11-3: The UDK development environment in edit mode, showing a simple play volume under construction. The odd floating object is a light source.

Figure 11-4: What the player of the game would see from various locations. This is the game being constructed in Figure 11-3.

Figure 11-5: A screenshot from the Cannons game, built using Greenfoot.

Figure 11-6: A simple Egg Money Simulation

Figure 11-7: A more complex Egg Money Simulation

Figure 11-8: Egg Money Simulation plot

Figure 11-9: Stalin's Dilemma title screen

Figure 11-10: Stalin's Dilemma main screen

Figure 11-11: Stalin's Dilemma summary page

Figure 11-12: A GameMaker simulation of a single server queue (MM/1). The departure (D) is moving to the right and off of the screen, and the clients (A) are waiting in a queue for a hot dog.

Figure 11-13: An OpenModelica window showing part of the program development process for the bacterial growth simulation.

Figure 11-14: The result of the bacterial growth simulation expressed as a graph of population over time.

Figure 11-15: A VisSim program to compute solutions of the Logistic equation as a simulation of bacterial growth. This solves the same problem as does the program in Figure 11-14.

Figure 11-16: The result of running the simulation of Figure 11-15. This simulation is the same as the one shown in Figure 11-13, and the result is consistent with the result shown in Figure 11-14.

Figure 11-17: A single server queuing system (M/M/1) simulated in Simio. Arrows indicate flow of clients and the green triangle at the server is a client being served.

Figure 11-18: A single server queuing system simulated using ExtendSim. Customers are created on the left, flow into and through the queue into the server (vendor), and exit on the right.

Figure 11-19: What Second Life looks like using its standard client. This space is in fact intended as a theatre set for the play Waiting For Godot.

Figure 11-20: Educational simulation spaces in Second Life. (Upper left) Areva nuclear plant; (Upper right) Genome island; (Lower left) National space society; (Lower right) University of Southern Queensland law school.

Chapter 12: A Hospital Emergency Department (Single Server Queuing System II)

Figure 12-1: A hospital emergency department to be simulated. This design is based on one found in an existing hospital.

Figure 12-2: A single server queuing system with reneging.

Figure 12-3: A two-priority queue. Priority 1 clients get served first. Only when the priority 1 queue is empty can a priority 2 client get access to the treatment area.

Figure 12-4: Tandem queues representing stages in processing in a real system.

Figure 12-5: Adding ambulance entries

Figure 12-6: Arrivals to the ED for each hourly time period in a day (used with permission from I. Georgievskiy, Z. Gieogievskaya, & W. Pinney, 2008)

Figure 12-7: A graph of reneging probability versus mean time to renege for the single server queuing system of Chapter 7.

Figure 12-8: A single server queuing system with reneging implemented in ExtendSim. This is intended as a first draft of the triage portion of the ED simulation.

Figure 12-9: A two-priority queuing system

Figure 12-10: An ExtendSim implementation of a set of single server queuing systems in tandem. This represents the basic emergency department simulation.

Figure 12-11: Ambulance arrivals added to the tandem queuing system of Figure 12-10.

Figure 12-12: The final ED simulation

Figure 12-13: ExtendSim simulation to verify the method for splitting the interarrival time into two components by fraction.

Figure 12-14: An alternative two priority queuing system, suitable for collecting data.

Figure 12-15: A tandem queue arrangement designed to verify the implementation. It has been set up to measure average time that clients spend in the system.

Chapter 13: Boarding a Passenger Airliner (Decision Making)

Figure 13-1: One configuration of an Airbus A320 passenger aircraft. This is the version that will be used in the simulation.

Figure 13-2: Types of interference. (a) Aisle seat interference. (b) Middle seat interference. (c) Middle and aisle interference. (d) Aisle interference.

Figure 13-3: The path that a passenger must follow through the Airbus is shown here. Moving along the straightest path on the image is not possible in the real situation as there are bulkheads and seats in the way.

Figure 13-4: A finite state machine describing game states involving a fight with a dragon.

Figure 13-5: The FSA for the loading simulation. This makes the simulation much easier to finally implement.

Figure 13-6: The aircraft loading simulation as implemented in Greenfoot.

Chapter 14: Cooking Simulation and Food Safety

Figure 14-1: A modified process flow diagram for making bread. It is a version of the basic recipe showing more detail.

Figure 14-2: Modified process flow diagram for egg salad

Figure 14-3: Graphical assets built for the cooking simulation

Figure 14-4: Building a knife sprite and using it to create an animation sequence that gives a mincing action

Figure 14-5: The VideoMach program being used to create the mincing animation as an animated GIF file

Figure 14-6: Screenshot from the cooking/food safety simulation

Chapter 15: The Stock Market (Serious Game)

Figure 15-1: The base screen for the stock market game

Figure 15-2: The game screen showing Jacksonville Food Products as the current selection

Figure 15-3: The base screen showing share purchases and the amount spent on fees

Figure 15-4: Icons (sprites) used as logos for some of the fictional companies in the game. Each was created so as to look reasonable when displayed in the small size used on the game screen; each is a simple abstraction of a more complex idea.

Guide

Cover

Contents

Begining Reading

Pages

cover

toc

iii

iv

v

vii

ix

xi

xiii

xiv

xxix

xxx

xxxi

xxxii

xxxiii

xxxiv

1

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

265

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

393

394

395

396

397

398

399

400

401

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

The Guide to Computer Simulations and Games

Katrin Becker

J.R. Parker

The Guide to Computer Simulations and Games

Published by

John Wiley & Sons, Inc.

10475 Crosspoint Boulevard

Indianapolis, IN 46256

www.wiley.com

Copyright © 2012 by Katrin Becker and J.R. Parker

Published by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-118-00923-9

ISBN: 978-1-118-22180-8 (ebk)

ISBN: 978-1-118-23559-1 (ebk)

ISBN: 978-1-118-26046-3 (ebk)

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or website may provide or recommendations it may make. Further, readers should be aware that Internet websites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Not all content that is available in standard print versions of this book may appear or be packaged in all book formats. If you have purchased a version of this book that did not include media that is referenced by or accompanies a standard print version, you may request this media by visiting http://booksupport.wiley.com. For more information about Wiley products, visit us at www.wiley.com.

Library of Congress Control Number: 2011941731

Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

For Renate Bischof and Michael Becker, who saw us start this book, but who never got to see it finished.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!