walker-level-gen icon indicating copy to clipboard operation
walker-level-gen copied to clipboard

Walker generates lots of duplicate locations

Open furroy opened this issue 5 years ago • 1 comments

It's not exactly a bug, but when I tried to adapt this code for a project of my own, I kept having all kinds of issues. It turned out the root of them all was because the walker returns a list of locations that includes many duplicates. So while the code as is works fine, (because setting the tile to the same value multiple times doesn't hurt anything,) if you're creating other things to populate your map, making duplicates might be an issue. Just leaving this for others who might avoid all the headaches I encountered.

furroy avatar Feb 02 '21 16:02 furroy

I solved this like this: if _step(): --if !step_history.has(position): ---step_history.append(position)

ghost avatar Nov 30 '21 17:11 ghost