Latest Uploads
isometric test

realtime

dungeon ma ... litz basic

realtime

Crystal Ca ... een So Far

rychan

Crystal Ca ... Screen V1

rychan

Day 5 Graphic

rychan

Mutanty Mo ... Workfiles.

steve_ancell

Forum Home

PlayMyCode: Tiled Procedural Caves/Maps

UserMessage
Posted : Monday, 07 May 2012, 02: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, 11: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, 13: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, 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
Latest Posts
AGameAWeek Progress Report
rychan Thu 14:15
Little Lever News
rychan Wed 11:02
Rooting for OUYA
9572AD Tue 19:07
Scene Demos
rockford Tue 07:46
Happy Easter
rockford Mon 11:10
Jay gets a Wii U
Jayenkai Sun 07:14
Win7 Installing
dna Sat 13:32
A New Theme!?
Jayenkai Sat 05:30
Ramble ramble/finishing stuff
therevillsgames Fri 19:41
Mint
Dabz Fri 01:02
More

Latest Items
Dev-Diary : Another Evening Of Coding Approaches!
rychan Thu 16:49
Dev-Diary : Yet another one...
Kuron Wed 22:38
Snippet : Balls!
rychan Wed 13:49
Blog : DX9Engine
Kuron Tue 05:22
Family : :c(
Kuron Tue 04:27
Blog : EmuMenu
rickdangerous Fri 04:16
Showcase : BambooBasic
Dabz Thu 18:46
Blog : FInally Some Game Dev Time
rychan Thu 15:35
Showcase : isometric prototype
Jayenkai Thu 04:31
Showcase : dungeon maker algorithm
Jayenkai Wed 01:42
Dev-Diary : More Screens
Kuron Sat 09:01
News : Newsletter #221
Dabz Fri 10:07
Dev-Diary : Crystal Catch Development
rychan Thu 14:38
Link : Sfxr
rychan Thu 04:16
Showcase : SpringySquirrel
Jayenkai Tue 22:58
More

Who's Online
rychan
Thu, at 16:50
Jayenkai
Thu, at 16:37
shroom_monk
Thu, at 15:39
steve_ancell
Thu, at 15:25
spinal
Thu, at 14:16
rockford
Thu, at 14:02
Kuron
Thu, at 13:00
Dabz
Thu, at 12:46
Krakatomato
Thu, at 11:17
DrOnuki
Thu, at 09:47
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.