Latest Uploads
Dungeon Ga ... n Progress

rychan

image-17-0 ... -18-36.jpg

Jayenkai

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

Jayenkai

Kuron Cap Get!

rychan

Merry Christmas

Jayenkai

Invasion V ... tup screen

rychan

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
Car MOTs
Jayenkai Thu 02:04
Jayenkai's Daily Blog! Attempt #3923
Jayenkai Thu 01:23
Spinal's SNES Controller
spinal Thu 00:55
Great Big Youtube thread
Jayenkai Wed 16:56
InDev : SpikeDislike3
Jayenkai Wed 11:43
Musical Tastes
GfK Wed 03:45
The 4G Mobile Data Issue
Jayenkai Wed 03:33
Monitor ''Hz''
Jayenkai Wed 02:10
Artistic Payments
rychan Tue 15:27
Moon Pics
therevillsgames Tue 14:59
More

Latest Items
Blog : tuum
steve_ancell Thu 00:25
Blog : Back on the run
rychan Tue 13:23
Dev-Diary : Helichopper stuffs
GfK Thu 09:13
Showcase : Crime (reloaded)
rockford Wed 07:30
Showcase : Blockman Forever
Steve Elliott Sun 12:42
Snippet : Lotto Number
Jayenkai Thu 15:14
Showcase : Invisible Munky 2
Jayenkai Thu 04:52
Blog : New Fence..
steve_ancell Wed 11:28
Snippet : Rotating Sphere
Dabz Sun 19:36
Woot : Three Years Later...
Kuron Fri 07:05
Snippet : IFS Fractal Viewer
Andy_A Mon 14:20
Showcase : Millenipede
Steve Elliott Mon 17:44
Snippet : Simple stack-based interpreter
tbohon Wed 12:08
:
Wed 17:00
:
Wed 17:00
More

Who's Online
ferdi
Thu, at 02:49
Jayenkai
Thu, at 02:36
Krakatomato
Thu, at 02:15
GfK
Thu, at 01:58
shroom_monk
Thu, at 01:57
spinal
Thu, at 01:15
rychan
Thu, at 00:40
steve_ancell
Thu, at 00:27
tuum
Thu, at 00:16
Afr0
Wed, at 23:16
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.