A Language for Game Design and Coreography
Total Page:16
File Type:pdf, Size:1020Kb
Masters in Informatics Engineering Thesis/Internship Final Report A Language for Game Design and Coreography Nuno Barreto [email protected] Professor Adviser: Licínio Roque Date: July 3rd of 2013 A Language for Game Design and Choreography Abstract This final report details a proposal approach to model concurrent actors’ behaviors and choreographies in the context of video games and simulations, using Petri Nets as a base for its modeling language. Petri Nets have already been used to model some video-game aspects such as game design because they provide a simple and easy way to learn to model interactive systems as well as a means of model validation, through simulation. This proposal is complemented by an architectural conceptualization that allows the run- time editing of said language, alongside its execution on a pre-existing game engine. As such, it involves a visual editor application, a Petri Net simulation/execution mechanism and an interoperable communication structure that permits linking the editor, and execution module, with an arbitrary game, or simulation, engine. To validate this proposal, a proof of concept game prototype and usability tests were conducted issuing positive results. Keywords “Complex Systems” “Behavior Modeling” “Game Design” “Simulation” “Software Architecture” “Petri Nets” “Visual Language” i A Language for Game Design and Choreography Table of Tables Table 1 SDL Specs .............................................................................................................................. 3 Table 2 XNA Specs ............................................................................................................................. 3 Table 3 Flash Specs ............................................................................................................................. 4 Table 4 HTML5 Specs ........................................................................................................................ 5 Table 5 Scratch Specs .......................................................................................................................... 5 Table 6 Havok Behavior Specs .......................................................................................................... 6 Table 7 Box2D Specs .......................................................................................................................... 6 Table 8 AgentSheets Specs ................................................................................................................. 7 Table 9 ToonTalk Specs ..................................................................................................................... 7 Table 10 UDK Specs ........................................................................................................................... 8 Table 11 Ogre Specs ............................................................................................................................ 9 Table 12 Flixel Specs ........................................................................................................................... 9 Table 13 Unity Specs ......................................................................................................................... 10 Table 14 CryEngine Specs ................................................................................................................ 11 Table 15 RPG Maker XP Specs ....................................................................................................... 11 Table 16 Kodu Specs ........................................................................................................................ 12 Table 17 Stencyl Specs ...................................................................................................................... 12 Table 18 Little Big Planet level editor Specs .................................................................................. 13 Table 19 Petri Net Editor Comparison .......................................................................................... 19 Table 20 MMO Architecture comparison ...................................................................................... 22 Table 21 Network Middleware comparison .................................................................................. 23 Table 22 Language Grammar ........................................................................................................... 29 Table 23 Average Resource Usage per Test Scenario .................................................................. 60 Table 24 Demographic information of the test subjects ............................................................. 78 Table 25 Time per Task per User .................................................................................................... 78 Table 26 Difficulty per Task per User ............................................................................................ 79 ii A Language for Game Design and Choreography Table of Figures Figure 1 A simple Petri Net ............................................................................................................. 17 Figure 2 Design Science Research steps ......................................................................................... 24 Figure 3 Project Timeline ................................................................................................................. 25 Figure 4 Prototype Iterations ........................................................................................................... 26 Figure 5 Project's Milestones ........................................................................................................... 27 Figure 6 Effective Work Schedule .................................................................................................. 28 Figure 7 Representation of a Game Model according to the language’s spectification .......... 30 Figure 8 Mockup of the petri net editor's GUI ............................................................................. 31 Figure 9 Communication among Editor components ................................................................. 32 Figure 10 Petri Net Editor Class Diagram. .................................................................................... 33 Figure 11 Petri Net Engine Architecture Diagram ....................................................................... 34 Figure 12 Petri Net Engine Class Diagram .................................................................................... 35 Figure 13 Communication between Animator and Petri Net Engine ....................................... 36 Figure 14 Communication between Game Context and Petri Net Engine .............................. 36 Figure 15 Communication between Input and Petri Net Engine .............................................. 37 Figure 16 Communication between Pathfinder and Petri Net Engine ...................................... 37 Figure 17 Communication between Renderer and Petri Net Engine ........................................ 38 Figure 18 Communication between Sound and Petri Net Engine ............................................. 38 Figure 19 Deployment Diagram of the Architecture ................................................................... 40 Figure 20 Static Perspective on the Architecture of the Application. ........................................ 40 Figure 21 Messages' XML syntax in XSD ...................................................................................... 41 Figure 22 The system in a P2P environment ................................................................................. 42 Figure 23 The system in a client/server environment .................................................................. 42 Figure 24 System startup sequence diagram .................................................................................. 43 Figure 25 Sending a token from Unity to Input Place sequence diagram ................................. 44 Figure 26 Sending a token from Output Place to Input Place sequence diagram ................... 44 Figure 27 Invoking a script in Unity sequence diagram ............................................................... 45 Figure 28 Update the editor with available channels/scripts sequence diagram ...................... 46 Figure 29 Orphibs screenshot .......................................................................................................... 47 Figure 30 Orphibs' behavior model during the simulation’s execution ..................................... 47 iii A Language for Game Design and Choreography Figure 31 Screenshot of the test game “Spheres of Steel” as created by one of the subjects 52 Figure 32 Total Time per User ........................................................................................................ 53 Figure 33 Average Duration per Task ............................................................................................ 53 Figure 34 Average Difficulty per User ............................................................................................ 54 Figure 35 Average Difficulty per Task............................................................................................ 54 Figure 36 Frequency of issue types ................................................................................................. 55 Figure 37 Issue Frequency by Task ................................................................................................