1. Darfall
  2. News
  3. DevBlog #3 - Map Generation

DevBlog #3 - Map Generation



Hello everyone and welcome back :)

It's me Lukas and today I will talk about how the map is generated in Darfall.

Since maps in Darfall are procedurally generated, we needed a versatile system that would allow us to modify any part of the map generation, like which trees are placed into the forests, what areas will our forests cover, or what units and structures are generated into which parts of the map.

This system is fully "scriptable", this means that Martin, our artist, can modify any part of the map generation without me needing to touch the code.

[h2]Grassland Map[/h2]

Let's start with few steps of how the Grassland map is generated. First, an empty body of water is placed onto the map



Next, the terrain tiles are generated, with mountains and bodies of water. Both use perlin noise to make them look natural.



Then resources like trees and iron veins are placed into the map. Trees are also generated using perlin noise, which gives the tree clusters more natural look.



Finally, enemy camps are placed into valid locations, like orc camps or undead zones



[h2]Camps[/h2]

Any enemy "point of interest" location is called a camp. These are also procedurally generated. We have a simple system that allows us to quickly populate these camps with props and loot in the Unity editor without touching the code.

Some simple examples of orc camp can be seen here:



All these tools allow us to create quite an impressive locations, like undead zones which create an atmosphere of dangerous corrupted lands



Above were just quick examples of the processes we currently have in its initial stages. In the future, we plan to generate entire villages, forts or encampments for different races, that will be present across different map biomes.

I hope you liked this quick sneak peak of how Darfall is generating its map :)

See you in the next dev blog post!

All the best,
Martin and Lukas from Play Square Games