Latest Uploads
Bumble Bee

dna

Tires

dna

Guess The Remake

rychan

Julia Set Visualer

Andy_A

Julia Set Visualizer

Andy_A

image-07-0 ... -34-29.jpg

Jayenkai

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
They Are Everywhere Gameplay Video at 2x Speed!
rychan Fri 09:35
What's your project worth?
Afr0 Fri 08:22
What have you done? - July 2014
rychan Thu 11:32
Dig out the VCR!!
steve_ancell Thu 04:57
Google : LanguageName KnownCommand
dna Wed 13:26
Jay's New Lumia 1020
Jayenkai Mon 23:47
AGameAWeek Progress Report
Jayenkai Mon 14:49
Mog's Village
Jayenkai Mon 02:06
Ants?
steve_ancell Sat 13:22
More

Latest Items
Techy : Back from Game Dev Con!
Jayenkai Sun 15:52
Family : Sunday
Jayenkai Wed 02:31
Family : Good News (for once)
Kuron Tue 14:37
Showcase : Don't Tap The Zombies
therevillsgames Mon 15:26
Showcase : Mutant Monty
steve_ancell Wed 18:26
Blog : Update
Kuron Mon 12:52
Techy : New Laptop!?
Kuron Fri 14:52
Showcase : Ascension 2 Live Wallpaper
CodersRule Fri 12:48
Showcase : Saviors of Gundthor
CodersRule Fri 11:50
Showcase : Lava Monkey
rychan Tue 15:13
Blog : Mac Rant!
rockford Fri 13:48
Dev-Diary : Yup, another song
Kuron Wed 05:39
Pets : Old pic to share...
rockford Sat 16:01
Blog : EmuMenu
spinal Sat 10:07
Family : More bad news :c(
Kuron Mon 06:07
More

Who's Online
HoboBen
Fri, at 18:31
steve_ancell
Fri, at 17:21
shroom_monk
Fri, at 17:17
dna
Fri, at 16:56
rychan
Fri, at 16:11
Jayenkai
Fri, at 16:08
rockford
Fri, at 14:00
Afr0
Fri, at 13:38
spinal
Fri, at 11:14
Cower
Fri, at 09:59
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.