A Generic Framework for Procedural Generation of Gameplay Sessions
Total Page:16
File Type:pdf, Size:1020Kb
SBC - Proceedings of SBGames 2013 Computing Track – Full Papers A Generic Framework for Procedural Generation of Gameplay Sessions Leonardo V. Carvalho, Átila V. M. Moreira, Vicente V. Filho, Marco Túlio C. F. Albuquerque, Geber L. Ramalho Center of Informatics (CIn) Federal University of Pernambuco Recife-PE, Brazil {lvc, avmm, vvf, mtcfa, glr}@cin.ufpe.br Abstract — this paper studies the application of procedural Currently in the game industry, PCG is being employed content generation techniques in the development of endless both in the generation of content on demand - with the goal of games. A chunk-based approach is used along with a 4-step level increasing a game’s replay value or adapting the game to the generation process that takes in consideration the need for an player – and during the game’s production stage – in order to infinite chunk-placement cycle. Chunks are defined as playable make the content generation process more efficient [4]. Overall game segments with fixed width and height, on which gameplay there is no restriction regarding the kind of content that can be elements such as coins are placed. The proposed process consists generated procedurally – textures, sounds, maps, cities, levels of the definition of a difficulty curve, chunk generation, chunk and even whole systems can be generated algorithmically with evaluation, and insertion of the chunks in real time during the various levels of complexity [5]. gameplay session. For the purposes of this work, we focus on the chunk evaluation step, which employs neural networks that are Some of the games that illustrate well the potential of PCG capable of evaluating each chunk in terms of difficulty. The include the games .kkrieger [6] and Zettai Hero Project [7]. parameters used by these networks include both non-controllable The former is a 3D first person shooter on which all game features - i.e. amount of coins collected by the player - and assets are generated procedurally. That includes textures, controllable features - i.e. amount of obstacles present in the tridimensional models, sound effects and levels; however, no chunk. The system was employed on the game Boney the Runner gameplay aspect is affected by the procedural generation. The during its development, and as of the time of writing the game is latter is a rogue-like game on which PCG is used in order to available for download on the Apple and Google app stores. To increase the game’s replay factor through the generation of validate the work, neural networks based on player data were levels, enemies and equipment. Unlike .kkrieger, on Zettai built, and the performance of such networks was compared to that of a human designer. The performance of the neural Hero Project no PCG techniques are used in the creation of networks varied according to the parameters used, but the best artifacts such as textures and sounds. one was capable of correctly classifying 90% of the chunks from Given the potential and widespread use of PCG on games, the pool, while a human designer was capable of correctly this paper has the purpose of analyzing the application of PCG classifying 52% of said chunks. techniques on a game genre that has become prominent with the popularization of mobile platforms – endless running. This Keywords— procedural generation; endless game; neural genre consists of an infinite race on which the player’s goal is network; difficulty modelling to obtain a high score while avoiding obstacles present along the way. One of the features that influence the score is the I. INTRODUCTION maximum distance that the player can reach, but other elements Procedural content generation, or PCG, consists of the use can also influence, such as collectible items. Since games of of algorithms in the process of creating content, like game this genre are very dependent of a high replay value, it’s levels, maps or music. Increasingly more game development important to present levels with a high variety, which is companies have been employing these techniques on their something that a can be done through the use of PCG. processes, often motivated by the elevated monetary costs of The endless running genre is relatively new, with much of creating the content manually and by the variety of content that its recent popularity attributed to mobile games such as Jetpack can be generated procedurally [1]. Joyride, which can be seen on Fig 1. This game had over 170 The use of PCG techniques in games dates back to the million downloads across various online stores and received 1980s, with games like Rogue [2], a graphical role-playing various rewards from the specialized press [18] as of writing. game on which a virtually infinite amount of levels is On this game, the player must survive for as long as possible generated on demand. Even though the generated levels do not while avoiding traps and collecting items along the way, and present a high complexity when compared with what can be the final distance reached is used as the score. created manually, the game has shown that it is possible to Because the genre is still relatively new, there is still a greatly increase the replay factor by using non-supervised level scarcity of materials that focus on the generation of gameplay generation [3]. XII SBGames – São Paulo – SP – Brazil, October 16th - 18th, 2013 203 SBC - Proceedings of SBGames 2013 Computing Track – Full Papers sessions for this kind of game, given that most solutions focus created by combining basic gameplay components, so this on generating levels with clear initial and final points [3] [9] allows for a greater variety of playable chunks for the same [11], instead of an endless track. kind of rhythm pattern. The approach used by [9] consists of a generic framework aimed at automating the level creation process by using a top- down approach. This work utilizes a genetic algorithm to generate levels that respect certain constraints defined by game designers, and each level is comprised of various “design elements”, which correspond to the basic gameplay elements. The best levels are chosen by the fitness function in the genetic algorithm, which is capable of determining the amount of fun that each level provides based on the difficulty perceived by the player over time. On the work presented by M. Kerssemakers, J. Tuxen, J. Togelius and G. N. Yannakakis [10], a meta-procedural level generator is presented with the purpose of minimizing the effort of creating a new level generator for each game. This generator works with two cycles, an internal one which uses agents to create levels, and an external one which provides a Fig. 1. A gameplay session of Jetpack Joyride. visual representation of each level generator. The level generators have to be analyzed by a human designer, who is As it will be shown on the next section, many of the responsible by choosing the best ones. existing level generation solutions present the possibility of generating a virtually infinite amount of levels for games [8] The work presented by C. Pedersen, J. Togelius and G. N. [10], but said levels commonly have a start and end point. On Yannakakis [11] focuses on modelling the player experience on an endless running game, there isn’t the concept of a level with the game Super Mario Bros. On this work, levels are created by a pre-determined end, since the gameplay sessions consist of a using heuristics that randomly position most gameplay continuous challenge which is generated on demand and whose elements on the levels, the only exceptions are elements that end depends on the player’s skills. Also, to the best of the affect player experience, which are positioned on certain fixed authors’ knowledge, there still aren’t any relevant surveys that positions. Players were invited to play sets of game sessions focus on endless games. during which gameplay and level data were collected. Once the sets of sessions are over, the players answered a short form to Because of that, it’s necessary to define not only how to tell about the game experience, and all this information was generate playable chunks, which are essentially fixed-size used to build a neural network responsible for modelling the game segments on which gameplay elements are placed, but player experience. also how those chunks are positioned along the track on two moments: during the initial player progression and during an On most of the works presented, the authors focus on the endless cycle. This paper does not try to tackle all these process of generating the content, but mostly don’t mention questions simultaneously; it focuses on the evaluation and how to balance the difficulty once the content is generated. So positioning of playable chunks, while the remaining aspects on this paper we focus on the difficulty evaluation based on utilize heuristics defined by game designers. both authorial content, which we refer to as controllable features, and gameplay sessions information, which we refer to as uncontrollable features. For this purpose, neural networks II. RELATED WORK were employed to classify chunks, but the classification As it will be seen on this section, most of the works that technique itself is not the scope of this work and other were analyzed on our studies focus on the generation of finite techniques could be used for this purpose, such as decision levels or level networks. In [3], the concept of rhythm is used trees or nearest-neighbor classifiers. on the level generation process. Basic components like platforms or spikes are combined according to a rhythm pattern, and the result of this combination is an entity III. TESTBED GAME denominated “pattern”.