Latest Uploads
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

mono images

rockford

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
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
Evil Mongoose
Mog Mon 12:27
Arachnophobics Beware
steve_ancell Mon 03:36
confirmation form?
steve_ancell Mon 02:08
Driver survives flying car ride.
steve_ancell Sun 15:17
Weather Symbols
dna Sun 15:00
WebDev Made Easy
dna Sun 13:59
More

Latest Items
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
Family : Life...
Dabz Mon 04:57
Dev-Diary : New Song
Kuron Sun 17:32
Blog : Got Distracted from code today
rychan Sat 16:52
Dev-Diary : Monkey Day 5
rychan Sat 06:53
Dev-Diary : Monkey Day 4
rychan Fri 13:31
Showcase : Mutant Monty
steve_ancell Fri 08:14
More

Who's Online
spinal
Wed, at 09:33
Evil Roy Ferguson
Wed, at 09:29
Jayenkai
Wed, at 09:21
rockford
Wed, at 08:18
HoboBen
Wed, at 07:08
steve_ancell
Wed, at 04:58
rychan
Wed, at 04:56
shroom_monk
Wed, at 04:13
therevillsgames
Wed, at 02:19
Hotshot
Wed, at 02:12
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.