Computer Games Design

Adventures in Procedural Content Generation - Adam Speers

Computer Games Design

Adventures in Procedural Content Generation - Adam Speers

Dungeon Generator: Part 9

Conclusion

The completed project has fully met the stated design goals of procedurally generating a random dungeon environment, within Unity, adhering to a semi-linear level structure. The prototype has been successfully completed and tested with a high degree of confidence. The project was completed according to the planned schedule.

Key achievements:

• Creation of information maps and pathfinding to enable implementation of a semi-linear level structure within the generated dungeon. (Dungeon Generator: Part 1)

• Successful generation of a maze using a recursive backtrack algorithm (Dungeon Generator: Part 2)

• Enrichment of the maze through the addition of braid paths and creation of larger spaces (Dungeon Generator: Part 2)

• Modular assets creating reusable geometry which can be used to transform the maze into a dungeon (Dungeon Generator: Part 4)

• Creation of a directional pattern matching algorithm, for spawning the correct modular assets (Dungeon Generator: Part 6).

• Working prototype planned, documented and built within unity (Dungeon Generator: Part 7)

• Functional and clean room testing (Dungeon Generator: Part 8)

Key Challenges: 

The three-act structure - There is a key differentiator between this maze generator and others available on the Unity marketplace (Unity Technologies, 2020). The inclusion of intelligent level design giving the generated level a semi-linear structure which supports a narrative. Segmenting the dungeon into several parts (Dungeon Generator: Part 1), separated by bottlenecks proved to be challenging. In the initial stages of development, the program created both rooms and loops early in the process when the maze only existed as a binary array. This later presented difficulties as the formation of the loop paths was not tightly controlled and sometimes created a true multicursal maze. Following implementation of the information map and creation of section identifiers, it was found that identifying bottlenecks was hampered by the early loop method and resulting multicursal nature of the maze. By removing the loop creation code, it was discovered that a critical path could now be easily identified from the furthest cell, back to the start. Using this critical path, the dungeon could be logically segmented. Loop path creation could then be reintroduced, using the new information available to constrain the placement within its own section. Thus, resulting mazes had a clear three act structure every time.

Tile matching - The method employed to decide which tile to use is based on the position of its neighbours. This method was an original piece of work, designed and created specifically for this implementation of a procedural dungeon generator. The main challenge this posed was the number of patterns required to implement the extended version. This required 240 entries as compared to the 16 required for the simple set.

Next Steps:

This project will continue to be developed, with a view to publishing on the unity asset store as a chargeable download package. It will also be developed into a standalone mobile game (Endless ARPG) for the Android platform. Further enhancements to the algorithm will be investigated to introduce different height levels within the maze.

References

Unity Technologies (2020). Maze Assets. Available at: https://assetstore.unity.com/?q=maze&orderBy=0 (Accessed: 21 April 2020).