#Procedural generation system bug

1 messages · Page 1 of 1 (latest)

gusty bobcat
#

(Information below)

#

I am trying to create a procedural dungeon generation system

Problem: Some connected tiles close off when they shouldn't

#

Example of the problem:

#

My theory is that it calls branchout multiple times on the same space and it has something to do with the processedTiles and tilesToProcess tables.

gusty bobcat
#

even though as you can see in the image the tiles are connected

dense minnow
#

have you tried adding more nesting?

#
local NewTilePiece = AssetFolder:GetChildren()[math.random(1, #AssetFolder:GetChildren())]:Clone()

            local CheckBox = Instance.new("Part")
            CheckBox.Anchored = true

            CheckBox.Size = NewTilePiece:FindFirstChild("Hitbox").Size - Vector3.new(2.5, 2.5, 2.5)

            CheckBox.Parent = workspace.Debris
            task.wait()

            local partsInCheckBox = workspace:GetPartsInPart(CheckBox)

            CheckBox:Destroy()
``` lol workspace:findpartsinbox
#

i think you're cooked

dense minnow
#

region3 is just another way of defining a box? it doesnt do anything on its own

gusty bobcat