3/4/2016 1 PA199 Advanced Game Design Lecture 2 Serious Games and Virtual Environments Dr. Fotis Liarokapis 2nd March 2016 Fotis Liarokapis • PhD in Computer Engineering – University of Sussex, UK • MSc in Computer Graphics and Virtual Environments – University of Hull, UK • BSc in Computer Systems Engineering – University of Sussex, UK My Research • Research areas: – Computer Graphics – Virtual Reality – Augmented Reality – Interactive Environments – Brain Computer Interfaces – Serious Games – User studies Contact Details • Email: – liarokap@fi.muni.cz • Telephone: – 549493948 • Office Location: – C411 • Office Hour: – Wednesday 13:00 to 14:00 Course Details • Prerequisites – Knowledge of computer graphics fundamentals • Lectures – Every Wednesday – Time: 14:00 to 16:00 – Location: A318 • Lab/Seminar – Every Wednesday – Time: 16:00 to 17:00 – Location: A215 Course Objectives • Demonstrate an understanding of the main mathematical concepts used in computer game design • Mathematically model all the components of an interactive computer game • Have a good understanding of the collision detection techniques that are used in computer games and apply them in practice • Design and implement an interactive computer game from scratch (i.e. not using a games engine) 3/4/2016 2 Syllabus • Introduction to advanced games design • Game engine architectures • Mathematics and physics for computer game design • Collision detection techniques for computer games • Fractal terrain generation • City and road modeling • Fluid modeling • Deformation techniques for games • Procedural texturing techniques • Animation for computer games • Crowd modeling techniques for game • Online virtual environments • Mobile game development • Advanced interaction techniques • Serious games Teaching Methods • Delivery of the material will be based on – Expositional lectures – Reinforced by computer demonstrations of the application of the material – Video demonstrations Assessment Methods • One Assignment – Will be assessed on: • Implementation (60%) • Report (40%) • Note that all the code must be provided in a CD/DVD or uploaded into the system • Exams… Plagiarism and Cheating • If you use an external resource cite it clearly! • Don’t do things that would be considered dishonest... if in doubt ask • Cheating earns you: – Fail in the class – Getting reported to the University – No exceptions Literature • D.F. Rogers and J.A. Adams. Mathematical Elements for Computer Graphics, Second Edition, McGraw Hill, 1990. ISBN: 0070535299 • D.H. Eberly. 3D Game Engine Design, A Practical Approach to Real-Time Computer Graphics, Morgan Kaufmann, 2001. ISBN: 1558605932 • A. Watt. 3D Computer Graphics, 3rd Edition, AddisonWesley, 2000, ISBN: 0201398559 • H. Pottman, A. Asperl, M. Hofer, A. Kilian. Architectural Geometry, Bentley Institute Press, 2007, ISBN: 978-1- 934493-04-5 • J. Schell. The Art of Game Design: A Book of Lenses, Second Edition Paperback, November 24, 2014, ISBN-13: 978-1466598645 Assignment 3/4/2016 3 Assignment - Task • Title – Develop from scratch an interactive 3D game • Task – The aim of the assignment is two fold: (a) develop a small game engine in C++ and (b) develop the graphics and physics components for an interactive 3D game • These components should that cover the general motion of a rigid body in three dimensional space, including issues of collision of bodies and their subsequent motion Game Engine - Task • Task – The aim of the game engine component is to implement from scratch a set of computer graphics classes that will be used for • Modelling the scene of the game • creating the physics components of different interactive computer games Game Engine - Specification • Based on the vector theory you should implement a 3D vector class in C++ which will be used as a basis for the rest of the course • Based on the matrices theory you should implement a 3×3 matrix class in C++ which will be used as a basis for the rest of the course • Finally you should implement a ray class in C++ Game Engine - Minimum Implementation • The basic implementation should include the following: – A 3D vector class, which you can call TVector, with three components (x, y and z) – A 3×3 matrix class, which you can call Tmatrix, with a two-dimensional array (i.e. double _Mx[3][3]) – A Ray class which will be based on the vector and matrix class Game Engine - Minimum Functionality • Unit vector (for vector class) • Magnitude of a vector (for vector class) • Invert a vector (for vector class) • Add two vectors (for vector class) • Subtract two vectors (for vector class) • Dot product vector (for vector class) • Cross product vector (for vector class) • Addition (for matrix class) • Subtraction (for matrix class) • Multiplication (for matrix class) • Transpose (for matrix class) • Inverse (for matrix class) • Calculate distance between two rays (for ray class) • Calculate distance between a ray and a point (for ray class) Game Engine - Extra Features • Extra credit will be given for adding more features to the classes 3/4/2016 4 Game Specification • The traditional 2D Breakout is one of the first interactive video games available on personal computers • The main idea is to knock down a set of 2D bricks using a 2D racket and a ball moving at constant speed • As soon as the ball collides with a brick then it vanishes • The goal of the game is to make all bricks disappear from the game arena • To increase the level of difficulty and game-play, later versions make use of multiple rackets and balls and vary the speed of the ball Game Specification . • The 3D Breakout, a cylindrical wall that consists of 3D bricks, exists in the middle of the simulation area Game Specification .. • A single player controls three curved bats, each positioned at an angle of 120 degrees to each other • The bats can move clockwise or anticlockwise using the keyboard arrow keys as input • The cylindrical wall is situated in the middle of the circle and is constructed by twelve bricks in such a way that it looks like a shaft • The main idea of the 3D game is to knock down all the 3D bricks and ‘destroy’ the well Game - Graphics Minimum Implementation • Colour – Bats, Ball and Bricks of the well • Manipulate the scene – Rotate, translate and scale • Change camera positions – Perspective view, top view and ball view • Transparency – Bats and bricks of the well • Add lighting to the game – Ambient light, diffuse light and specular light • Record the score • Texturing – Ground Game - Graphics Extra Features • Appropriate gaming scenario • Logo introduction page • Increase/decrease the speed of the ball • Use of textures to the bricks and bats • Add sound • Special effects Game - Physics Minimum Implementation • Construct from scratch a gaming environment – Three bats – One well – A ground – One ball • A real-time simulation of a ball • Collision detection between: – Ball-bats – Ball-well – Ball-Invisible wall 3/4/2016 5 Game - Physics Extra Features • Extra credit will be given for adding more features to the game • Some ideas for improvement include the following: – Friction – Weight – Make the ball bounce – Gravity – Deformations Report Structure • Title page • Contents • Abstract (or summary) • Introduction • Background theory • Methodology and results • Conclusions • References • Appendices What About Programming? • You are expected to know how to program but not be a guru • More emphasis is given in the algorithms and not in the programming skills – Which are easy to acquire • C++ will be the main programming environment • OpenGL will be used as the main graphics API Basic OO Style is Required • Focus is NOT in programming skills! Serious Games Essential Game Elements • Huizinga (1950) – Free activity, outside “ordinary” life, not “serious” – Absorbs the player – No material interest or profit – Distinct Boundaries of time and space • Caillois (1961) – Free (voluntary), separate (time and space) – uncertain, unproductive, governed by rules, make- believe • Salen and Zimmerman (2003) – A system in which players engage in an artificial conflict, defined by rules, that results in a quantifiableoutcome 3/4/2016 6 Serious Games - A Definition • Describes computer games that are not limited to the aim of providing entertainment that allow for collaborative use of 2D/3D spaces but are also used for different purposes in a number of application domains Serious Games - Another Definition • Bergeron, (2006): “a serious game is an interactive computer application, with or without a significant hardware component, that: has a challenging goal, is fun to play and/or engaging, incorporates some concept of scoring, and imparts to the user a skill, knowledge, or attitude that can be applied in the real world.” (pg. xvii) And Another Definition Laamarti, F., Eid, M., El Saddik, A. An Overview of Serious Games, International Journal of Computer Games Technology, Article ID 358152, 2014. Milestones in the History of Serious Games Laamarti, F., Eid, M., El Saddik, A. An Overview of Serious Games, International Journal of Computer Games Technology, Article ID 358152, 2014. Advantages of Games • Motivation/Engagement • Interactivity • Mechanic is the Learning – To beat the game is to learn the message/skill – But only when done right, very difficult – Beyond content to problem solving/systems learning • Adaptive to the Learner • Real-Time Assessment – Analytics/Data/Log Files Simulations and Games • Squire (2003) examples of uses: – Manipulate otherwise unalterable variables – Enable students to view phenomena from new perspectives – Observe systems behavior over time – Pose hypothetical questions to a system – Visualize a system in three dimensions – Compare simulations with their understanding of the system 3/4/2016 7 Goals of Serious Games • Flow (Csikszentmihalyi) – Balancing challenge • Scaffolding • “Transfer” Knowledge • System Understanding • Attitude/behavior change Mental state in terms of challenge level and skill level, according to Csikszentmihalyi's flow model Serious Games Taxonomy Another Taxonomy Laamarti, F., Eid, M., El Saddik, A. An Overview of Serious Games, International Journal of Computer Games Technology, Article ID 358152, 2014. Prensky’s Classification Content Learning activities Possible Game Styles Facts Questions, memorization Game show, competitions Skills Imitation, coaching, practice Role-play, adventure Judgment Reviewing cases, asking questions, making choices Role play, strategy Behaviours Imitation, feedback, practice Role playing games Theories Logic, experiment, questioning Simulation, game creation Reasoning Problems, examples Puzzles Process Analysis, deconstruction, practice Strategy, adventure Procedures Imitation, practice Timed, reflex games Creativity Play Puzzles, invention games Language Imitation, practice, immersion Role play, reflex games Systems principles, tasks, simulation Simulation games Observation Observing, feedback Concentration, adventure Communication Imitation, practice Role playing, reflex games More Than Just Games • A trend towards the development of more complex, serious games, which are informed by both pedagogical and game-like, fun elements – Application area of game engines and online virtual environments Early Example of Serious Games 3/4/2016 8 Serious Games Forms • Serious games can exist in the form of: – Simple web-based solutions – Online virtual environments – More complex ‘mashup’ applications – ‘Grown-up’ computer games – Mixed reality games – Mobile applications Typical Example Serious Games State-of-the-Art • The state-of-the-art in Serious Game technology is identical to the state-of-the-art in Entertainment Games technology – They share the same technical infrastructure Serious Games Uses • Learning & Education • Health Sciences • Advertising • Training • Science and Research • Art/Statement • Journalism Serious Games Strengths • The main strengths could be generalised as being in the areas of: – Communication – Visual expression of information – Collaboration mechanisms – Interactivity – Entertainment Requirements Gathering • Need to work with Subject Matter Experts (SME’s) to define learning/training content versus simply creating gameplay out of thin air – Game designers must work with instructional designers – Developers must effectively become SME’s themselves 3/4/2016 9 Challenges • Access to SME’s • Access to environments • Access to equipment • Finding SME’s fully knowledgeable in training content • Creating SGs without simply creating a simulation Serious Games Views • Entertainment is more important! – While pedagogy is an implicit component of a SG it should be secondary to entertainment • Education and pedagogy is more important! – Design methodologies for the developmentof games incorporating pedagogic elements Anderson, E.F., McLoughlin, L., Liarokapis, F., Peters, C., Petridis, P., de Freitas, S. Developing serious games for cultural heritage: a state-of-the-art review, Virtual Reality, Springer, 14(4): 255-275, 2010. (ISSN: 1359-4338) Engagement / Fun • … with what & why? • In Traditional Teaching: – Engagement with Content is Primary • In Entertainment Games: – Engagement with Tasks are Primary • To a Professional Educator: – Learning is Predictable • To a Professional Game Developer: – Fun is Predictable Serious Game Design • The Context and Needs determine objectives • The Learning Objectives need to be stated • The Player Motivation needs to be defined • The Ideal Learning Environment for this context, objectives, and desired outcomes must be defined • The Learning Environment must dictate % game play and % authentic simulation Affective/Cognitive Balance • Affective presentation (game) effective when content knowledge is low and content density is also low • As content knowledge goes up then content density may rise but authenticity and functionality (Sim) must also rise The Player Experience • Cognition – changes in cognitive and affective domains • Metacognition –all that the player is aware of including: – vision, audio, olfactory, kinesthetic, and haptic senses, plus an awareness of time, objects, & content • Choice – perception of: – degree of control, and access to variables and information during game play • Action – perception that they can do things such as: – interact with objects and elements within the game, have control of objects, elements, and own identity, have mobility to move through the environment, manipulate control interface to effect change 3/4/2016 10 Game Structure • Content – The story, the context, the amount of information available, the degree of concreteness or abstraction of the content, the authenticity, and its variability • Environment – The virtual spaces and boundaries, the objects within these spaces and their functionality capabilities, plus any time limits imposed by the game • Affordances – The abilities made for the player to change, manipulate, the objects, information, environment, their identity & capabilities, and/or to seek alternative information Experiential Mode Triage Four Dimensional Framework Four elements that can be used as design and evaluation criteria for the creation of serious games Exploratory Game-Based Learning Model Serious Games Multidimensional Interoperability Framework http://seriousgamessociety.org/index.php/2014-07-11-14-15-51/explore/134-media/388-serious-game-interoperability-the-good-the-better-a-the-optimal Conceptual Framework http://www.slideshare.net/AmriYusoff/vsgames2010-v3 3/4/2016 11 Serious Games Markets 2007 Self-Paced E-Learning: $13.6 Billion 5-year annual growth rate: 22% 2006 Real-Time Collaboration-Based Learning: $2.6 Billion 5-year annual growth rate: almost 35% Real-time Collaboration-based Learning is fastest growing learning technology in US Academic Impact Serious games growth in the research field based on surveyed papers in ACM digital library and IEEE Xplore Laamarti, F., Eid, M., El Saddik, A. An Overview of Serious Games, International Journal of Computer Games Technology, Article ID 358152, 2014. Gamification • Gamification is the application of game-design elements and game principles in non-game contexts • Gamification commonly employs: – Game design elements – Organizational productivity – Flow – Learning – Employee recruitment and evaluation – Ease of use and usefulness of systems – Physical exercise – Etc https://en.wikipedia.org/wiki/Gamification Gamification vs Serious Games http://www.gamified.uk/gamification-framework/differences-between-gamification-and-games/ Case Studies Serious Games in Health Second Health NPL, Imperial, SGI http://www.seriousgamesinstitute.co.uk/ Triage Trainer TruSim, TSB, VEGA Group, Birmingham, SGI Preview St Georges, JISC, SGI NanoMedicine Playgen, SGI 3/4/2016 12 NanoMedicine Video Triage Trainer Case Study • The game is set at the scene of an explosion in a busy high street – Player’s job is to prioritise the multiple casualties for treatment – Trainees must follow set protocols to make decisions http://www.trusim.com/?page=CaseStudy Triage Trainer Video RomaNova Case Study • Serious game taking place in a replica of the antique city of Rome • Aim is to teach history to young audiences – By means of an original engaging experience where the player is immersed in a crowd of virtual Romans Doulamis, A., Liarokapis, F., Petridis, P., Miaoulis, G. Serious Games for Cultural Applications, Intelligent Computer Graphics 2011, Studies in Computational Intelligence, Plemenos, D., Miaoulis, G. (Eds.), Springer-Verlag, Volume 374/2012, 97-115, 2011. (ISBN: 978-3-642-15689-2) Learning in Roma Nova • Levels of detail and levels of simulation for: – Crowd modelling – Animation techniques for cultural heritage – Pedagogical embedded conversational agents • Seeking to advance information transfer through immersive ‘living background’ Level of Interaction Framework • The LoI is a framework designed to model the interactions between the player and virtual characters, in a serious games perspective 3/4/2016 13 Roma Nova Video Online Virtual Environments Virtual Environments (VEs) • VEs are synthetic representations of reality – Focused on the experience that the users of these worlds have – Can be used by distributed groups of large numbers of players, and are immersive and interactive • Many types exist – Focus is on Online Virtual Environments • Sometimes called ‘Collaborative Virtual Environments’ Virtual Environments Experience • Sensory Feedback – information about the virtual world is presented to the participant’s senses – Visual (most common) – Audio – Touch – Smell • Interactivity – the virtual world responds to the user’s actions – Computer makes this possible – Real-time Walking Experiment at UNC – Chapel Hill Online VEs • New ways of exploring webbased applications – Evolution of telecommunication technologies, web-services and software engineering • Great range of different online virtual environments – More than 100 different ones Collaborative Virtual Environments • “Collaborative Virtual Environments (CVEs) are online digital places and spaces where we can be in touch, play together and work together, even when we are, geographically speaking, worlds apart… • In CVEs we can share the experience of worlds beyond the physical” [Churchill/Snowdon/Munro 2001] 3/4/2016 14 Key Components • Graphic engines • Displays – Monitors, HMDs, etc • Interaction devices – Keyboard, mouse, trackers, etc • Processing Systems • Data Network Types of VEs • High realism online virtual gaming platforms – Custom, more experimental prototypes – Online game engines • Alternative online virtual environments – Second Life, Active Worlds, OLIVE platform, etc Typical Issues • Some common research issues include: – What is the best virtual environment – What is the level of realism and interaction required – How best to design activities and experiences for learners Basic Architecture Common Virtual World Current Challenges • Network Bandwidth/Latency • Heterogeneity • Distributed Interaction (real-time) • Resource Management - Scalability Networking Concepts • Latency – Amount of time to transfer a bit of data from one point to another – Latency has a direct impact on interaction inside the virtual world – The designer cannot really reduce latency • It is possible to hide it or reduce its impact 3/4/2016 15 Networking Concepts . • Latency - causes: – Physical limitations: speed of electromagnetic waves in the transmission material • Approximately 8.25 msec per time zone – Delays introduced by the endpoint computers – Delays introduced by the network itself • Routers Networking Concepts .. TCP Small number of users Limited data requirements Typically client-server configuration UDP Higher data requirements Used both in client-server and peer-to-peer configurations. IP Broadcasting Small peer-to-peer Net VEs with high data requirements and time sensitive delivery. IP Multicasting Large peer-to-peer NetVEs, be careful with routers. Architectures • Client-Server Systems – Logical architecture Server Client 1 Client 2 Client n… Architectures . • Client-Server Systems – Physical architecture with phone lines Server Client 1 Client 2 Client n… Phone Line Phone Line Phone Line Architectures .. • Client-Server Systems – Physical architecture on a LAN Client 1 Client 2 Client n … Server Architectures … • Client-Server Systems – The Server can become a bottleneck. – What are the advantages? The server can decide:: • Which clients should receive a message. • What protocol to use with different clients. • Sub-sample messages to slow users. • Keep statistics 3/4/2016 16 Architectures …. • Multiple-Server Architectures Server 1 Client 1 Client 2 Client n… Client 1 Client 2 Client n Server 2 … Architectures ….. • Multiple-Server Architectures – Several servers have the following advantages: • System scales better • Communication between clients attached to different servers takes longer • Key issue: how to assign clients to servers? Architectures ….. • Peer-to-peer NETWORK Client 1 Client 2 Client n Architectures …… • Peer-to-peer – “Network” will be: • Broadcast • One or multiple multicast groups – In the case of multicast groups: • Area of Interest Management: assign different users to different multicast groups, based on some criteria Technology Comparison Technology Speed (Kbps) Min # players Max # players Modem 56 1 6 DSL 1500 39 163 T-1 1500 39 163 10BT 10,000 263 1085 100BT 100,000 2630 10851 Second Life – An example • A typical illustration of online virtual environments is Second Life – 13 million registered accounts worldwide • An open source approach exists – OpenSim 3/4/2016 17 Second Life Video https://www.youtube.com/watch?v=XQkYBbM9YyM Case Studies OpenSim Case Study • Online Virtual Learning Environment – OpenSim • Open source • Creates dynamic online VEs • Allows customisation • Supports different database systems • Aim: – Teach computer graphics University UG students Jaligama. V, Liarokapis, F. An Online Virtual Learning Environment for Higher Education, Proc. of the 3rd International Conference in Games and Virtual Worlds for Serious Applications (VS-Games’11), IEEE Computer Society, Athens, Greece, 4-6 May, 207-214, 2011. (ISBN: 978-0-7695-4419-9) Virtual Learning Environment User-System Interaction Administrator Privileges 3/4/2016 18 Online VE Location Modelling Virtual Fun Zone Online Teaching • A 2nd year computer science undergraduate module has been ported into our online virtual learning environment – Called ‘3D Graphics Programming’ and introduces 3D computer games graphic programming fundamentals to the students • The theoretical part covers issues such as textures, global illumination and the simulation of physical phenomena Online Virtual Classroom User Evaluation • Two-stage evaluation with 20 participants was performed and qualitative and quantitative feedback was recorded – Participants ranged from students to business professionals – Evaluation lasted for approximately 1 hour per participant • All end-users had some experience with computer games, console games or online virtual environments 3/4/2016 19 Qualitative Evaluation • On the positive side, most participants noted that the platform is quite enjoyable and has a lot of potential for remote learning • On the negative side, some participants did not like the idea of spending some time to familiarise with the platform Feedback Distance Learning Experience Virtual Learning Experience Audio-Visual Effectiveness Other Virtual Activities Video 1 Video 2 Video 3 Videos • http://www.youtube.com/watch?v=rZ5vzsNugV Q&feature=mfu_in_order&playnext=1&videos= _6TNubnT0To • http://www.youtube.com/watch?v=HI7nrORinrg &feature=mfu_in_order&list=UL • http://www.youtube.com/watch?v=NGf9BTGsA B8 • http://www.youtube.com/watch?v=a5itQRi7Sog &feature=mfu_in_order&list=UL 3/4/2016 20 VS-Games Conferences • VS-Games 2009, Coventry, UK – http://ieeexplore.ieee.org/xpl/mostRecentIssue.js p?punumber=5116537 • VS-Games 2010, Braga, Portugal – http://ieeexplore.ieee.org/xpl/mostRecentIssue.js p?punumber=5458389 • VS-Games 2011, Athens, Greece – http://ieeexplore.ieee.org/xpl/mostRecentIssue.js p?reload=true&punumber=5962074 Conclusions • Serious games are becoming more and more popular – Expected to get ‘serious’ profits in the games industry • Computer graphics technology is the same – For games and serious games • More research is required in many areas – HCI, personalisation and pedagogy Bibliography • de Freitas, S. & Maharg, P. (Eds) (2011) Digital Games and Learning. London and New York: Continuum Press • de Freitas, S. & Oliver, M. (2006). How can exploratory learning with games and simulations within the curriculum be most effectively evaluated? Computers and Education, 46 (3): 249-264 • Michael, D. & Chen, S. (2006) Serious Games: Games that Educate, Train and Inform. Boston, MA: Course Technology PTR • Salen, K & Zimmerman, E. (2003) Rules of Play, MIT Press • Bergeron, B. (2006) Developing Serious Games, Thomson Questions