generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Best way to generate a dungeon?

Previous Thread :: Next Thread 
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
11 Jul 2015 05:20 PM
?
I have it so far that a part raycasts in 4 directions to check if the space is occupied, which is inefficient if I want to create a whole floor that doesn't have a predictable shape
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2015 05:24 PM
If you are attempting to do this by first having a square, and then raycasting from the center of each face of the square, would you not only be able to make square dungeons?
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2015 05:25 PM
I'm sorry *edge of the square
was thinking about cubes :)
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
11 Jul 2015 05:28 PM
"If you are attempting to do this by first having a square, and then raycasting from the center of each face of the square, would you not only be able to make square dungeons?"

Yeah, which is not what I want to have to come to

I want to have abstract (Not TOO abstract) and unpredictable dungeon layouts; the raycasting was just in case square dungeons were my only option
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2015 05:37 PM
Square dungeons could be a unique thing, especially if your dungeon crawler is more ROBLOX-themed and blocky. Could look cool, I recommend it.

However, if you're going for the traditional medieval feel, you probably want dungeons of all shapes and sizes.

If you want truly and purely random generated dungeons, you're going to have to put a lot of specificity in the code as to what elements may or may not be present, and to keep them from intersecting, and all that funky junk.

There way I would go about this is by actually building each dungeon, but if you want to truly randomize each without square uniformity, you're going to jump through a lot of hoops:

- specify the shape of the floor of your dungeon,
- build the walls around your dungeon, specify which doors may or may not have walls
- leave a minimum-dungeon-sized part for the floor in front of each door, so that they do not intersect when new ones are generated (you're gonna have to detect that too)
- build upon the minimum-sized dungeon floors directly, add walls, doors, repeat
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2015 05:38 PM
these are my ideas and probably not the best
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
11 Jul 2015 05:42 PM
http://www.roguebasin.com/index.php?title=Dungeon-Building_Algorithm#The_goals_of_the_dungeon_builder

I transformed an algorithm similar to this to make a random maze generator. This is a pretty simple one that should be of use to you.
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
11 Jul 2015 08:48 PM
No offence or anything, but I'm not a fan of that method
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2015 09:17 PM
That is a good method he linked you to and is probably how it is done for the top dungeon crawlers today.
Report Abuse
Saldor010 is not online. Saldor010
Joined: 20 Sep 2010
Total Posts: 1035
11 Jul 2015 09:39 PM
You could always make it a square dungeon, but generate each tile of the map so that it looks like it's not square, and has variety. (I'm not entirely sure how to explain this)
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2015 09:48 PM
I understand what you mean
Square areas, but the insides are carved to look organic
Report Abuse
Saldor010 is not online. Saldor010
Joined: 20 Sep 2010
Total Posts: 1035
11 Jul 2015 10:18 PM
@Soy

Exactly! Thank you for finding the words I was trying to say. Do that OP.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image