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
NerdBlock
Jayenkai Fri 14:52
AGameAWeek : 2016 - Part One
Jayenkai Fri 13:56
Twitter Sillyness
Jayenkai Fri 08:04
New Spray : Enforced Fun
Jayenkai Fri 05:22
Snow!! ...?
Jayenkai Fri 03:45
Boiling Your Feet
spinal Thu 13:15
PIP Crap
Jayenkai Thu 10:47
Nintendo News - April 2016
rockford Wed 09:05
What Have You Done? - April 2016
Jayenkai Wed 04:11
80s vs New York!
rockford Tue 22:22
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
Fri, at 15:51
Pakz
Fri, at 15:21
rockford
Fri, at 15:11
HoboBen
Fri, at 12:46
steve_ancell
Fri, at 12:27
spinal
Fri, at 11:55
Dabz
Fri, at 11:50
shroom_monk
Fri, at 03:06
therevillsgames
Thu, at 21:57
9572AD
Thu, at 19:54
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.