Author Topic: side-project  (Read 12771 times)

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #15: March 29, 2012, 07:31:30 PM »
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

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8525
    • View Profile
Re: side-project
« Reply #16: March 29, 2012, 07:35:42 PM »
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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #17: 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.



JPierreD

  • Mighty Duke
  • ****
  • Posts: 1174
  • Hippiemancer Extraordinaire
    • View Profile
Re: side-project
« Reply #18: March 29, 2012, 08:09:13 PM »
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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #19: March 29, 2012, 08:18:00 PM »
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

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8525
    • View Profile
Re: side-project
« Reply #20: March 29, 2012, 08:20:09 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

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: side-project
« Reply #21: March 29, 2012, 11:36:32 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

  • Mighty Duke
  • ****
  • Posts: 1977
    • View Profile
Re: side-project
« Reply #22: March 29, 2012, 11:39:33 PM »
.... bmfortress?

dwarfmaster?
firefox

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #23: March 30, 2012, 01:21:28 AM »
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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #24: March 30, 2012, 01:26:47 AM »
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

  • Honourable King
  • *****
  • Posts: 2526
  • Okay... you got me
    • View Profile
    • White Halmos
Re: side-project
« Reply #25: March 30, 2012, 01:30:34 AM »
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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #26: March 30, 2012, 09:53:29 AM »
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

  • Mighty Duke
  • ****
  • Posts: 968
    • View Profile
Re: side-project
« Reply #27: March 30, 2012, 05:15:09 PM »
Side project or not, I saw this and immediately thought of a single-continent BM game world.  Epic.

egamma

  • Guest
Re: side-project
« Reply #28: March 30, 2012, 08:59:04 PM »
Can you use Hexes instead? There are several gameplay advantages to hexagons.

Foundation

  • Honourable King
  • *****
  • Posts: 2526
  • Okay... you got me
    • View Profile
    • White Halmos
Re: side-project
« Reply #29: March 30, 2012, 09:22:46 PM »
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.