Latest Uploads
Extraterre ... .0.1 (zip)

dantheman363

Monty Teas ... Screenie 1

steve_ancell

Santa Clau ... ed his bag

waroffice

manic_platdude.png

spinal

Tetris Clone

steve_ancell

Super blues bros.

spinal

Forum Home

PlayMyCode: Tiled Procedural Caves/Maps

UserMessage
Posted : Monday, 07 May 2012, 02:09 | Permalink | Mark Here
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.
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

-----
I came. I saw. I played.
Posted : Monday, 07 May 2012, 13:15 | Permalink | Mark Here
Krakatomato


Thanks for the excellent link - provides greater detail to the other I posted
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
Noel's Graduation
dna Sun 15:23
RoadRash!
Mog Sun 10:42
Screen Burn of the Mind
rockford Sun 09:01
Audio Rant
steve_ancell Sat 19:16
Wrong Partition!!!!?
spinal Sat 11:24
Progress / Location Bars
Afr0 Sat 03:15
eBay Lies
spinal Fri 23:44
Shoutbox Topic - 968
dna Fri 19:42
Development via GUI
JL235 Fri 07:59
Meh
Afr0 Fri 04:13
More

Latest Items
News : Newsletter #176
Jayenkai Sat 04:49
News : Newsletter #175
Dabz Tue 09:38
Blog : Snow: More Material Junk
Cower Sat 23:17
Dev-Diary : Mutant Monty: Amstrad CPC to Windows conversion
rockford Fri 13:14
Techy : AppleTV
Jayenkai Thu 09:40
Blog : Graphviz
steve_ancell Sat 14:17
Pets : Top-Down Shadow Hack
Jayenkai Tue 05:52
Snippet : JNKrunch v1.0
Jayenkai Sat 07:20
News : Newsletter #173
waroffice Fri 04:47
Blog : Material Loading
Cower Fri 02:08
Pets : I Done Won A Thing
shroom_monk Sun 11:31
Pets : Repurposing A Lexer
Cower Mon 22:06
Bah : Feeling a Little Angry
spinal Mon 11:26
News : Newsletter #170
Dabz Sat 00:34
Showcase : sbfgen
Cower Sat 16:57
More

Who's Online
HoboBen
Sun, at 23:26
Dabz
Sun, at 23:07
steve_ancell
Sun, at 23:03
Mog
Sun, at 21:58
therevillsgames
Sun, at 21:02
Evil Roy Ferguson
Sun, at 20:39
blanko1324
Sun, at 19:23
dna
Sun, at 18:46
JL235
Sun, at 18:42
CodersRule
Sun, at 18:12
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.