Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array elements crashing program [SOLVED]
#3
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.


Messages In This Thread
RE: Array elements crashing program - by Smok - 03-20-2018, 08:29 PM
RE: Array elements crashing program - by DomesticAnt - 03-20-2018, 09:04 PM
RE: Array elements crashing program - by Smok - 03-20-2018, 09:19 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)