Latest Uploads
image-15-0 ... -19-40.jpg

Jayenkai

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

Jayenkai

Bumble Bee

dna

Tires

dna

Guess The Remake

rychan

Julia Set Visualer

Andy_A

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
Latest Posts
Wordpress Forwarding...
Jayenkai Thu 13:52
RIP Robin Williams
dna Thu 12:00
The Eternal Struggle Between Man and CSS
spinal Thu 11:19
AGameAWeek Progress Report
Jayenkai Thu 06:59
OUYA Plays AGameAWeek
Jayenkai Wed 02:25
New Server : Tests, Complaints, Arguments and More!
Jayenkai Tue 07:09
File Error
Jayenkai Mon 14:11
Be Safe. Trust No One
Jayenkai Mon 13:21
They Are Everywhere Gameplay Video at 2x Speed!
rychan Mon 06:19
Monkey vs Unity 2D
GfK Sat 09:09
More

Latest Items
Showcase : Space Rocket Adventurers
Jayenkai Wed 08:26
Blog : 20 Years Ago....
Jayenkai Sat 09:17
Techy : Back from Game Dev Con!
Jayenkai Sun 16:52
Family : Sunday
Jayenkai Wed 03:31
Family : Good News (for once)
Kuron Tue 15:37
Showcase : Don't Tap The Zombies
therevillsgames Mon 16:26
Showcase : Mutant Monty
steve_ancell Wed 19:26
Blog : Update
Kuron Mon 13:52
Techy : New Laptop!?
Kuron Fri 15:52
Showcase : Ascension 2 Live Wallpaper
CodersRule Fri 13:48
Showcase : Saviors of Gundthor
CodersRule Fri 12:50
Showcase : Lava Monkey
rychan Tue 16:13
Blog : Mac Rant!
rockford Fri 14:48
Dev-Diary : Yup, another song
Kuron Wed 06:39
Pets : Old pic to share...
rockford Sat 17:01
More

Who's Online
rychan
Fri, at 01:42
spinal
Fri, at 01:22
Jayenkai
Fri, at 01:02
steve_ancell
Thu, at 21:04
9572AD
Thu, at 20:19
HoboBen
Thu, at 19:47
rockford
Thu, at 15:58
shroom_monk
Thu, at 14:26
dna
Thu, at 13:32
brdtt12
Thu, at 08:34
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.