Latest Uploads
Socoder_9yo.png

Jayenkai

They Are E ... where - GB

rychan

image-29-0 ... -20-30.jpg

Jayenkai

God Of War 107999

gameleaper

Music. How ... do I even?

rychan

GodOfMiniWars

gameleaper

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
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
SoCoder : Getting Older
rychan Fri 17:25
They Are Everywhere - Gameboy Edition Updates
rychan Fri 17:24
Ohh Gameboy Dev, nyom nyom!
rychan Fri 17:19
Great Big Youtube thread
Jayenkai Fri 12:52
Dangermouse!
Jayenkai Fri 12:40
Dabz's Holiday! (Again?)
steve_ancell Fri 11:46
Weekend Plans
steve_ancell Fri 06:58
InDev : NeonPlat Adventures 2
rychan Thu 16:45
Cradle To Grave
rockford Thu 14:25
Argh! My Eyes!!
Jayenkai Thu 10:44
More

Latest Items
Showcase : Spike Dislike GB
rychan Tue 15:35
Blog : Back on the run
rychan Wed 01:03
Showcase : The Catcher Van
rychan Mon 04:40
Showcase : GodOfMiniWars
gameleaper Sun 20:12
Blog : Doctor Two
Jayenkai Tue 09:15
Showcase : WarTactical
gameleaper Mon 17:08
Showcase : Daily Dungeon
rychan Sun 05:33
Showcase : isometric prototype
Dabz Fri 12:43
Dev-Diary : Helichopper stuffs
Jayenkai Sat 18:10
Showcase : HexWarrior
gameleaper Thu 07:48
Showcase : SpikeDislike3
rychan Sun 13:51
Rant : Refresh Creations -> Refresh Games
rychan Sun 08:20
Link : Ban gay marriage?!
steve_ancell Sat 18:01
Article : Advanced BBCode
Jayenkai Sat 06:02
Showcase : Snake Me Do
rychan Thu 15:04
More

Who's Online
Jayenkai
Fri, at 19:43
Tikihead
Fri, at 18:47
Dabz
Fri, at 18:14
rychan
Fri, at 18:07
steve_ancell
Fri, at 16:58
GfK
Fri, at 16:11
rockford
Fri, at 14:16
spinal
Fri, at 12:37
shroom_monk
Fri, at 09:39
gameleaper
Fri, at 06:48
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.