This code figures out what's inside the screen and only goes through those placements by looking at the cams location on the rid list and entering the surrounding locations that are in the screen . Due to this it can manage a grid made of enormous amounts of units. On this version it can go up to a grid 316*316 units wide , making a total of 99856 units , or if u prefer potential clones. But this code manages to run it with no lag. (if it lags reload the page please) This code can be used in the making of a maze games too and will be featured in one of my games with my path finding engine (maybe) . Example : https://scratch.mit.edu/projects/560170076/