Tilemap Terrain procedurally generated

Started by
0 comments, last by Bregma 7 years, 5 months ago

Hi,

I'm developing the engine for a 2D mmorpg (things are going quite well, as soon as I have a "playable" thing, I will surely post about it :) ).

The thing I'm having problem with is the terrain generation. (of course I am a totally noob in that field).

I want to generate a tilemap with various "heights level, and of course I could use one of the many technique/algorithm available...

The problem is that while for now when I generate a chunk tilemap I can generate it totally indipendent from what's around it because for now there is only one height, if I need various heights in the maps of course I can't, because I can't just put the heights on the chunk tiles without having informations about the sorrounding things.

The server of course just send you the world seed, so the problem is that when you build a chunk, probably you haven't build the sorrounding chunks yet...

Let's say I want to generate the chunk at position (2,2): of course I can't randomly put the terrain heights chunk by chunk: that would be pretty horrible.

for the chunk (2,2) I would like to be able to know what the tilemaps are in the chunks (1,2), (3,2), (2,1), (2,3) ecc, but I don't have them!

I'm basically searching a function that given the X and Y coordinates of a "chunk", and given the world seed, tells me what will be the tilemap for that portion of world, placing "heights" around it in a reasonable pattern but of course the only information about what's around me are the coordinate of the chunks.

Hopefully you will understand the question, and probably it's a really simple thing.

Thank you.

Leonardo

ps: what are the best book/tutorial/paper/article to learn the basics of procedural content generation?

Advertisement

You might find this handy.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement