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

Jayenkai

Help_Fight ... rivacy.png

Jayenkai

Gameboy...Colour!!

rychan

Day 1 - Ga ... eboy Racer

rychan

Pain_Claim.png

Jayenkai

Monkey Maz ... pload test

Pakz

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
Windowblinds 10
Jayenkai Sun 03:54
TheRevillsPaving
Dabz Sat 23:42
AGameAWeek : 2016 - Part One
Jayenkai Sat 13:33
NerdBlock
rockford Sat 12:20
Snow!! ...?
rockford Sat 03:54
Twitter Sillyness
steve_ancell Sat 01:58
New Spray : Enforced Fun
Jayenkai Fri 05:22
Boiling Your Feet
spinal Thu 13:15
PIP Crap
Jayenkai Thu 10:47
Nintendo News - April 2016
rockford Wed 09:05
More

Latest Items
Blog : Feedback
Pakz Fri 14:05
Blog : Pixeljoint
Pakz Thu 14:08
Blog : Sprite editor getting better.
Pakz Thu 01:25
Showcase : 8-Bit Boulders
steve_ancell Wed 08:19
Blog : Testing out my Pixel editor
Pakz Wed 07:10
Dev-Diary : PS2 to N64 Adapter
Jayenkai Wed 03:07
Dev-Ideas : Pixel editor
Jayenkai Mon 23:40
Showcase : Geartography
Jayenkai Mon 02:55
Showcase : Blitzplus Pixeling Tool Project
Pakz Sun 21:36
Snippet : Sprite editor 16x16 10 colors
Jayenkai Sat 12:50
Showcase : Nags Heed Darts
Dabz Tue 11:05
News : Newsletter #259
Dabz Tue 02:20
Showcase : Farming Game
realtime Thu 18:53
News : Newsletter #258
Dabz Fri 12:59
Snippet : naturaltime.py
HoboBen Sun 01:19
More

Who's Online
Jayenkai
Sun, at 04:30
steve_ancell
Sun, at 02:39
spinal
Sun, at 02:08
Dabz
Sun, at 00:52
9572AD
Sat, at 17:34
therevillsgames
Sat, at 16:22
Krakatomato
Sat, at 14:58
HoboBen
Sat, at 13:49
rockford
Sat, at 13:25
Pakz
Sat, at 13:08
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.