Latest Uploads
Super Shap ... ration Kit

Andy_A

Platdude Spotting

Jayenkai

Nom nom nom

Jayenkai

Rainbow Trout

Pakz

King Salmon

Pakz

Snooker

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
rockford


WW Entries : 3
We discussed something like this before - socoder.net/index.php?topic=2308&seenpost=26508#26508
Posted : Monday, 07 May 2012, 14:15 | Permalink
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
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 710|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Shoutbox Topic - 240
steve_ancell Wed 14:32
New Pound Coin
Jayenkai Tue 14:45
Homefries
steve_ancell Tue 01:47
Jeremy Bloody Kyle
steve_ancell Mon 09:45
GamerBlock
Jayenkai Mon 09:06
Laptop Aaargh...
Jayenkai Mon 07:06
Changing Thumbnail Sizes
Jayenkai Mon 05:27
Technology on Planes
therevillsgames Sat 17:00
London Car/Stab Incident
steve_ancell Sat 12:10
A New Korg Gadget!
Jayenkai Sat 04:53
More

Latest Items
Link : Super Shapes Exploration Kit
Andy_A Tue 16:56
Snippet : Skylines
steve_ancell Tue 14:25
Blog : My Arduino experience.
steve_ancell Fri 13:45
Showcase : Infinitron
rychan Tue 03:02
Dev-Diary : PS2 to N64 Adapter
spinal Sun 10:49
Link : Vector Tutorials/Help page.
Pakz Thu 23:00
Blog : mini project
spinal Sun 10:13
Showcase : Blockman Returns
Jayenkai Fri 03:04
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
Snippet : Path Following
Pakz Mon 16:25
Snippet : Flowers (Jan 2017)
Kuron Thu 01:13
Showcase : Clusters of Hex
therevillsgames Mon 15:01
Article : Maths 101 - Episode 1: Basic Trigonometry
shroom_monk Sun 14:07
Article : Maths 101 - Episode 5: Line Intersection
shroom_monk Sun 14:02
Dev-Diary : Normals and Dot products
Pakz Sat 20:37
More

Who's Online
steve_ancell
Wed, at 14:34
rychan
Wed, at 14:12
Jayenkai
Wed, at 14:11
shroom_monk
Wed, at 13:46
spinal
Wed, at 13:30
rskgames
Wed, at 08:35
Andy_A
Wed, at 08:23
rockford
Wed, at 05:47
9572AD
Tue, at 17:00
Pakz
Tue, at 14:29
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.