Latest Uploads
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

3lanc.jpg

GfK

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
Dangermouse!
Jayenkai Wed 16:12
The Sunny Funny One
rychan Wed 15:46
They Are Everywhere - Gameboy Edition Updates
rychan Wed 15:42
New Logo for Google
Jayenkai Wed 15:11
Weekend Plans
therevillsgames Wed 15:00
Dabz's Holiday! (Again?)
therevillsgames Wed 14:58
Windows Sidebar Widgets
rockford Wed 11:40
NerdBlock
Jayenkai Wed 06:09
InDev : NeonPlat Adventures 2
rychan Tue 23:57
Ohh Gameboy Dev, nyom nyom!
rychan Tue 16:35
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
Wed, at 16:30
GfK
Wed, at 16:18
rychan
Wed, at 15:46
blanko1324
Wed, at 15:10
therevillsgames
Wed, at 15:00
rockford
Wed, at 14:27
steve_ancell
Wed, at 14:04
shroom_monk
Wed, at 12:39
Pakz
Wed, at 11:49
spinal
Wed, at 08:40
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.