
asdsds An Exploration of Procedural Content Generation for Top-Down Level Design Bachelor’s thesis in Computer Science and Engineering Johan Blomberg Rasmus Jemth August Lennar Robin Lilius-Lundmark Marcus Pettersson Johnsson Tove Svensson Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY UNIVERSITY OF GOTHENBURG Gothenburg, Sweden 2018 An Exploration of Procedural Content Generation for Top-Down Level Design Johan Blomberg Rasmus Jemth August Lennar Robin Lilius-Lundmark Marcus Pettersson Johnsson Tove Svensson c JOHAN BLOMBERG, 2018 c RASMUS JEMTH, 2018 c AUGUST LENNAR, 2018 c ROBIN LILIUS-LUNDMARK, 2018 c MARCUS PETTERSSON JOHNSSON, 2018 c TOVE SVENSSON, 2018 Supervisor: Staffan Björk Examiner: Olof Torgersson Bachelor’s thesis DATX02-18-17 Department of Computer Science and Engineering Chalmers University of Technology University of Gothenburg SE-412 58 Göteborg Sweden Telephone +46 (0)31-772 10 00 Cover: Four levels generated by four different PCG algorithms, in the game Fluky. From top left to bottom right: cellular automata, cyclic, TK and agent-based. Written in LATEX Gothenburg, Sweden, 2018 i Abstract Procedural Content Generation (PCG) is widely used in the game development industry to randomly generate various types of content. However, ensuring quality PCG is very hard, because of its inherent subjectivity; defining exactly what makes for enjoyable gameplay is difficult and depends on a wide range of different factors. We have therefore explored the concept of PCG, specifically procedural level generation, to gather observations and insights, and we present these in the report. The exploration has been performed by creating a simple game called Fluky and developing six different level generation algorithms for it. Among these observations are the importance of identifying levels of abstraction for an algorithm, and several aspects that may influence how enjoyable the generated content can be. Our resulting conclusions are very subjective, but not without merit, due to the extensive exploration and evaluation that has taken place. Page ii Acknowledgements We would like to thank Staffan Björk for his extensive help and support through- out the project. iii Contents 1 Introduction 1 1.1 Purpose . .2 1.2 Method . .2 1.3 Scope . .3 1.4 Ethical and societal aspects . .3 2 Background 4 2.1 Games . .4 2.2 Earlier work and research . .6 3 Theory 8 3.1 PCG algorithms . .8 3.1.1 Agent-based dungeon generation . .8 3.1.2 Cellular automata . .8 3.1.3 Cyclic PCG . .9 3.1.4 Grammar . 10 3.1.5 Search-based PCG . 10 3.1.6 Space partitioning . 11 3.2 Variations of PCG . 11 3.3 Methodology . 12 3.3.1 Software development processes . 12 3.3.2 Tools . 13 3.3.3 System architecture . 14 4 Process 15 4.1 Design document . 15 4.2 Implementation milestones . 15 4.3 Time plan . 16 4.4 Development tools . 17 4.5 System architecture . 17 4.6 Working in an agile manner . 19 4.7 PCG algorithms . 20 4.7.1 Agent-based approach . 22 4.7.2 Cellular automata approach . 24 4.7.3 Cyclic approach . 26 4.7.4 Grammar-based approach . 28 4.7.5 Space partitioning approach . 31 4.7.6 TK algorithm . 33 4.8 Evaluating the exploration of PCG . 35 iv CONTENTS 5 Result 37 5.1 The game: Fluky . 37 5.1.1 The player . 37 5.1.2 Enemies and items . 38 5.1.3 Menus and user interface . 39 5.2 PCG algorithms . 40 5.2.1 Agent-based approach . 40 5.2.2 Cellular automata approach . 45 5.2.3 Cyclic approach . 46 5.2.4 Grammar-based approach . 49 5.2.5 Space partitioning approach . 51 5.2.6 TK algorithm . 58 5.3 Observations and comparisons . 60 5.3.1 Working with the algorithms . 60 5.3.2 Quality of the generated content . 63 5.3.3 Summary of each algorithm . 70 6 Discussion 74 6.1 Result . 74 6.2 Method . 74 6.3 Validity and generalization . 75 6.4 Ethical and societal aspects . 76 6.5 Future work . 76 7 Conclusion 78 References 81 A Design Document I Page v 1. INTRODUCTION 1 Introduction The approach of procedurally generating levels for games is fairly common, and has been used in a lot of popular games during recent years. Procedural Content Generation (PCG) means that the content, e.g. game levels, is not handmade by a designer, but instead generated dynamically by a computer. This is achieved through the use of various algorithms[1, p.1]. The use of PCG is not limited to game levels – it can also be used to generate other kinds of content, such as music and stories[1, p.1]. The idea behind PCG is to employ one or several algorithms to generate con- tent. There are many different kinds of PCG algorithms, which fit different kinds of games. These algorithms take some kind of input, which could be a random number, or a set of parameters (e.g. difficulty) to generate a level. The generation itself is done through a set of rules and functions which defines how a level will be created, and what a desired level looks like. PCG is used in games for several reasons. It can for example be used to increase the replayability of a game, and it can be a way of not having to spend long precious hours on level design when working with a tight budget[1, p.14]. PCG can also be used for purely creative purposes, as it opens up new options for game mechanics or level design. One of the main challenges with PCG is not how much content one can gener- ate, but the quality of it. A clear example of this is the recent game No Man’s Sky (2016)[2], which advertised a procedurally generated universe so large that one person would not in their lifetime have enough time to visit even a fraction of all the available planets. Nevertheless, when the game was released, it was met with fierce criticism on account of all the virtually infinite planets looking almost exactly the same[3]. In other words, the amount of content created was huge, but the quality – in this case sufficient variation – was deemed to be very poor. Other examples of what could be considered to be within the concept of quality in PCG also include: whether a generated level can be completed as intended, if it is challenging enough while not being impossibly difficult, and if it is simply fun enough to play. Additionally, it would seem that the quality of procedurally generated content is so dependent on the game it is generated for, that it is impossible to evaluate separately. While PCG has been used in the video game industry for about 40 years[4, 5], and has become increasingly popular among game developers, this problem – the insurance of good quality – is far from being resolved. And due to the very subjective nature of the concept of quality content, perhaps it never will be. Page 1 1. INTRODUCTION 1.1 Purpose In this project, we explore the process of creating PCG systems for generating game levels by implementing several known algorithms. This includes investi- gating aspects of level generation that affect the quality of the final levels by comparing the levels generated by the different algorithms. Our intention with this project is to present the knowledge acquired during this exploration in a way that can help others who are about to develop a game using PCG for level generation to decide on what algorithm to use. 1.2 Method To be able to explore PCG, we decided to create a basic game that would use PCG to generate its levels. When deciding the elements and features of the game, we tried to keep it as simple as possible to enable us to direct our focus on the PCG. This was done because the purpose was to explore the process of creating PCG systems. Nonetheless, the features of the game were still impor- tant because without a variety of objects and features to choose from, a PCG algorithm would not be able to create something interesting. We decided on creating a game called Fluky, a two-dimensional dungeon crawler seen from above, where the player descends through procedurally generated lev- els of varying sizes. These levels contain different kinds of labyrinths, enemies, items and puzzles. To be able to explore PCG as thoroughly as possible, we decided to develop multiple different PCG algorithms, all of which would have the same objectives - to be able to generate a level for Fluky, and to utilize all the different game objects and features. This would allow us to analyze and compare different kinds of algorithms. We decided to use an Agile software development approach in this project (Sec- tion 3.3). This came naturally due to the fact that the project demanded work- ing with the PCG and the game back and forth. A design document was cre- ated where we specified as much of the game’s features as we could, which later could be divided into small tasks. In addition, we planned to distribute the development of the PCG algorithms so that each person in the group would be responsible for one of the algorithms. To summarize our results in order to make our gathered knowledge available, we decided to discuss our experiences from the development of the PCG algorithms. We agreed on a set of relevant attributes that would be interesting to investigate in each PCG algorithm, and evaluated how well the different approaches worked. Page 2 1.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages94 Page
-
File Size-