Old-style map

Have you ever took a look at some maps from the Middle-ages? Or at some map of the Middle-Earth?
I simply love them, therefore I spent a couple of hours adapting my map generator to generate something similar.
Those are the first attempts.


yann_old japurr_old

World generation

This year I played more with dynamic languages. In the last months I played with Python. Writing Python is not as much fun as writing Ruby but I feel the result is more maintainable.

I used some hours to work on an hobby project named lands. It is mainly a world generator.

World generation starts with plates tectonics simulation. After some experiments I found out a great library for that. It was built in C/C++ for a bachelor thesis. I took it and wrap it to use it in Python. It is available on Github & PyPy, just look for PyPlatec.

The basic heightmap is obtained from PyPlatec. Here there are some examples.

Then the map it is centered to have as much ocean as possible at the borders. At that point a filter is applied to let the land near the border slowly degrade so that only ocean is present at the border.

At this point random noise is added and erosion algorithms are applied.

Later different data is calculated (as temperature, humidity, rainfall and so on). From that data the biome for each cell is calculated.

It was a lot of fun to do that.

Now I am thinking about a civilization simulator. I imagine different civilizations to grow, clash, diseappear. Let’s see what comes out.

Maps, again

During these holidays I played a little bit with a couple of ideas, including a “civilization-like” game. I used JRuby.

I started using a dataset of elevation (the SRTM 90m). In practice you get a big matrix with the elevation in meters of a point each 90 meters.

If you draw altitude 0 as pure black and altitude 4000 as pure white you get something like that.

If you represent different elevations with different color (for example you choose green for 0-400 m, brown for 400-2000, and white for 2000 m) you get something like that:

The code to do that is this:

But if you add some simple code to represent shadows (supposing sun come from north-west) the result improves a lot:

The code to get this effect is here: