-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG/Question] Choose Door called after IsValidDungeon #57
Comments
Hi @VGO08, There are 2 main reasons why it is called after the dungeon has finished its dungeon creation:
However, I'm thinking of reworking the doors in a future (major?) version. I think of adding a door data type to hold instance related data of the doors (for example the lock state, and the actor class) so we could set them during the I will not work soon on this feature, it could take months (or even a year if for the next major version) before I'm working on it.
Here a screenshot: |
Thank you so much i really appreciate the help, just after writing i had almost the same code but with slight difference that bugged it so really thank you ! |
Well, it really depends on how you want your dungeon layout to be. Before writing code in the Someone linked me this blog post explaining how dungeons are generated in Enter the Gungeon. After that, you should define your Room Unit appropriately: the smaller the Room Unit is, the less likely your doors will be able to connect (outside the doors that connect previous and next rooms). So, keep something rather large to increase the chances of creating loops. Another tips is to use breadth first generation (BFS) because the generator call Finally, you should keep in mind that you don't need to fill the entire room volume. |
Okay, it's better now with screenshots to know where you are. So, if I understand properly your issue, your biggest concern is about those final corridors (pointed in orange) and you want more specialized dead-end rooms (pointed in green)? If so, then I think your generation rules are too simple (from what I can see in your variables of your dungeon generator on your screenshots). You ave many ways to get better results, I'll describe below some of them (I strongly recommend to mix them). Split your room array into categoriesYou should make multiple arrays of room, for example a gameplay room array (storing the important rooms in your dungeon) and a corridor room array. You will have better control on what is generated when. Create multiple array of corridorsYou can also create "sub-categories" arrays of rooms that you can combine before selecting randomly a room from them. It's not mandatory to end the dungeon when reaching a number of roomIn the wiki and example project, I'm using this way to end the generation, you can set any other condition to end the generation.
Stop using corridors at a certain pointYou can define a condition that when met will prevent the use of corridors. |
Thank you, changing the generation to end naturally reduced walls spawned on unconnected doors from 25-30 walls to only 5-6 but for the rest it might change a lot in the quality of the generation but i was unable to do something i tried a random int with a bool to choose between random room with weigth of "Gameplay Rooms" and "Corridor Rooms" but each time i did it it gave me the Check IsValid function is valid? and because i cant do that i can do the sub array. I didnt thinked about the stopping using corridor at certain point but do you mean when for example the Minimum nuber of room have been placed, there is a lot i need to learn and improve so could you give me hints and tips to when and how to achieve that, |
What do you mean by "but it might change a lot in the quality of the generation"?
Well, I don't know what you exactly want and what you have coded currently... First, if you didn't done that yet, write down on paper (or in a text editor) what dungeon layout you want to create (what rooms, how they place themselves according to other rooms, etc.). Note The screenshots of what you want in your previous message don't really help, because they're too dark and I don't understand the layout of the dungeons. Once you have your description and/or a drawing of the graph you want to achieve, please share them here so I can help you coding your dungeon rules. I'll share you here a screenshot of You can change the secret room array by your gameplay rooms, and normal roo array by your corridor rooms. It also shows you how you can stop using room corridors based on a number of room and after you've placed specific rooms (the first branch). Maybe this will help you setting it up. |
Hello again, I really appreciate your help, really thank you :) |
It's weird the image has disappeared... Please, tell me if my example of a mall-like generation in my previous post helped you understanding the workflow. About your issue with probabilities
Well, I would suggest you to post screenshots of your About
|
For the doors I now understand, I didnt saw that you could set the DoorType thats awesome, |
Alright, I think I know what is wrong. First, Your Secondly, the screenshot that disappeared (and I re-added it to the original post) is a screenshot I've made for someone else. So, this is the second part of what is causing your issues: since your With those modifications, your |
You are on the right track. You should pay more attention about the errors displayed on your screen: you are often returning a room I think this is caused because your You are using your About the room typesThe room type feature is not built-in into the plugin, because it can be made differently depending on the project.
About the fallback branchThe fallback branch is the last branch when all your other conditions redirected (the "false" path). |
So basically i do Room Data Blueprints for each "categories" so Shop Room, Corridors... and create childs of these classes? |
It was a copy of the code thats why it wasent linked and casting to the shop room didnt changed anything, |
So your issue now is that it generates too much corridors and not enough shops? |
Okay, I think your main issue here is your From what I understand, you have separated your corridors with no shop doors from the one with shop doors, right? About your Also, you've changed to a cast but now it missing a |
Glad to hear you found the cause of your issue!
I don't really understand your question...
EDIT: |
Hello and thanks for all the project first,
I really appreciate your work and it helped me a lot for my project,
but i have on quick question :
Why is choose door called after IsValidDungeon?
I want to know how many unused door are spawned to know if its even or odd.
(Im trying to create a lethal company style procedural generation and also if you dont mind giving me some tips on how to reduce the dead ends because on some maps a lot of time i get really a lot of dead ends, what i aim for is more like 2-3 big zones but thats isnt my real question)
Technical informations
Expected behavior
I expected that Choose Door will run before IsValidDungeon
I really appreciate your help and i hope i will find a solution :)
The text was updated successfully, but these errors were encountered: