Creating a map like in banished

Hi,

I recently started playing Banished and I like it so far. I come from a business and web development back ground and want to spend the next years on some game development in my spare time.
As a library I want to use play-clj (https://github.com/oakes/play-clj) which is a wrapper around libGDX.

Now, what I would like to know is how I can generate such a random map like in Banished (Just google for
“banished world map” in google images search).

Are there any tutorials / books / whatever out there that explain how to generate such a map? I have started reading a book and searching, but get confused by tiles and sprites and voxels and what not.

I am thankful for any useful advice you have.

Thanks,
Sven

if you really want to get into game programming I don’t really suggest Java, but rather C++. It’s just more commonly used. They both have their upsides and downsides but in general I’d use C++ for game programming. However, if you are intent on using Java, then actually learn the language first. After that take a look at LWJGL. If you search the forums you’ll see at least 10 other threads asking this question. I know you’re asking about a specific thing but from the info you’ve given us it looks like you haven’t even learned Java or anything else about graphics programming.

If you have, look into perlin noise. Then you can do a few passes after that to generate the trees and rivers. Of course it’s a little more in depth than that but I think that’s the basic idea. The reason I’m not going into detail is because of the reasons I stated above. Good luck!

Hi,

Thanks for your answer.

Maybe I should have told a bit more about me. I do code for almost 15 years now, starting with C back in the days. The last 3 years I have been doing java only at my daytime job and in the last year I spent my spare time with clojure, so while I may not be an expert in this field I guess I know enough to start learning game development in java / clojure.

And yes, I know that most games are written in C / C++, but for my spare time I want to use a language that is fun to use and my memories regarding C can be described with a lot of words, but fun surely is not one of them :smiley:

Thanks,
Sven

You might get some inspiration from here: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/

Once you have “biomes” or whatever terrain type regions decided, trees, buildings, etc. can be placed via blue noise/poisson sampling.

There’s many other topics both here and elsewhere googlable that discuss the topic of terrain generation.

Thanks, thats an interesting read with a lot of links and enough to research.

Sven

Look around for Perlin/Simplex noise or Diamond-Square algorithm. Your answer most likely lies in there plus some sort of rivercreation. The voronoi-stuff isn’t what you are looking for.
The guy behind Banished made some youtube clips during creation, probably speaks about map making in there, or in a blog-post.

As for language, Java is fine. C++ is used more because it lies in the history, they use it because they have used it before and don’t want to spend time and money. It’s great for games, but not an absolute must for games. In today’s world with a lot of indies everyone is free to chose whatever, depending on what platforms they want to release on.

Thanks for the hint.
I found some code that does simplex noise and creates an image from it. So far so good, I have been playing around with it.

Now, what I cannot connect is how do I create some map from this. Of course, I have a lot of random date with a nice distribution, do I need textures that I place together according to the data? Or do I create an image from it by mapping color values to the random data?
What makes more sense?

Whatever I do, this should be a one time step, right?

If you want a 2dmap you simply go trough and decide what tile should be at what number, between this and that is sea tile, between these land, etc.
If you want a 3dmap you’ll have a heightmap, use it to make the 3dmap.

You choose the tile type by checking a range of values in the noise. For example, a water tile could be a noise value of <-0.5f, grass tile could be noise value between -0.5f and .25f, and a dirt tile >0.25f. You can play around with number of octaves and different parameters to create different types of terrain, and mess with these numbers to get terrain you’re looking for.

You can also experiment with using multiple noise values to generate a more varied terrain, but that gets much more complicated.