Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Terrain Generator

Sign in to follow this  


Download the thing if you want. An approximation on how long it takes to generate a map might be useful if you feel like sharing.

It's the roots of a simple random map generator. It works decently. Not great, but.. decent. Hit space (or most other keys) to generate a map. Escape is exit. Now if I could just make this kind of progress every day, I might actually be closer to getting this damned thing done.

Sign in to follow this  


Recommended Comments

It took my pretty low-end computer a second or two each map. They look pretty good and fairly realistic. I did notice perfect hexagonal islands appearing every five or so maps, which was interesting. Roughly how does it work? I worked on generating random maps for my now frozen TBS project, and it would be interesting to hear your overall method.

Share this comment

Link to comment
It's a bit weird, but I'll try to explain it best I can.

The basic gist of it is the generator spitting out random patches of "earth" on a map of water. The patches are mutilations of hexagons, which is a result of using my heuristic to determine the basic shape and size of the land patches. That'd explain the hexagonal islands you described. Alterable variables include random size generators, and how much the generator is to favor trying to place earth on existing earth instead of water. I could send you the code if you want, but it's vague and uncommented.

I'll actually probably be ditching the code eventually. It's horribly inefficient, and a little too limited for my liking. But it got my brain flowing, so.

Share this comment

Link to comment
Pretty cool; I should write a land generator too and we can have a hoedown.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!