Using Graph Transformation for Puzzle Game Level Generation and Validation
As part of a student’s project, computer science student David Priemer and former graphics design student Daniel Goffin started to develop a nice puzzle based computer game called Perlinoid. In his Bachelor thesis, David developed a level generator for Perlinoid. The challenge was to generate interesting puzzles with a reasonably small number of elements and reasonably complex series of steps required for the solution. Being educated in graph transformations, David modeled the possible puzzles as graphs and possible user steps as graph transformations. First a random level is generated, for which the level generator computes a reachabilty graph by applying all graph transformations in all possible combinations on all possible matches. Next, the reachability graph is analyzed for distances between start graph and end graph, number of possible choices, number of different solution paths, etc. and a number of metrics are applied. Finally, the result gets evaluated. In case the level is considered insufficient, it will be discarded and the process starts from the beginning. This is done within the Perlinoid application on demand at user side. To minimize the footprint of the level generator, a new dedicated graph transformation engine has been built and incorporated into the Perlinoid game. This paper reports about the concepts and experiences with this approach.
KeywordsGraph transformations Reachability graphs Fujaba SDM-Lib
- [FNTZ98]Fischer, T., Niere, J., Torunski, L., Zündorf, A.: Story diagrams: a new graph rewrite language based on the unified modeling language and java. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) TAGT 1998. LNCS, vol. 1764, pp. 296–309. Springer, Heidelberg (2000)CrossRefGoogle Scholar
- [Gra]Graph Engineering Course at Kassel UniversityGoogle Scholar
- [Gra06]GraphSynth. Open-source research software for creating generative grammars (2006). http://designengrlab.github.io/GraphSynth/. 17 Feb 2016
- [SDM14]SDMLib.org. Story Driven Modeling Library at GitHub (2014). https://github.com/fujaba/SDMLib, 17 Feb 2016