Latest Uploads
terraintest.png

GfK

RobotMindsv18

gameleaper

Chariot racing

gameleaper

LandOfTheFlies

gameleaper

Dungeon Ga ... n Progress

rychan

image-17-0 ... -18-36.jpg

Jayenkai

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
Finishing off things, who'd have thought!
rockford Tue 10:01
Coding For Fun...
rockford Tue 09:56
No Everything!
rychan Tue 08:33
Drunken Purchases
Dabz Tue 04:59
Musician for Hire
Pakz Tue 04:23
Spinal Movement
spinal Mon 22:42
NerdBlock
rychan Mon 07:18
New Channel Intro - Opinions please :)
HoboBen Sun 17:26
Change of Pace
GfK Sun 14:55
Great Big Youtube thread
Jayenkai Sun 12:49
More

Latest Items
Showcase : SpikeDislike3
rychan Sun 13:51
Showcase : Daily Dungeon
rychan Sun 10:26
Rant : Refresh Creations -> Refresh Games
rychan Sun 08:20
Link : Ban gay marriage?!
steve_ancell Sat 18:01
Article : Advanced BBCode
Jayenkai Sat 06:02
Showcase : Snake Me Do
rychan Thu 15:04
Blog : Back on the run
rychan Wed 13:31
Showcase : 3DRetroPrivateer41
gameleaper Sat 09:02
Showcase : HexWarrior
rockford Fri 11:43
Showcase : RobotMinds
gameleaper Thu 14:50
Showcase : isometric prototype
realtime Thu 01:57
Blog : 3DRetroPrivateer41
gameleaper Wed 20:10
Showcase : WarTactical
gameleaper Wed 19:32
Showcase : TheLandOfTheFlies48Bee
gameleaper Wed 19:17
Dev-Diary : Helichopper stuffs
GfK Sun 06:07
More

Who's Online
GfK
Tue, at 12:31
Jayenkai
Tue, at 12:15
Dabz
Tue, at 11:52
Afr0
Tue, at 11:43
rockford
Tue, at 10:13
rychan
Tue, at 09:33
shroom_monk
Tue, at 09:22
Tikihead
Tue, at 09:08
gameleaper
Tue, at 08:31
steve_ancell
Tue, at 07:55
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.