Main Menu

News:

Please be aware of the Forum Rules of Conduct.

side-project

Started by Tom, March 28, 2012, 11:51:35 PM

Previous topic - Next topic

Tom

I think I'm done for today. Here is the current status:





The first map is the new map that takes biomes into consideration. The dark green is forests. The light green is grassland, the brownish is scrubland, the yellowish is desert. The grey is bare mountains and the white snow-capped mountains. The brown/greenish you find at some water mouths is marshland. There are also two shades each in forests, grassland and scrubland indicating density.

The second map shows the distribution of moisture on the map. As you can see, rivers are a primary source of moisture as is closeness to the coast. The two factors add up.

The third map is a topological map showing height (lighter colour means higher) as well as treacherous (yellow) and impassable (red) region borders due to large height differences. This can include coastlines, which means cliffs (impossible to land with a ship there). There are a few at the southern coast. This map also marks the individual regions with tiny borders. You can probably not see them well in the scale-down version, but I have the full-size versions here:
What is all this for? To be honest, I don't have a clue. I'm experimenting. I have a few thoughts running around my head, but nothing final so far.




Anaris

Extremely cool.

This is done completely with software you wrote, right? (excluding libraries) Not done with a separate software package?

How long does it take to do this generation, for a map of the size you just showed? That looks like it's probably another one of around 4000 subregions, yes?
Timothy Collett

"The only thing you can't trade for your heart's desire...is your heart." "You are what you do.  Choose again, and change." "One of these days, someone's gonna plug you, and you're going to die saying, 'What did I say? What did I say?'"  ~ Miles Naismith Vorkosigan

Tom

Yes, it's all done by a script I'm currently building.

This one is actually half resolution, so it has around 1500 or so regions. Takes a few minutes to calculate. The problem is quadratic increases in time and memory, especially in the voronoi calculations, preventing me from going much higher. I tried 4096x4096 but it doesn't work out. Crashed with a segfault after about 15 minutes of calculation.



JPierreD

Thinking BM-wise the dangerous and impassable terrains are extremely interesting, as useful bases for where to naturally place strongholds and the likes.

Really, really cool.
d'Arricarrère Family: Torpius (All around Dwilight), Felicie (Riombara), Frederic (Riombara) and Luc (Eponllyn).

Tom

I lied when I said I was done for the day. Experimenting with non-square layouts - works great. And the results can be tiled nicely:




This map has again received a bit of photoshop treatment for purely visual effects. The contents are entirely generated automatically.

Anaris

Quote from: Tom on March 29, 2012, 08:07:17 PM
Yes, it's all done by a script I'm currently building.

This one is actually half resolution, so it has around 1500 or so regions. Takes a few minutes to calculate. The problem is quadratic increases in time and memory, especially in the voronoi calculations, preventing me from going much higher. I tried 4096x4096 but it doesn't work out. Crashed with a segfault after about 15 minutes of calculation.

That sounds like reducing it a bit further would make it fully viable for on-the-fly random generation of rather large-scale environments, which could work as a basis for something resembling a roguelike.
Timothy Collett

"The only thing you can't trade for your heart's desire...is your heart." "You are what you do.  Choose again, and change." "One of these days, someone's gonna plug you, and you're going to die saying, 'What did I say? What did I say?'"  ~ Miles Naismith Vorkosigan

De-Legro

Quote from: Anaris on March 29, 2012, 08:20:09 PM
That sounds like reducing it a bit further would make it fully viable for on-the-fly random generation of rather large-scale environments, which could work as a basis for something resembling a roguelike.

Some of the newer rogue likes I've seen use voronoi calculations as the base for their world generation. It has a lot of advantages as a base for more complicated stuff like biodomes.
Previously of the De-Legro Family
Now of representation unknown.

fodder

.... bmfortress?

dwarfmaster?
firefox

Tom

I'm not even trying to copy the complexity of DF. It goes way, way beyond this. But it also works on a square grid, which makes a ton of things easier, but also less realistic-looking. It has a certain charme that is currently a hype (see Minecraft), but I'm a big fan of non-square grids or no grids at all.

Though there is a jittered grid behind this project here for the initial seeds of region centers (voronoi points). I've decided on that approach because it is computationally simple and yields a good mix of randomness and even distribution while the simple addition of a margin value guarantees a minimum distance between settlements.

Tom

And a final update (hey, it's the next day over here, technically speaking!):

The script now generates metal deposits and calculates wood and food yields. Metal depends on some perlin noise and the terrain height (i.e. much more common in mountains). Wood depends on some noise and the biome, mostly (obviously, forests yield lots of wood, the other types not so much). Food depends on the biome, some noise and the moisture.

In addition, the script now stores which places are on a coast and which ones are on a river, so it knows which ones have access to the sea, or could build a harbor, etc. I don't yet incorporate fishing into the food calculations.

Foundation

Definitely an interesting side-project.  How are you writing this script in terms of language and libraries? :)
The above is accurate 25% of the time, truthful 50% of the time, and facetious 100% of the time.

Tom

PHP is my language of choice if I want to quickly whip up something, because I know it best.

I'm using a library for the whole Voronoi stuff and one for Perlin noise, and that's it. Everything else is my code.


Solari

Side project or not, I saw this and immediately thought of a single-continent BM game world.  Epic.

egamma

Can you use Hexes instead? There are several gameplay advantages to hexagons.

Foundation

Really like the choice of Voronoi for boundaries and high quality noise.  I've never used PHP as a scripting language apart from web applications. :)

Looking forward to what this side-project results in.
The above is accurate 25% of the time, truthful 50% of the time, and facetious 100% of the time.