Latest Uploads
Day 1 - Ga ... eboy Racer

rychan

Pain_Claim.png

Jayenkai

Monkey Maz ... pload test

Pakz

image-26-1 ... 37-09.jpeg

Jayenkai

image-14-1 ... 50-52.jpeg

Jayenkai

Socoder_9yo.png

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
Pebble Watch Clocks
rockford Thu 07:14
Manga Studio
Jayenkai Thu 06:55
AGameAWeek : 2016 - Part One
Jayenkai Thu 04:22
React-ion
Jayenkai Wed 05:22
Pancake Noms
Dabz Tue 22:00
Usborne Coding Books
therevillsgames Tue 15:09
Happy Birthday, Stealth
Jayenkai Tue 03:10
Tin Can Alley
steve_ancell Mon 05:02
Die Alien Slime *cough* Walkthru
GfK Sun 14:52
Anybody recommend an artist?
GfK Sun 14:44
More

Latest Items
Showcase : Monkey Plotting
zzoom Tue 15:46
Showcase : Waifu Clicker
rychan Mon 14:54
Showcase : Space Station A6-100
Jayenkai Wed 12:20
Showcase : Novascape
rychan Fri 01:09
Showcase : Space INvasion Zero
rychan Wed 15:38
Showcase : Harpoons and Balls
Jayenkai Tue 02:46
Showcase : NeonPlat's Cosmic Adventure
Jayenkai Fri 12:56
Dev-Diary : Centipede remake
steve_ancell Wed 19:25
Showcase : Beta Collexion
rychan Mon 13:55
Dev-Diary : Global Variables!
rychan Thu 06:33
Showcase : Spike Dislike GB
rychan Wed 04:18
Blog : Back on the run
rychan Wed 01:03
Showcase : The Catcher Van
rychan Mon 04:40
Showcase : GodOfMiniWars
gameleaper Sun 20:12
Showcase : WarTactical
gameleaper Mon 17:08
More

Who's Online
Jayenkai
Thu, at 08:54
GfK
Thu, at 08:30
rockford
Thu, at 08:28
Pakz
Thu, at 07:29
Hotshot
Thu, at 07:19
spinal
Thu, at 06:41
Dabz
Thu, at 03:01
shroom_monk
Thu, at 02:12
rychan
Thu, at 00:56
therevillsgames
Wed, at 18:28
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.