An Exploration of the Architecture of First Person Shooter Games
Total Page:16
File Type:pdf, Size:1020Kb
AN EXPLORATION OF THE ARCHITECTURE OF FIRST PERSON SHOOTER GAMES by Charu Prashar A thesis submitted to the School of Computing in conformity with the requirements for the Degree of Master of Science. Queen’s University Kingston, Ontario, Canada January 2014 Copyright ©Charu Prashar, 2014 Abstract First Person Shooter (FPS) games are one of the most popular game genres and have a history of over 2 decades. While there has been extensive research on such games, the focus has been limited to their analysis at an individual level. In this thesis, we present a comparative analysis of three first person shooter games - Doom, Quake3 and Cube from an architectural point of view. All of these games have come at different times in the history of first person shooter games, and thus possess different and unique features. We describe the process followed in deriving their architecture at various levels of abstraction – the file level, the subsystem level, the library/non- library level and the individual subsystem level for a given part of code. We conclude with a comparative analysis of the similarities and differences in the structure and architecture of the three gaming systems. ii Acknowledgements I would like to express my sincere gratitude to my supervisors Dr. Jim Cordy and Dr. Scott Grant for providing me with the opportunity and space to further expand my interests into the field of Software Engineering, and Computer Science more broadly. Dr. Cordy, thank you very much for the unconditional support and mentorship, which you have provided throughout the breadth of my time at Queen’s University. I would like to thank Dr. Thomas Dean for providing me with the knowledge and tools necessary to perform this research. I would also like to thank the wonderful people whom I met while my stay at STL – Scott, Gehan, Doug, Paul, Eric, Elizabeth, Karolina and Amal. A special thank you to Scott for his valuable guidance and support. Finally, a big thank you to my father for all his efforts, my mother for all the kind words and my sister for the unconditional love and support. During the course of this degree, I met a beautiful human being who is now my husband, thank you Umesh for making it even more beautiful. Thank you everyone. I conclude with the hope that our paths may cross again, and that, this is just a start to the journey, which lies ahead. “What lies behind us and what lies before us are tiny matters compared to what lies within us.” ― Ralph Waldo Emerson iii Table of Contents Abstract ............................................................................................................................................ ii Acknowledgements ......................................................................................................................... iii List of Figures ................................................................................................................................. vi Chapter 1 Introduction ..................................................................................................................... 1 1.1 Motivation .............................................................................................................................. 1 1.2 Contribution ........................................................................................................................... 2 1.3 Chapter Overview .................................................................................................................. 2 1.4 Summary ................................................................................................................................ 3 Chapter 2 Background ...................................................................................................................... 4 2.1 First Person Shooter Games ................................................................................................... 4 2.2 Doom ...................................................................................................................................... 5 2.3 Quake3 ................................................................................................................................... 6 2.4 Cube ....................................................................................................................................... 7 2.5 Tools ....................................................................................................................................... 7 2.5.1 CPPX ............................................................................................................................... 8 2.5.2 Grok ................................................................................................................................. 9 2.5.3 Graph Generation ............................................................................................................ 9 2.6 Summary ................................................................................................................................ 9 Chapter 3 Overview ....................................................................................................................... 11 3.1 File Level Call Graph ........................................................................................................... 12 3.2 Subsystem Level .................................................................................................................. 12 3.3 Library and Non-Library Subsystem level Graph ................................................................ 13 3.4 Individual Subsystem Graph- Renderer Graph .................................................................... 14 3.5 Comparison .......................................................................................................................... 15 3.6 Summary .............................................................................................................................. 16 Chapter 4 File Level Analysis ........................................................................................................ 17 4.1 Tools ..................................................................................................................................... 17 4.2 Extraction and Manipulation ................................................................................................ 19 4.3 Doom .................................................................................................................................... 21 4.4 Quake3 ................................................................................................................................. 21 4.5 Cube ..................................................................................................................................... 22 4.6 Summary .............................................................................................................................. 23 iv Chapter 5 Subsystem Level Analysis ............................................................................................. 24 5.1 Clustering of Files ................................................................................................................ 24 5.2 Software Architecture Transformations ............................................................................... 25 5.3 Manipulation and Graph Generation. ................................................................................... 25 5.4 Subsystem Level Graph for Doom ....................................................................................... 27 5.5 Subsystem Level Graph for Quake3 .................................................................................... 29 5.6 Subsystem Graph for Cube .................................................................................................. 31 5.7 Summary .............................................................................................................................. 32 Chapter 6 Library/Non-Library Division ....................................................................................... 33 6.1 Identification ........................................................................................................................ 33 6.2 Doom .................................................................................................................................... 34 6.3 Quake3 ................................................................................................................................. 36 6.4 Cube ..................................................................................................................................... 37 6.5 Other Methods ...................................................................................................................... 38 6.6 Non-Library Subsystems ...................................................................................................... 38 6.7 Summary .............................................................................................................................. 41 Chapter 7 Individual Subsystem- Renderer ................................................................................... 42 7.1 Introduction .......................................................................................................................... 42 7.2 Doom ...................................................................................................................................