Tuesday 1 November 2016

Game Maker Progress 19: A New Approach to Random Level Generation


Hello everyone,

The last week has been fairly busy - this week in particular is going to be a lot more busy due to the Philosophy of Computer Games conference I am currently attending - which looks like it will prove to be very insightful! 

Recently - I had watched a video of a talk given at the Games Developers Conference (GDC) regarding the procedural generation used in Shattered Planet. The talk inspired me to experiment further with procedural generation systems. Those of you who have read my previously Game Maker Progress posts know about Privateer Dungeoneers - which uses a very basic random level generator to create it's maps. The challenge this time is to make the generation more systematic and meaningful in a sense. 


Privateer Dungeoneers' generator simply relied on chance and a few other parameters I set up to influence the chance to spawn a wall or a path tile. This obviously meant maps are extremely random - and could result in problems of having a room completely cut off from the path of the game. Worse yet - if an exit existed in the game - there was no way to guarantee the player will get to the exit without digging through a wall. I knew I wanted to re-work the generator for that project - however as other elements took precedence - that project had to be put on the side for the moment. 


Spelunky - similar to Shattered Planet, used a number of pre-set terrain pieces for the generator to work with. Unlike Shattered Planet - the pre-set terrain pieces had even more areas within the pre-set terrain for more pre-set terrain. The generator would therefore need to first connect 4 large pre-set terrain pieces, and then if the large pre-set terrains allowed, modify it more (I highly recommend looking at the book "Spelunky by Derek Yu" as it goes into more detail and is a very good read; I have written about it here).  Looking at the video talk for Shattered Planet - a different approach is taken - where pre-made rooms are chosen by the generator, placed in the room, and are then connected via a path. I recommend looking at the video for a better look at how the system works.

Regardless - I will be looking into creating an improved level generator that works with a few pre-set components. Having been inspired by both Spelunky and Shattered Plant's level generation systems. Coupled to this - I do hope to test the generator in a few different game contexts - to see how well it can be adjusted to cater for simple styles of different types of games [Dungeon Crawler, and 4x Style game]. I will likely write about this within the coming weeks - once I've had the chance to sit down and work on it. Whether this will be next week - is highly debatable as the conference will be occupying a fair portion of my time this week. 



That said - I am very excited to be trying out this new approach to creating random level generation! As it will both mean that the levels will appear to be more natural and meaningful - and it will open up a lot of opportunities to test out different game ideas with a single random level generator that can be adjusted depending on the type of game it is being used to generate a map for!

Until next time,
Dylan

No comments:

Post a Comment