Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
*Dungeons & Dragons
DM resource: on maze generation
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Imaculata" data-source="post: 7059681" data-attributes="member: 6801286"><p>I coded a random maze generator for a Zelda clone a while back. What it did, was: </p><p></p><p>-Pick a random maze-size in rooms horizontal and vertical, within constraints</p><p>-Choose a random room as the starting room, but always a room away from the sides of the maze. This is contrary to normal dungeons in Zelda games, where the start is always at the border of the maze.</p><p>-Create a random path from the starting room, with a random length. The algorithm makes random left, right and straight ahead turns, but if it gets stuck, or reached the end of the length that I randomly set, it places the exit there.</p><p>-It then creates a boss room, just before the exit. Basically it just takes one step back, and then checks how big it can make the boss room.</p><p>-It then selects random rooms that it visited along the way (except for the exit and boss room), and if they are next to an empty space, it expands the maze in that direction with another random path. </p><p>-The algorithm labels each path, and also from what room along the main path it originated. This way it can decide where to place locked doors, and where to place the keys for those doors, so that the player can reach them.</p><p>-It places treasures and special items in dead ends of the other paths. </p><p>-It creates a random number of secret rooms from the left over empty rooms, if they are adjacent to at least 2 rooms from the maze. It then decides randomly how many secret doors lead into each secret room. I didn't want the placement of secret rooms to be entirely random. By making a secret room always border on two or more existing rooms, they will always be placed in a corner between two rooms, or in an empty eye. So they are always in suspicious locations.</p><p>-Go through each room, and select random prefab templates for the rooms, to give them unique looks. Some of the contents in the room are also randomized.</p></blockquote><p></p>
[QUOTE="Imaculata, post: 7059681, member: 6801286"] I coded a random maze generator for a Zelda clone a while back. What it did, was: -Pick a random maze-size in rooms horizontal and vertical, within constraints -Choose a random room as the starting room, but always a room away from the sides of the maze. This is contrary to normal dungeons in Zelda games, where the start is always at the border of the maze. -Create a random path from the starting room, with a random length. The algorithm makes random left, right and straight ahead turns, but if it gets stuck, or reached the end of the length that I randomly set, it places the exit there. -It then creates a boss room, just before the exit. Basically it just takes one step back, and then checks how big it can make the boss room. -It then selects random rooms that it visited along the way (except for the exit and boss room), and if they are next to an empty space, it expands the maze in that direction with another random path. -The algorithm labels each path, and also from what room along the main path it originated. This way it can decide where to place locked doors, and where to place the keys for those doors, so that the player can reach them. -It places treasures and special items in dead ends of the other paths. -It creates a random number of secret rooms from the left over empty rooms, if they are adjacent to at least 2 rooms from the maze. It then decides randomly how many secret doors lead into each secret room. I didn't want the placement of secret rooms to be entirely random. By making a secret room always border on two or more existing rooms, they will always be placed in a corner between two rooms, or in an empty eye. So they are always in suspicious locations. -Go through each room, and select random prefab templates for the rooms, to give them unique looks. Some of the contents in the room are also randomized. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Dungeons & Dragons
DM resource: on maze generation
Top