Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DF-style World Generator  (Read 3694 times)

12doze12

  • Bay Watcher
    • View Profile
DF-style World Generator
« on: July 10, 2016, 05:05:12 pm »

A World Generator made in python/libtcod that tries to somewhat mimic DF-style world generator, still pretty crude.

Screenshots:

Spoiler (click to show/hide)


To do:
- More map modes (Temperature, Heightmap, etc)
- Better Tectonic plates simulation (?)
- Rivers
- Biomes based on temperature, height, proximity to sea/river, etc ...

Download:

Version 0.1: http://s000.tinyupload.com/?file_id=00056658036778168068

Installation:

- Extract .rar
- Run pyWorld.exe

Controls:

t - Show Terrain Map
h - Show Raw Height Map
w - Show Temperature Map
r - Generate other World

To exit just close the main console window, the other one should close too.

« Last Edit: July 12, 2016, 07:10:23 pm by 12doze12 »
Logged

dennislp3

  • Bay Watcher
    • View Profile
Re: DF-style World Generator
« Reply #1 on: July 11, 2016, 06:21:55 am »

I have the most peculiar problem when it comes to this...I want to learn procedural generation but for some reason I can't wrap my head around it and I have yet to find a really good tutorial for it...

What did you do to learn about how to make this happen?

I will be in China the next six months and my main PC will be a raspberry pi...I will be busy doing plenty of things but I would also love to take that 6 months and teach myself programming (specifically game programming as I have dabbled with general programming already) in my free time.

A raspberry pi is not exactly powerful but I would love to be able to have a grasp on procedural generation by the end of my 6 months.
« Last Edit: July 11, 2016, 06:29:12 am by dennislp3 »
Logged

12doze12

  • Bay Watcher
    • View Profile
Re: DF-style World Generator
« Reply #2 on: July 11, 2016, 07:08:40 am »

I have the most peculiar problem when it comes to this...I want to learn procedural generation but for some reason I can't wrap my head around it and I have yet to find a really good tutorial for it...

What did you do to learn about how to make this happen?

I will be in China the next six months and my main PC will be a raspberry pi...I will be busy doing plenty of things but I would also love to take that 6 months and teach myself programming (specifically game programming as I have dabbled with general programming already) in my free time.

A raspberry pi is not exactly powerful but I would love to be able to have a grasp on procedural generation by the end of my 6 months.

If you have absolutely no coding experience I wouldn't recommend trying procedural generation right away. You would better first learn some programming language like C and then bother with procedural generation. I haven't had the time to write about how this works but I will eventually do it. Also, I'm using libtcod which is a great library for procedural generation, of course there is not a GenerateWorld function but it has tons of great tools for it, when you do procedural generation you don't necessarily do it from scratch.

As for some resources, here's some place with great information/inspiration:

https://www.reddit.com/r/proceduralgeneration/
https://www.reddit.com/r/roguelikedev/
http://pcg.wikidot.com/

The first answer to this topic on stack overflow is also very good:

http://stackoverflow.com/questions/155069/how-does-one-get-started-with-procedural-generation

Mid-point displacement and Perlin noise are very common in procedural generation (I use libtcods's Simplex Noise FBM for example)

One of my favorite inspirations:

http://boxcar2d.com/
« Last Edit: July 11, 2016, 07:18:12 am by 12doze12 »
Logged

dennislp3

  • Bay Watcher
    • View Profile
Re: DF-style World Generator
« Reply #3 on: July 11, 2016, 12:28:26 pm »

I have run in to most of those...I think my biggest problem for me is not being able to find much actual code on the topic...most things such as what you linked are articles that talk about the theory and high level ideas...I get that...but I would like to read some actual code so I can connect the dots between the theory and implementation.

That being said I think I found what I need...I had bookmarked this LOONG ago but lost it...this is an example of the stuff I am looking for...preferably in Python but this works perfectly for now (until I have to try and code on a raspberry pi haha)

http://catlikecoding.com/unity/tutorials/
« Last Edit: July 11, 2016, 12:31:14 pm by dennislp3 »
Logged

12doze12

  • Bay Watcher
    • View Profile
Re: DF-style World Generator
« Reply #4 on: July 12, 2016, 07:06:06 pm »

Updated:

- Tweaked Tectonic borders and other world gen parameters
- Added river generation (Current visualization is just for testing, rivers don't alter height of a tile)
- Added temperature map mode (still very crude)
- Started organizing data better to start working on biomes
- Added restart button to generate another world from scratch
- Added download link.
« Last Edit: July 12, 2016, 07:09:12 pm by 12doze12 »
Logged