Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Simple 2D Terrain Generation (ASCII-based)

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 mtimjones   Members   

115
Like
0Likes
Like

Posted 05 July 2014 - 06:21 PM

I've been experimenting with terrain generation and have developed a couple of simple algorithms to build 2D maps.  I'm curious what other's use?

 

The two approaches are cellular automata based, where the terrain is seeded and then the CA averages the seeds over the space.  The first algorithm supports three types of objects in the terrain since it is value based (< 0, == 0, > 0).  The second algorithm maintains seed types in the space, and does not allow the seeds to intermix.  

 

The first algorithm looks like more believable terrain, but the second is more generalized (but needs more work to create more random formations).  You can find the code (for Linux) through the link below.

 

https://code.google.com/p/2dgen/

 

Anyone else develop algorithms like this?  What approach do you use?

 

Thanks,

 

Tim.

 



#2 arka80   Members   

1932
Like
0Likes
Like

Posted 10 July 2014 - 09:44 AM

I find very useful particle deposition for wilderness. I have a journal entry on the subject. 

I am managing to make it work for forests and caves also, using with A* to generate connections.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.