Dev Update Feb 8 - Regions and Map Generation

Before I get into today’s topic of what I’ve been working on, I want to address the issue of bugs and patch releases.

Some 20 common and serious bugs have been reported since the influx of new players last month. I’m not ignoring you! Bugs matter to me and I will address them.

Right now I’m focused and building momentum on making major structural improvements to the core game that are hard to do but long overdue. It’s challenging and thorny work and a few days away from it at this critical time will set it back. This is the stage where the cement is still wet, and stepping away now risks letting it harden in the wrong shape.

As soon as I get Regions and Threats into a good place (not finished, but well formed), I’ll do a patch release.

I hope you understand. We all have the same goal: a great playing, sandbox, simulation RPG. I think I’m doing the right things to get there. Now, onto today’s topic!


Map Generation For Threat Generation

As previously posted, I want to introduce global threats and challenges for the player to overcome, but in a systemic way. This takes the place of a ‘story’ in a typical RPG. While not my primary goal, this is the part that makes Archmage Rises a ‘forever RPG’. To do so I need to split the map up into Regions. Regions need to be generated in a way that is fun, supports the design goals, and has a solid technical foundation.

To sum up: In need to implement Threat generation, and spent the last 2 weeks on map generation. 😝

Current State

Here is a screenshot of a map I was playing on in the current public build.

I don’t know why I didn’t notice earlier, but this is about the worst map I’ve ever seen in a game - any game! There are so many things wrong with it:

  • All mountains, everywhere!

  • Using the same mountain sprite tile, even though we have several variants of it

  • Poor variety - Totally not fun or enticing to play

  • Unrealistic adjacency - bog next to a lake in a mountain range? Deserts next to snow covered hills next to coniferous forests? Bogs, chasms, rivers, grassland all mixed into the same area. It just doesn’t make sense, it’s a visual mess.

  • Decorations or ‘features’ placed on top of tiles that don’t do anything. They look like they should be something, inviting the player towards them, but they are nothing.

  • Only utilizes 6 of 25 terrain types.

What’s the goal?

  • Regions need to have a primary biome that make them feel distinct and interesting - Temperate, Desert, Swampy, Volcanic, Tropical, etc. Generate a map consistent with the feel of the biome

  • Utilize all the artwork we have (20+ terrain types) to create diverse, consistent looking, maps

  • Gameplay first, not realism. Sid Meier has a rule for Civilization: Only use a elementary school level of history, because that is what players will bring to the table. I will follow basic rules of geology and ecology so it isn’t confusing. Jungle isn’t next to tundra, a swamp next to a desert, full broadleaf forests don’t grow on rocky terrain.

  • Only show map features if they have gameplay value - if you see a cave sprite, it is because there is a cave to explore.

  • Landmarks players and NPCs can reference to talk about the map. Instead of a character saying “17 miles west” they should say “near Spookwood Forest” and you can locate and remember that on the map.

Last post I shared my start with basic land formation, separating the seas from the land.

Mountains

From there I started generating mountain spines.

They can have N branches coming off them and using a slider I can determine how mountainous and thick they are.

In fact, it took some time to get everything the terrain generator does to be driven off a few simple sliders.


Forests, Vegetation, and soil fertility

Then I tackled tress and other kinds of vegetation. I would have to revisit and keep reworking this code over the weeks. I didn’t appreciate how hard it is to allow a forest to be a separate layer on the map, let it grow across different terrain types.

For instance: if there is a broadleaf forest next to some mountains, does it grow on the hills leading up to the mountains? I think yes. But more sparsely.

In fact, that sparsity should be a transition piece between grassland and a full forest.

Bob Ross will be proud of my happy little trees!

This led into a major new feature: Soil Fertility.

Once I started modelling Soil Fertility, everything started falling into place, I could define a tree type (broadleaf, coniferous, swamp, jungle) and specify the temperature and soil quality it requires to grow. With that, I could plant seeds on the map hexes and watch it grow.

But it also has gameplay purpose. The medieval era was defined by its agriculture (3 field rotation system on the manor). Most people worked the land. With this new variable it opens up lots of interaction and world spell possibilities for the player. Casting spells to improve soil fertility for a farmer, or turn lush fertile land into barren wasteland.

With this in place I was able to generate plausible wilderness looking maps.

By moving the temperature slider I could get coniferous forests to appear.

Adding More Terrain Types (Biomes)

Ashworld

I started by adding a desolate mordor ash biome. Utilizing soil fertility I could ensure trees wouldn’t grow. I also could add dormant or active volcanoes and fumaroles.

Tropical

Once I got 2 biomes working, it wasn’t too hard to add more biomes with different data and tiles.

I added tropical plains and jungles.

This screenshot shows a broadleaf forest grow into tropical, switch to jungle, switch back to broadleaf for one hex over grassland, and then switch back to jungle for the last 2 tropical.

Desert

I have two terrain sets for desert: red (barrens or badlands) and yellow (more Sarah or Utah). They have different features available in them, like red deserts have savanah forests and mixed grass, while yellow deserts have salt flats and cacti. I learned a new word for ‘low moisture plants’: Xerophytes

Deserts can have oasis, dead trees, or mesas.

Red Desert

Swamps

Doing this has taught me the difference between Swamp, Bogs, and Marshes. But as a gamer going back to Final Fantasy 1, I’ll continue calling it all Swamp. 😝

I had to add more vegetation types and play with the soil fertility and now have swamp land. I think to sell the misery of it some color correction and some mist will help a lot, but I can do that later.

Hills / Highlands

Before moving on I needed to finish off with hills and Highlands. Highlands are more rocky (lower soil fertility). I use them as transitions around mountain ranges and I now have 3 layers showing correctly:

  • Grassland base

  • Hill/Highland on top

  • Vegetation on top of that

The map is actually capable of 7 layers - Base, rivers, chasms, roads, vegetation, structures, and decoration

Landmarks

Before finishing off the terrain generation, I want to capture the geographic features with names. Because of how I generate them I actually know all the hexes that belong together (as a blob), making it easier to center and place a name. I call these named features “Landmarks” and store it so it is accessible to the rest of the game, including the tooltip.

I like in Old World how the player can discover a landmark and name it. I’m going to allow this somehow. I like the idea of saving a town and they name the local forest after you.

It still needs some more work to make the text more clear, but I got landmark naming working for mountains before ending for the week. On Monday I'll get the rest, like forests, working.

So there you have it, what I’ve been working on for the past few weeks. While doing it I felt like it was taking forever, but now that I’ve written up this summary I feel pretty good about how far it’s come compared to what the game was generating.

One issue that came up on the real-time discord dev channel is Rivers.

It’s a bunch of work to put in rivers with, currently, no gameplay value. I’m not going to worry about rivers for now until I can sort out what gameplay role they play.