Skip to content
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

Sometimes Dungeon Generator create rooms in wrong places. #2

Open
fl1ckje opened this issue Apr 23, 2022 · 3 comments
Open

Sometimes Dungeon Generator create rooms in wrong places. #2

fl1ckje opened this issue Apr 23, 2022 · 3 comments

Comments

@fl1ckje
Copy link

fl1ckje commented Apr 23, 2022

I noticed, that sometimes generator gives a level with 1 or 2 black color rooms, which are placed in the wrong place and are not connected properly. How am I supposed to fix that?
image

@DMeville
Copy link
Owner

Hard to say. Is this using the default settings from the demo (with no changes?) If so, do you have the seed/dungeon size params so I can regenerate it?

My best guess otherwise is there's something wrong with the data - either door orientations are incorrect, or voxels have not been set up correctly for the room size, or something along those lines.

Never seen this happen before!

@fl1ckje
Copy link
Author

fl1ckje commented Apr 23, 2022

Hard to say. Is this using the default settings from the demo (with no changes?) If so, do you have the seed/dungeon size params so I can regenerate it?

My best guess otherwise is there's something wrong with the data - either door orientations are incorrect, or voxels have not been set up correctly for the room size, or something along those lines.

Never seen this happen before!

Clone repo and try any random seed. Sometimes this happen. I thought, that I made some bad changes in code, but after a try with default source code and settings (with random seed) the issue appeared again.

@DMeville
Copy link
Owner

DMeville commented Apr 23, 2022

I'll take a look. Can't guarantee anything though unfortunately. Rooms that are marked in black have been spawned as "loop rooms". Rooms that add a loop to the dungeon, connecting two different paths on the graph, and this "feature" was never fully functional (as I didn't like how it worked, didn't give great results, etc).

Looks like it's finding valid rooms that "fit" without collisions in the voxel grid, but ignoring the fact that the doors are not aligned/facing each other properly, and probably just needs an extra check somewhere to ensure that we hook up the two looping doors correctly. Thought this already worked, but must not have been as bulletproof as I thought.

Interestingly, it looks like generator is saying "in order to connect this as a loop we need two doors at positions X and Y", but also "we need two doors to point in directions A and B". And while the first test passes easily, the second one technically does as well as in the screenshot you DO have two doors pointing in the right directions. (eg, the door on the left in the black room matches alignment with the green door in the yellow room on the right, the OTHER black door is positioned to connect to). Might be an easy fix, however I'm not familiar with this code anymore so will have to take a dive in when I have some free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants