03-20-2018, 09:04 PM
Yes, a representation at 1-pixel (5m) resolution the map is easier to deal with (n.b. your code would run much faster if you add ipf(5000) to the top of your travel() function).
If the only thing the pathfinder had to deal with was sloped terrain then this would probably work perfectly, but in real levels it needs to be able to navigate around buildings, decorative objects, other bots, etc., and these aren't generally aligned to the 5x5 grid. Honestly, after experimenting with it a bit on the "Radar and Traps" challenge levels I've concluded that my 1m resolution grid is still not good enough.
I'm still interested in a way to safely detect uninitialized values, but I will probably end up writing a more free-form heap based pathfinder instead of the grid-based A* I've been working on.
If the only thing the pathfinder had to deal with was sloped terrain then this would probably work perfectly, but in real levels it needs to be able to navigate around buildings, decorative objects, other bots, etc., and these aren't generally aligned to the 5x5 grid. Honestly, after experimenting with it a bit on the "Radar and Traps" challenge levels I've concluded that my 1m resolution grid is still not good enough.
I'm still interested in a way to safely detect uninitialized values, but I will probably end up writing a more free-form heap based pathfinder instead of the grid-based A* I've been working on.