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
Saving Youtube Videos
Jayenkai Wed 16:43
Slow or Something?
Jayenkai Wed 16:24
AGameAWeek : Year 7 : Part One
Jayenkai Wed 16:22
Daily Doodles
Kuron Wed 06:37
Welcome, Steve Elliott
Dabz Wed 05:41
Benefits for low incomes - not known for most.
Pakz Tue 18:26
rockford Tue 12:04
Drip Drip Drip
steve_ancell Tue 09:34
The Mighty Wheel of Scrollability
rychan Tue 05:14
Purchase Me Do
rychan Mon 16:59

Latest Items
Showcase : Millenipede
Steve Elliott Mon 17:44
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

Who's Online
Wed, at 16:50
Wed, at 16:18
Wed, at 14:50
Wed, at 14:31
Wed, at 13:03
Wed, at 12:58
Wed, at 10:22
Wed, at 09:30
Steve Elliott
Wed, at 05:01
Wed, at 02:07
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.