keyboard_arrow_up
Procedural Generation in 2D Metroidvania Game with Answer Set Programming

Authors

John Xu1, John Morris2, 1USA, 2California State Polytechnic University, USA

Abstract

Video game designers often find themselves at a crossroad when designing levels; namely, many have a difficult time balancing the amount of control they want to have over what their levels look like [1]. If too little control is given, like in the case of pure perlin-noise generation, levels can end up with too much variation and unideal generations [2]. Softlock is an example of unideal generation in the case of metroidvania games, if the placement of keys cannot be easily controlled and end up being placed behind gates, the players can get permanently stuck [3]. Developers may usually hand-make all levels in order to try and prevent this from happening, however they risk spending too much effort and time on designing levels, resulting in a general lack of quantity in levels. Objectively speaking, both methods have their strengths and work well in specific genres of games, but limiting oneself to the boundaries of these methods does not fundamentally achieve both quantity and accuracy. This paper proposes an unique solution to this dilemma, providing automated generation of levels while also giving developers much more control over the overall output. Our method uses Answer Set Programming (ASP) to verify generation based on restrictions we place, guaranteeing the outcome to be what we want [4]. To demonstrate our method, we applied our solution to a 2D metroidvania game made in the Unity game engine and conducted quantitative tests to assess how well our method works as a level generator [5].

Keywords

Procedural Generation, Answer Set Programming, Video Game Application

Full Text  Volume 13, Number 5