Latest Uploads
image-17-0 ... -18-36.jpg

Jayenkai

image-07-0 ... -20-20.jpg

Jayenkai

Kuron Cap Get!

rychan

Merry Christmas

Jayenkai

Invasion V ... tup screen

rychan

image-07-1 ... -20-59.jpg

Jayenkai

Forum Home

PlayMyCode: Tiled Procedural Caves/Maps

UserMessage
Posted : Monday, 07 May 2012, 03:09 | Permalink
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.
Homepage : http://www.fivesprites.com
Posted : Monday, 07 May 2012, 12:57 | Permalink | Mark Here
rockford


We discussed something like this before - socoder.net/index.php?topic=2308&seenpost=26508#26508
Posted : Monday, 07 May 2012, 14:15 | Permalink | Mark Here
Krakatomato


Thanks for the excellent link - provides greater detail to the other I posted
Homepage : http://www.fivesprites.com
Posted : Tuesday, 08 May 2012, 10: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
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Pebble Watch Clocks
spinal Thu 00:18
Jayenkai's Daily Blog! Attempt #3923
Jayenkai Wed 05:43
InDev : SpikeDislike3
Jayenkai Tue 14:48
Monkey 2 announced
Jayenkai Tue 11:25
Great Big Youtube thread
Jayenkai Tue 09:12
NerdBlock
Jayenkai Tue 05:02
Moon Pics
Jayenkai Tue 03:13
Star Wars Theme
therevillsgames Mon 15:12
Survived another Ludum Dare
rychan Mon 07:59
Expecting '')''
spinal Mon 03:57
More

Latest Items
Dev-Diary : Helichopper stuffs
steve_ancell Wed 15:00
Blog : Back on the run
rychan Tue 01:41
Showcase : Crime (reloaded)
rockford Wed 07:30
Showcase : Blockman Forever
Steve Elliott Sun 12:42
Snippet : Lotto Number
Jayenkai Thu 15:14
Showcase : Invisible Munky 2
Jayenkai Thu 04:52
Blog : New Fence..
steve_ancell Wed 11:28
Snippet : Rotating Sphere
Dabz Sun 19:36
Woot : Three Years Later...
Kuron Fri 07:05
Snippet : IFS Fractal Viewer
Andy_A Mon 14:20
Showcase : Futrino
Jayenkai Thu 06:16
Showcase : Millenipede
Steve Elliott Mon 17:44
Snippet : Simple stack-based interpreter
tbohon Wed 12:08
Showcase : Santa's Workout 2
jayparker Tue 00:43
Dev-Diary : Stripping it All Away
Jayenkai Mon 01:57
More

Who's Online
rockford
Thu, at 00:25
Hotshot
Thu, at 00:24
spinal
Thu, at 00:20
GfK
Thu, at 00:13
Dabz
Wed, at 23:24
blanko1324
Wed, at 19:29
steve_ancell
Wed, at 17:46
Jayenkai
Wed, at 15:04
shroom_monk
Wed, at 11:35
rychan
Wed, at 08:46
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.