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
Dev Costs
CodersRule Mon 18:14
Screen Burn of the Mind
steve_ancell Mon 11:38
RoadRash!
Mog Mon 10:56
Progress / Location Bars
Afr0 Mon 10:28
Noel's Graduation
rockford Mon 07:37
Development via GUI
waroffice Mon 02:48
Audio Rant
steve_ancell Sat 19:16
Wrong Partition!!!!?
spinal Sat 11:24
eBay Lies
spinal Fri 23:44
Shoutbox Topic - 968
dna Fri 19:42
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
Evil Roy Ferguson
Mon, at 19:16
CodersRule
Mon, at 19:11
steve_ancell
Mon, at 18:00
9572AD
Mon, at 17:31
Mog
Mon, at 17:30
Jayenkai
Mon, at 17:22
dna
Mon, at 16:18
Hotshot
Mon, at 15:32
rockford
Mon, at 14:55
shroom_monk
Mon, at 14:55
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.