Latest Uploads
Still Truckin'

rychan

Curlicue Fractals

Andy_A

heroextant ... -small.png

HoboBen

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

Jayenkai

Help_Fight ... rivacy.png

Jayenkai

Gameboy...Colour!!

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 671|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Shoutbox Topic - 381
rockford Fri 22:48
PIP Crap
therevillsgames Fri 15:30
AGameAWeek : 2016 - Part One
Jayenkai Fri 13:01
Gameboy Racing Game in progress.
rockford Thu 13:27
What Size is the Image
Jayenkai Thu 02:59
Offsetting Time
Jayenkai Thu 00:30
Mystery Milk
steve_ancell Wed 04:46
RIP : Burt Kwouk
Jayenkai Tue 10:32
Vehicle For Sale
Jayenkai Tue 05:31
Unexplainable Compiler Slowdown
therevillsgames Mon 15:32
More

Latest Items
Snippet : Blurring and Dripping, rectangles
Pakz Thu 05:52
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
Showcase : You Shall Die
rychan Sun 12:47
Showcase : Mojo2 html5 animation
Pakz Wed 14:05
Snippet : Little Spinning Grid
Pakz Wed 13:45
Snippet : Make Trees
HoboBen Tue 16:11
Showcase : No Plumbing Required
steve_ancell Mon 10:51
Blog : Feedback
Pakz Fri 14:05
Showcase : 8-Bit Boulders
steve_ancell Wed 08:19
Dev-Diary : PS2 to N64 Adapter
Jayenkai Wed 03:07
Dev-Ideas : Pixel editor
Jayenkai Mon 23:40
More

Who's Online
Pakz
Fri, at 23:49
Dabz
Fri, at 23:44
9572AD
Fri, at 23:24
rockford
Fri, at 22:48
therevillsgames
Fri, at 22:30
spinal
Fri, at 22:20
steve_ancell
Fri, at 15:32
Jayenkai
Fri, at 14:31
GfK
Fri, at 13:32
shroom_monk
Fri, at 11:04
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.