Procedural Level Generator with Unity Integration
Procedurální generátor úrovní s integrací pro Unity
diploma thesis (DEFENDED)

View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/120962Identifiers
Study Information System: 223141
Collections
- Kvalifikační práce [11342]
Author
Advisor
Referee
Černý, Vojtěch
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Artificial Intelligence
Department
Department of Software and Computer Science Education
Date of defense
14. 9. 2020
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
English
Grade
Excellent
Keywords (Czech)
počítačové hry, procedurální generování obsahu, herní úrovně, UnityKeywords (English)
computer games, procedural content generation, levels, UnityProcedurální generování obsahu je technika, která se v některých videohrách používá mimo jiné pro zvýšení zážitků z opakovaného hraní. V naší předchozí práci (Nepožitek, 2018) jsme implementovali algoritmus pro procedurální generování 2D úrovní. Na vstupu dostane algoritmus množinu povolených tvarů místností a graf, který říká, jak mají místnosti být mezi sebou propojené. Výstupem algoritmu je půdorys, který obsahuje všechny zadané místnosti a respektuje jejich propojení. V první částí práce řešíme některé nedostatky naší předchozí práce. Původní algoritmus je rozšířen o několik vylepšení, například o lepší podporu propojení místností krátkými chodbami, nebo třeba o možnost generování takzvaných plošinovek. Dále se zaměřujeme na zrychlení algoritmu a zkoumáme, jak se rychlost algoritmu liší na různých vstupech. V druhé částí práce se zaměřujeme na integraci algoritmu do herního engine Unity. A v poslední části práce ukazujeme, že náš algoritmus je schopen produkovat úrovně podobné těm, které lze nalézt ve dvou populárních hrách - Enter the Gungeon a Dead Cells. Výsledkem práce je algoritmus, který je rychlejší než jeho předchozí verze, obsahuje několik vylepšení a lze použít v herním frameworku Unity.
Procedural content generation is a method that is sometimes used in video games to increase their replayability. In our previous work (Nepožitek, 2018), we implemented an algorithm for procedural generation of 2D dungeons, with the main focus on giving game designers complete control over the structure of generated levels. The algorithm takes a set of user-defined building blocks as input and produces levels that all follow the structure of a specified level connectivity graph. In the first part of the thesis, we address some shortcomings of our previous work. We improve the algorithm with several new features such as better support for corridors between rooms or the possibility to generate platformer levels. We also propose several performance improvements and analyze the speed of the algorithm on various inputs. In the second part of the thesis, we present an integration of our algorithm into the Unity game engine. In the final part of the thesis, we demonstrate that our generator is able to produce levels that are similar to what we can see in two popular games - Enter the Gungeon and Dead Cells. The resulting algorithm is much faster than the previous version, contains new features and is ready to be used in the Unity game engine.