We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › 2D Tile Terrain Generator
Page Index Toggle Pages: 1
2D Tile Terrain Generator (Read 6038 times)
2D Tile Terrain Generator
May 17th, 2009, 10:00pm
 
Greetings

I have always wanted to dynamically generate my 2D worlds, which I partially accomplished with random tile/building placement, but I was clueless on how to make the large terrain features (mountains / rivers). I decided to use my limited knowledge of Perlin Noise to generate a 2D height-map for a x*y sized map. Using this, I set the water table height along with sand, mountain, and snow heights. I then came up with the river generating algorithm (which was the bulk of the program) to attempt realistic looking/flowing rivers. If the river reaches flat ground, it pools up into a lake. Let me know what you think!

You can find it on my portfolio page: http://mavdisk.mnsu.edu/kallhw/games.html


or directly here:http://mavdisk.mnsu.edu/kallhw/world/world.html
Re: 2D Tile Terrain Generator
Reply #1 - May 17th, 2009, 10:58pm
 
I like it, maybe you can try to use some sort of textures, to give it a more realistic look instead of this pixellook.
Only thing i would work on are the rivers. Guess this still could be improved.
Re: 2D Tile Terrain Generator
Reply #2 - May 18th, 2009, 2:41pm
 
Ben;
Wow, just wow.
You're a bit quick pulling the trigger.

I can't see any similarities in those examples.
Re: 2D Tile Terrain Generator
Reply #3 - May 18th, 2009, 2:44pm
 
hmm, me either... i thought you come up with something more obvious but i guess its fine. friends again...
Re: 2D Tile Terrain Generator
Reply #4 - May 18th, 2009, 2:48pm
 
if (wrong) self = jerk;
else notEndOfWorldAnyhow = true;
if ((wrong) || (!wrong)) inappropriate = true;
if (inappropriate){
 comments.remove();
 apologize();
}

Sorry, I am being a bit jumpy due to interface similarities I think.  Good start on a game that has some interesting parallels with my own work.
Re: 2D Tile Terrain Generator
Reply #5 - May 18th, 2009, 2:59pm
 
Lips Sealed
Re: 2D Tile Terrain Generator
Reply #6 - Jul 6th, 2009, 1:18am
 
Hello,

U'r code is really great.

I really like to see u'r source code but tje link on u'r webpage doesn't work. Is there a way to get it ?

THank's a lot and good work !

Ads
Re: 2D Tile Terrain Generator
Reply #7 - Jul 7th, 2009, 10:31am
 
I just realized that the university that hosts my site doesn't like the pde files. I changed this source code to a .txt file for viewing. Thanks for the interest!
Page Index Toggle Pages: 1