Map generation based on Perlin noise. Astar crashes with long sudden paths like those returning from outside the map or when scrolling