Procedural generation driving me insane

Ok, so I’m a bit crazy because I’ve been spending so much time on this and cannot for the life of me solve it. My end goal is to make a map of rooms like Binding of Isaac through procedural generation.

So first I set a binary array.
000
000
000

I set the middle starting room (the starting room) to True. It works out like this.
000
010
000
–pretty normal, right? It’s position is X1, Y1 because the rows and collumns start at 0.

Then I iterate through the neighboring rooms and set them to True.

010
011
010

Hmm, why isn’t the neighbor at 0,1 being set to True? Anyone got any clues?

Here is the jungle of code I hope to incorporate it into.

1 Like

no idea I tried debug mode slow mode it has a mistake on line 66

Uh, not sure why the project hasn’t updated. Going through the project link instead of through the MakeCode Homepage leads to an old copy, not sure why. This might lead to the same link, not sure. The only changes are that in the old version I set room to MyAny instead of create Empty Object. I’ll start a fresh project and copy everything over by hand and see if it changes anything.

1 Like

Also the links are all the same? Maybe a problem caused by sharing links for duplicated projects, though I assumed duplicating a project would make an unlinked copy. This is the end goal project I hope to move it into (warning: long)

1 Like

Anyone wondering about an update, for some reason it wasn’t iterating over the final loop. I just needed to put literally anything after and the program moved on, fixing the issue.

010
111
010

:slight_smile:

1 Like

cool still don’t understand but cool