Latest Uploads
Kuron Cap Get!


Merry Christmas


Invasion V ... tup screen


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


PixeLink - ... oween 2014


PixeLink P ... zle Editor


Forum Home

PlayMyCode: Tiled Procedural Caves/Maps

Posted : Monday, 07 May 2012, 03:09 | Permalink

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:

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 :
Posted : Monday, 07 May 2012, 12:57 | Permalink | Mark Here

We discussed something like this before -
Posted : Monday, 07 May 2012, 14:15 | Permalink | Mark Here

Thanks for the excellent link - provides greater detail to the other I posted
Homepage :
Posted : Tuesday, 08 May 2012, 10:21 | Permalink | Mark Here

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
Latest Posts
AGameAWeek : Year 7 : Part One
Jayenkai Sun 07:45
Daily Doodles
Kuron Sun 05:36
Favourite Consoles
Dabz Sun 00:36
Think before you Smurf!
steve_ancell Sat 17:29
Happy Birthday JamardaDigital
Kuron Sat 11:35
Penguin Party
rychan Fri 16:43
Watch Picking
rockford Fri 16:40
Cleanup on Aisle 404
Kuron Thu 13:23
My continued bad luck...
Jayenkai Wed 13:27
The Show WILL Go On
rockford Wed 13:00

Latest Items
Showcase : Flappy New Year
rychan Wed 02:49
Snippet : Simple stack-based interpreter
tbohon Wed 12:08
Link : Protolol
Afr0 Tue 10:53
Showcase : Santa's Workout 2
jayparker Tue 00:43
Dev-Diary : Stripping it All Away
Jayenkai Mon 01:57
News : Newsletter #245
rychan Fri 06:36
Showcase : GPS Fun Runner 3D
zzoom Wed 15:35
Showcase : The Biggest Snowman
rychan Mon 01:06
News : Newsletter #243
Dabz Thu 03:29
Dev-Diary : Scaling Back
rychan Wed 14:33
Showcase : Alpha Collexion
rychan Wed 06:23
Life : Health Update
rockford Thu 12:41
Blog : Powerball Hack
steve_ancell Tue 18:47
Hols : Advent Calendars
rychan Wed 04:56
Life : MIA until better
Jayenkai Mon 07:03

Who's Online
Sun, at 08:55
Sun, at 08:37
Sun, at 08:28
Sun, at 08:27
Sun, at 08:18
Sun, at 07:28
Sun, at 04:25
Sun, at 02:27
Sun, at 00:23
Sat, at 17:20
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.