Dev Update #8

It’s been a while since my last update but here’s a quick one on some of the progress I made this week on procedural generation.

Procedural Generation

Since the game is meant to be a sort of Rogue-like MMO having procedurally generated dungeons is what I have in mind as the most core feature to the game.

So I’ve devised a system to generate a sort-of room-based dungeon template on the server side that can be easily passed down to clients. The idea is to create (by hand) different types of rooms that can be stitched together using the template. The rooms can vary in shape but they most all have the at least one door. This is a simple method of generation that has its pros and cons.

Pros

  1. Passing a dungeon template between Server and Client is very easy.
  2. Having hand-made rooms can guarantee high-quality
  3. It can be easier to manage.
  4. It’s faster than other methods.

Cons

  1. Dungeons can feel repetitive if there is not enough room variety.
  2. You have to.. well.. manually create the rooms..
  3. Rooms have a maximum size.
  4. More room types increase app size.

I believe I can address the main cons by simply creating many room types but also by adding certain procedural elements which can reduce the amount of work and increase variety.

So far…

I’ve finished version 1 of the template generator. It can take in a couple of parameters which can be used to change the end result, including:

  • max horizontal and vertical size
  • min and max room count
  • probability for a room to merge to adjacent rooms
  • breadth or depth first, etc.

I used some unicode symbols to output the result in action and it looks something like this:

Procedural generation of dungeon template

References

When I was starting with PCG I found many complex articles which was a bit overwhelming. I found this video tutorial for a very simple dungeon generation that was somehow similar to what I wanted. That implementation however, is very limited and not that great in my opinion but it gave me a lot of good ideas that got me started.

I also found this site which has large list of good resources that I highly recommend. I’ll be coming back to it as I progress further into my dungeon generation.

What’s next?

For next update I’ll keep working on this procedural generation. Starting with creating some of the base room types and stitching them together in the server using the template generated.


Subscribe to my newsletter

Remember to subscribe to receive monthly updates about Clash Legacy!