Copyright by Lane Thomas Holloway 2016 the Dissertation Committee for Lane Thomas Holloway Certifies That This Is the Approved Version of the Following Dissertation
Total Page:16
File Type:pdf, Size:1020Kb
Copyright by Lane Thomas Holloway 2016 The Dissertation Committee for Lane Thomas Holloway certifies that this is the approved version of the following dissertation: Modeling and Formal Verification of Gaming Storylines Committee: Donald Fussell, Supervisor Anne C. Elster, Co-supervisor Jacob Abraham Craig Chase Risto Miikkulainen Modeling and Formal Verification of Gaming Storylines by Lane Thomas Holloway, B.S.E.E.; M.S. DISSERTATION Presented to the Faculty of the Graduate School of The University of Texas at Austin in Partial Fulfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY THE UNIVERSITY OF TEXAS AT AUSTIN May 2016 Dedicated to my family. Acknowledgments I wish to thank the multitudes of people who helped me. First and foremost my two advisors: Profs. Donald S. Fussell and Anne C. Elster who have put up with me and my stubbornness and taught me the black arts of academic research over what seems to be a lifetime. Next, the rest of my committee: Profs. Craig Chase, Jacob Abraham, and Risto Miikkulainen participating on the committee and providing valuable feedback. I’d like to thank colleagues from the gaming industry whom include: Royal McGraw for insight and details into how writers think about and test storylines in production games. Rich Vogel for answering questions at the be- ginning of my quest toward a PhD that allowed this research to move forward. Matt Boudreaux for providing a developer’s perspective on how story a↵ects game development. Jason Frueh, a former QA developer for BioWare who helped refine and enlighten me to the software development life cycle of large games as such Star Wars: The Old Republic. I’d like to thank Nadeem Malik, Walid Kobrosly, and Fred Hudson (my Master’s advisor) for pushing me down the path of becoming a PhD. Last, but not least, my family for putting up with me during this colossal undertaking. v Modeling and Formal Verification of Gaming Storylines Publication No. Lane Thomas Holloway, Ph.D. The University of Texas at Austin, 2016 Supervisors: Donald Fussell Anne C. Elster Video games are becoming more and more interactive with increasingly complex plots. These plots typically involve multiple parallel storylines that may converge and diverge based on player actions. This may lead to situa- tions that are inconsistent or impassable. Current techniques for planning and testing game plots involve naive means such as text documents, spreadsheets, and critical path testing. Recent academic research [1] [2] [3] examines the design planning problems, but neglect testing and verification of the possible plot lines. These complex plots have thus until now been handled inadequately due to a lack of a formal methodology and tools to support them. In this dissertation, we describe how we develop methods to 1) charac- terize storylines (SChar), 2) define a story line description language (SDL), and 3) create a storyline verification tool based in formal verification techniques (StoCk) that use our SDL as input. SChar (Storyline Characterization) help game developers characterize the category of story line they are working on vi (e.g. linear, branching and plot) through a tool that give a set of guided ques- tions. Our SDL allows its users to describe storylines in a consistent format similar to how they reason about storylines, but in such a way that it can be used for formal verification. StoCk accepts storylines, described in SDL, to be formally verified using SPIN for errors. StoCk is also examined in three com- mon use cases found in the gaming industry used as a tool 1) during storyline creation 2) during quality assurance and 3) during storyline implementation. The combination of SChar, SDL, and StoCk provides designers, writers, and developers a novel methodology and tools to verify consistency in large and complex game plots. vii Table of Contents Acknowledgments v Abstract vi List of Tables xii List of Figures xiii Chapter 1. Introduction 1 1.1 Motivation . 1 1.1.1 Do players care about engaging stories? . 2 1.1.2 Managing Design Complexity . 3 1.1.3 Preventing Inconsistent Game Plots . 5 1.1.4 Game Development and Tooling . 7 1.2 Research Questions . 7 1.3 Contributions . 8 1.4 Outline . 9 Chapter 2. Background and Related Work 11 2.1 Storyline Models . 11 2.1.1 Linear Storyline . 12 2.1.2 BranchingandFoldbackStoryline . 13 2.1.3 Threaded Storyline . 14 2.1.4 DynamicHierarchicalStorylines . 17 2.1.5 Emergent Storyline . 19 2.2 Formal Verification . 20 2.2.1 Theorem Provers . 20 2.2.2 SAT Solvers . 23 2.2.3 Model Checking . 25 viii 2.3 How Storylines are Implemented in Current Games and Inter- active Dramas . 28 2.3.1 Search-based Drama Management and Facade . 28 2.3.2 AIControlledEmergentStorylines . 30 2.3.3 TriggersandActions. 32 2.4 Software Development Process for Video Games . 33 2.4.1 Software Development Life Cycle . 36 Chapter 3. Modeling Techniques 41 3.1 Finite-StateMachines. 41 3.2 Petri-nets . 45 3.3 Condensed Graphs . 47 3.4 UMLStateMachines ....................... 51 3.5 SAGA-StoryasanAcyclicGraphAssembly . 52 Chapter 4. Categorizing and Describing Storylines 53 4.1 SChar - Storyline Characterization Framework . 53 4.2 Our Storyline Description Language . 56 4.2.1 Arc ............................. 56 4.2.2 Plot Point . 57 4.2.3 Plot Object . 58 4.2.4 Conditions . 59 4.2.5 Branch . 60 4.2.6 Quest . 60 4.2.7 Side Quests . 62 4.2.8 Atomic Sections . 63 4.3 Implementation Issues . 64 4.4 SDL Output . 68 Chapter 5. StoCk: Storyline Checker 71 5.1 Formal Verification Methods and Their Trade-O↵s . 72 5.2 Direct Finite State Machines Representation versus Leveraging Pomelea’sFSMAbstractions . 74 5.2.1 Using a Non-deterministic Finite State Machine . 74 ix 5.2.2 LeveragingPromela’sAbstractions . 79 5.2.3 Analysis........................... 80 5.3 Implementation of StoCk . 80 5.4 Running StoCk . 84 5.5 ReturningResultstotheUser . 85 Chapter 6. StoCk Case Studies 86 6.1 QualityAssuranceforWriters . 87 6.1.1 WheretheDataWasObtained . 87 6.1.2 HowtheSDLFilesWereCreated. 88 6.1.3 Findings .......................... 90 6.2 QualityAssuranceforImplementation. 95 6.2.1 WheretheDatawasObtained . 95 6.2.2 SDLFileCreation ..................... 96 6.2.3 Findings .......................... 96 6.3 Fallout 3 Quest Developer . 100 6.3.1 WhereDatawasObtained . 100 6.3.2 SDLFileCreation . 100 6.3.3 Findings .......................... 101 Chapter 7. Conclusion and Future Work 109 7.1 Future Work . 110 Appendices 112 Appendix A. Exploratory Survey 113 Appendix B. History of Storytelling 115 B.1 LiveActionStorytelling. 115 B.1.1 TraditionalStorytelling . 115 B.1.2 Improvisational Theater . 116 B.1.3 Tabletop Role-Playing . 116 B.1.4 Live-ActionRole-Playing . 117 B.2 Computational Story Creation . 117 x B.2.1 TALESPIN......................... 118 B.2.2 MINSTREL ........................ 118 B.2.3 BRUTUS.......................... 119 B.3 From Computation Story Creation to Interactive Drama . 119 B.3.1 Interactive Storytelling System . 119 Appendix C. Video Game Ontology 120 C.1 GameplayPoints-of-View . 120 C.2 NumberofPlayers......................... 122 C.3 Game Types . 123 C.3.1 ActionGames ....................... 123 C.3.2 AdventureGames . 124 C.3.3 PuzzleGames ....................... 125 C.3.4 Role Playing Games . 125 C.3.5 Simulation Games . 126 C.3.6 Sports Games . 126 C.3.7 Strategy . 127 C.3.8 Hybrids........................... 127 C.4 Examples of Number-of-players, Game types and plots . 128 C.4.1 Single and multi-player action linear plot . 128 C.4.2 Single player RPG linear plot . 129 C.4.3 Single player Hybrid (RPG/Action) sandbox plot . 129 C.4.4 Massively Multiplayer RPG branching and foldback plot 130 Bibliography 131 Index 138 Vita 139 xi List of Tables 1.1 Research Questions to Contributions Matrix . 9 2.1 Recent games and their story line models . 12 2.2 DevelopmentPlanGoalsMatrix . 37 4.1 Categorized Games . 56 6.1 Quests with Interactions . 91 6.2 Fallout3QuestsandAvergeTimetoValidate . 94 xii List of Figures 2.1 Linear Plot Example . 13 2.2 BranchingandFoldbackStorylineExample. 15 2.3 A Threaded Storyline Example . 16 2.4 ADynamicHierarchicalExample . 18 2.5 Example of Search Based Drama Management Algorithm based on [77] . 29 2.6 Example Facade Graph based on [80] . 31 3.1 ExampleFiniteStateMachine. 42 3.2 Example Petri-net . 45 3.3 Example Condensed Graph . 49 4.1 SCharDecisionFlowchart . 54 4.2 ExampleArcandPlotPoint. 57 4.3 Example Plot Object and Condition . 59 4.4 Example Branch . 60 4.5 Example Parallel Quest . 61 4.6 Example Serial Quest . 62 4.7 Example Side Quest . 63 4.8 Example Atomic Section . 63 5.1 Parallel Quest Example modeled in the SDL . 76 5.2 ParallelQuestExampleasanNDFSM . 77 5.3 ErrormessageforFSM...................... 78 5.4 ErrorTrailforFSM........................ 79 6.1 Fallout 3 Storyline based on Guides and FAQs . 89 6.2 Fallout 3 Quests as Implemented . 97 6.3 Fallout3QuestsAssummingCommonGlitches . 99 xiii 6.4 IntialThreeDog’sUltimateStashQuest . 101 6.5 Second Attempt of Three Dog’s Ultimate Stash Quest . 102 6.6 Player locating note to start quest . 103 6.7 Player beginning quest . 103 6.8 Contents of note . 104 6.9 AskingThreeDogabouttheweaponsstash . 104 6.10 Three Dog’s Response to the question . 105 6.11 AskingDoctorLiabouttheweaponsstash . 105 6.12 Doctor Li’s Response to the question . 106 6.13 The player about to pick up Three Dog’s Ultimate Stash note 106 6.14 The player completing the quest . 107 6.15 Contents of Three Dog’s Ultimate Stash Log . 107 xiv Chapter 1 Introduction In the past five years, the video game market has grown from $65 billion dollars in total revenue to $83.6 billion dollars in 2014 with a 2015 estimate exceeding $100 billion dollars12.Thecostofproducingavideogameisonthe order of $100 million and involves teams of over 100 (sometimes up to 600) developers, artists, managers, and marketers 34.Fromthemainframesofthe past to the video game consoles of today, games have always taken advantage of computational power for improved, refined, and realistic graphics, physics, and gameplay; however, the storylines have been left in the dark ages [4].