Grave Days - Procedural Level Generation

I've started working on the procedural level generation for grave days, which is the aim of the next update: Alpha 0.5.x. The current state is close to "good enough" for a release, and I will soon start adding some extras, like more lootable items to the chests in the buildings. I'll briefly discuss what I've done and where I am aiming to go with the level generation.

The first step was to go for a completely tiles world. Previously the outside world was made of flat, textured meshes and sprites - and the buildings were tiled but rotated and rotated. There are a few reasons which I won't discuss now why I went for this approach - but in short it just makes the visual style more coherent and will also make future development a lot easier.

The first step was to add some random terrain generation for the island, using Perlin Noise. Then I added in the buildings again and started attempting to link them up.


It kind of worked but there were still some issues. My strategy was to generate buildings and surround them with paths, and then I had a conceptual "robot" that would walk from one building to the next, placing paths and preferring routes that would keep the path straight. I still had an issue with the building size. I seemed to not have much control over their size.

Next I managed to connect all buildings in a cluster. Well, mostly connect because roads could still be broken by water, but its good enough for now. I still had an issue with control the building size parameters at this point. The purpose of the building clusters will be to act as a town of sorts down the line. The player will most likely not travel between towns very often - most likely only when something forces them out of the existing town or perhaps if there is a mission to do in a neighbouring town. But this is still way down the line.

I finally managed to get more precise control of the size of my generated buildings. I tweaked the strategy for generating a town / cluster a bit to start off with generating large buildings, connecting them up, and also surrounding the entire cluster with a path. Finally, I fill some of the gaps in the clusters with smaller buildings, provided that they are near a road.

In the future I'd like to add different types of towns - with different density and gap sizes between the buildings. I'd also like to introduce different building types with different themes and different lootable items and furniture. For now though, most of the changes towards this effect will be minimal and I'll leave it for a future update.

For Alpha 0.5 I'd like to focus on adding more to the natural terrain in terms of trees, bushes, rocks, etc. The update should be ready in a week or 2.

Get Grave Days

Buy Now$9.99 USD or more

Leave a comment

Log in with your account to leave a comment.