Kainga
  • Home
  • Devlog
  • FAQ
  • Contact
  • Newsletter
  • Presskit

​

Landmasses

5/12/2018

0 Comments

 
This is still very much a work in progress...but today I'm going to talk about my Landmass system. 
I wanted to make a randomly generated map, that was different every time you played, but I didn't want to create an algorithm to generate elevation in a believable way. Some people spend years on those types of algorithms, and I was not prepared to spend that kind of time.
Instead, I came up with a different system, one that I haven't seen implemented in a strategy game so far. 

I actually got the idea from Diablo 3. Their procedurally generated dungeons are split into giant chunks, and each chunk has a specific entrance shape that lines up with other chunks in that tile set.
Picture
I decided to take this mechanism and implement it in an outdoor setting. But how would I make different tiles fit along the edges? It's easy to do in a dungeon with narrow hallways, but how could I do it with an open air environment?

I realized that the edges were the most important part of all of this. So I decided to make the edges of each tile a combination of elevations. Then tiles with a similar elevation combination can line up with that edge. I limited the elevations to 3 types: Low (L), High (H) and Water (W), but that alone wouldn't work. I decided to have each edge split half-and-half between two elevations. Half one elevation and half another elevation on each tile edge.
Picture
Each chunk edge can have one of the combinations above. ​
Picture
Then we can create tiles that look something like these above, with each edge a combination of 2 elevations.
Picture
I realized, that as long as the edges remain clean, the middle of the tile can run with creativity.
Picture
As there are 9 edge combinations, and although each tile has 4 edges, the actual total number of tile chunks I created is just 18. There are 4 combinations I omitted because they're strangely arranged (I may add them at a later date). ​
Picture
So basically that's it! The map ends up looking something like the sketch above. I created an algorithm that generates tiles, one at a time, by reading the edges of the tile right before it and the one above it, then choosing a random tile that fits. ​​
Picture
You can see that this system allows for quite a bit of flexibility while remaining relatively simple. The texturing and colors are not final but I'm really happy with how it turned out!
0 Comments



Leave a Reply.

    Erik Rempen

    I create, design and develop video games I'm interested in playing.

    Archives:​
    Missions
    Production Buildings
    Making Wakes
    The Beastmaster
    Basic Units
    Basic Resources
    The Fire System
    Presentation
    Re-Imagined
    ​Creating Water
    ​
    Cliffside Stairs
    Watchtowers
    ​
    Melee and Ranged Units
    Unit Organization
    Farming
    ​Carrying Ladders
    ​Weather and "Seasons"
    Technology
    ​Ladders and Elevation
    landmasses
    Structure Design
    Animating 2D units in a 3D world
    ​Setting the Theme
    Setting the Focus
Proudly powered by Weebly
  • Home
  • Devlog
  • FAQ
  • Contact
  • Newsletter
  • Presskit