Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Johnny-Mapletree · Feb 08, 2013 at 01:54 AM · proceduralmaze

Altering a "Drunkard Walk" random level generation algorithm to create an ever-changing, non-euclidian labyrinth

I've been banging my head against this brick wall of a problem for quite some time, maybe you lovely people can offer me some assistance. Forgive me ahead of time because I don't know many of the correct terms for what I've doing, thanks to the fact that I dove headfirst into this project without prior knowledge of the Unity engine and most of my work is plagiarized piecework. ANYWAY

I've crafted an assortment of prefab room 'tiles' that can be assembled into a maze, and I've been writing a variation on a 'drunkard walk' procedural dungeon creation algorithm that puts them all together.

But after logically assembling my prefab tile set into a maze prior to the start of each "floor", I intend to have the maze reassemble itself 'illogically' in real time, as the player moves through it. For example, if the player closes a door, turns his back on or moves away from one section of the maze, (i.e., a bounding box that surrounds the player or the bounding box that represents his line of sight is no longer in contact with that section of the labyrinth) those prefab rooms are destroyed and replaced by an opposite or just 'illogically' facing one.

Say the player turns left in the maze, opens a door, and finds himself at a dead end. When he turns around to go back through the door, he will find that the room has changed. Impossibly, the hallway he just walked through now turns left, instead of right. Or it now leads to a staircase that descends forever, or a massive hall that couldn't have possibly fit in the room that had been there previously.

There are several issues with the game so far; Occasionally the framerate slows dramatically when previous rooms are being replaced, and often the placement of those rooms is -too- illogical, the prefabs no longer tend to fit together properly or assemble at the wrong point of contact and thus the player sometimes falls through the floor into a void of doom.

Also, despite differentiating between the 'drunkard walk' pre-produced 'logical' portion of maze and the 'illogical' shifting section with a variable based on wether or not the player has already entered that room, large portions of the pre-produced maze are often unnecessarily deleted.

Is this 'drunkard walk' method of level generation even a viable one for this project, or should I scrap this code and switch to something akin to what this guy is doing?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Spawning collectibles in a randomly generated maze 1 Answer

Infinite Sidescroller 1 Answer

Create the visual spring in Unity? 3 Answers

Procedural Skinned mesh? 1 Answer

Grouping vertexes using bones 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges