Latest Uploads
isometric test

realtime

dungeon ma ... litz basic

realtime

Crystal Ca ... een So Far

rychan

Crystal Ca ... Screen V1

rychan

Day 5 Graphic

rychan

Mutanty Mo ... Workfiles.

steve_ancell

Forum Home

PlayMyCode: Tiled Procedural Caves/Maps

UserMessage
Posted : Monday, 07 May 2012, 02: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, 11: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, 13: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, 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
Win7 Installing
dna Sat 13:32
A New Theme!?
Jayenkai Sat 05:30
Ramble ramble/finishing stuff
therevillsgames Fri 19:41
Mint
Dabz Fri 01:02
Joe's Storytime
spinal Thu 13:31
Rest Period
Kuron Wed 22:24
RollerCoaster Tycoon 4
rychan Wed 04:44
Password Security Safety
dna Tue 20:48
GameJolt Revenue
Jayenkai Tue 13:04
AGameAWeek Progress Report
Jayenkai Mon 14:41
More

Latest Items
Blog : DX9Engine
caligula Fri 06:39
Blog : EmuMenu
rickdangerous Fri 04:16
Showcase : BambooBasic
Dabz Thu 18:46
Blog : FInally Some Game Dev Time
rychan Thu 15:35
Family : :c(
steve_ancell Thu 04:58
Showcase : isometric prototype
Jayenkai Thu 04:31
Showcase : dungeon maker algorithm
Jayenkai Wed 01:42
Dev-Diary : More Screens
Kuron Sat 09:01
News : Newsletter #221
Dabz Fri 10:07
Dev-Diary : Crystal Catch Development
rychan Thu 14:38
Link : Sfxr
rychan Thu 04:16
Showcase : SpringySquirrel
Jayenkai Tue 22:58
Dev-Diary : More Planning and Framework Learning
rychan Tue 17:23
Dev-Diary : Another Song
Kuron Tue 09:10
Link : Free 3D characters!
Jayenkai Mon 05:48
More

Who's Online
Evil Roy Ferguson
Sat, at 20:10
9572AD
Sat, at 20:00
shroom_monk
Sat, at 18:10
HoboBen
Sat, at 17:53
caligula
Sat, at 17:21
steve_ancell
Sat, at 16:56
dna
Sat, at 16:33
Jayenkai
Sat, at 15:26
rychan
Sat, at 14:52
rockford
Sat, at 14:25
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.