Latest Uploads
IFS Viewer 3

Andy_A

Still Truckin'

rychan

Curlicue Fractals

Andy_A

heroextant ... -small.png

HoboBen

image-25-0 ... 26-04.jpeg

Jayenkai

Help_Fight ... rivacy.png

Jayenkai

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 34|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
KORG Gadget update : July 2016
Jayenkai Fri 10:19
Unity pisses me off
steve_ancell Fri 08:52
RIP : Ploppy
steve_ancell Fri 08:03
DaXX Does Dreams
Pakz Fri 03:40
Monkey2 Arrives
Pakz Fri 03:26
First Person Mouse code request :)
Jayenkai Fri 03:02
Poll : Touchpad vs Nub vs Mouse
GfK Fri 00:51
Showerless
steve_ancell Thu 01:22
Taytotastic
rockford Wed 11:28
House Prices
spinal Wed 02:30
More

Latest Items
Snippet : Thousands of 3D Cubes
Pakz Fri 02:49
Showcase : Go!
rychan Thu 23:13
Snippet : Random 3d maps FPS
Pakz Mon 13:33
Showcase : IFS Viewer 3
Andy_A Mon 13:29
Showcase : Map Generator variation
Pakz Sat 00:08
Showcase : Popcorn Bucket
Jayenkai Mon 13:15
Showcase : Colour Guesser
Jayenkai Sun 06:31
Showcase : Unseen
rychan Mon 03:31
Snippet : Simple Dungeon level Generator
Andy_A Wed 07:44
Snippet : Simple Dungeon level Generator(mx)
Pakz Tue 06:23
Showcase : Curlicue Fractals
Jayenkai Sun 08:41
Showcase : Grey backgrounds
Pakz Sun 07:43
News : Newsletter #265
steve_ancell Fri 02:58
Showcase : Jumble Blocks
steve_ancell Mon 09:44
Showcase : Harpoons and Balls
Ninjinister Mon 07:29
More

Who's Online
GfK
Fri, at 10:55
Dabz
Fri, at 10:38
Jayenkai
Fri, at 10:36
spinal
Fri, at 09:54
steve_ancell
Fri, at 09:28
Pakz
Fri, at 09:20
rockford
Fri, at 08:41
Andy_A
Fri, at 07:10
shroom_monk
Fri, at 03:54
therevillsgames
Fri, at 03:04
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.