| User | Message |
|
Posted : Monday, 07 May 2012, 02:09 | Permalink | Mark Here |
Krakatomato
 
|
A few months ago I was playing around with procedural cave generation and came across an idea by Noel Berry that used the concept of "miners" to create the map. I knocked up a prototype using PlayMyCode which produced the following:
Obviously, the above is pretty ugly and needs to be tiled to look more like a map. The usual approach is to use a shedload of nested if/else statements, but last night I came across this incredible idea:
www.saltgames.com/2010/a-bitwise-method-for-applying-tilemaps/
so I applied it (very quickly I might add) to the above map generator and ended up with:
(Use the arrow keys to move the map around and hold down shift and press up or down to scale it)
The tiling code is ridiculously short and simple - amazing 
The source code is available on PMC.
|
 | |
|
Posted : Monday, 07 May 2012, 11:57 | Permalink | Mark Here |
rockford

 
| |
Posted : Monday, 07 May 2012, 13:15 | Permalink | Mark Here |
Krakatomato
 
|
Thanks for the excellent link - provides greater detail to the other I posted  |
 | |
|
Posted : Tuesday, 08 May 2012, 09:21 | Permalink | Mark Here |
daniel11111112

 
|
awesome ive been thinking of starting a dungeon crawler/rpg but didnt know how to do a randomly generateing map so ill try this :3 | | |
|