itch.io is community of indie game creators and players

Devlogs

0.5.0: Rivers and basic house shapes

Medieval Fantasy City Generator
A browser generator made in HTML5

A month and a half have passed since the last release - I know it's long. There were several reasons for that. First of all right after releasing 0.4.3 I took a bit of rest :). Then I played with 3d stuff just to keep myself motivated (you can see the resulting images here). And then it was time to get back to the real development, but rivers turned out to be a little more complex task than I expected. Anyway, here is the list of changes with some comments:

Rivers

The problem with rivers is that they affect everything they "touch", so I needed to take care of moving buildings away from them, decide where and how bridges are placed, create a decently looking river mouth where it joins the ocean etc. So the whole task is not really hard, but as I said it is complex i.e. consisting of numerous nuances. The resulting feature currently is quite limited: there can be just one river per map, it has a constant, not very large width, it can't be looped (so I can't make a moat of it). Some of these limitations I hope to overcome in future updates. Please keep in mind that with the river generation takes much more time.

Basic house shapes

There is a new option allowing to replace tiny polygonal patches with rectangular shapes which look a bit more like houses (here you can see a close-up comparison of the new and default modes). It works the same way as castles get built: I take an original polygon, then try to find the largest rectangle which fits inside the polygon. After that if the rectangle is large enough I cut it into smaller blocks and throw away some of them. That's it. The resulting map is quite noisy so by default this option is switched off.

New visual options

Besides the "House view" there are a couple of new visual options:

  • Thin lines. All the strokes are drawn 3 times thinner. This was added specifically for the "house view" to reduce the level of visual noise. It works better with small maps. It doesn't work very well with hatching.
  • Simplified water. Rivers and isolines get drawn as polylines, not as curves. The coast doesn't get turned into a jagged fractal thing. This improves the drawing time and sometimes it looks better.

Smaller changes

There are also a bunch of smaller changes in this update, but I'm too lazy to list them here :)

What about 3D?

As you may notice 3D is not in the list of new features. I'm going to write a separate post on 3D and the future of the generator in general. Stay tuned!

Read comments (9)