project-navigation
Personal tools

Author Topic: Battlescape Pathfinding Limit 16 Squares - Bug or Feature?  (Read 2908 times)

Offline Edi

  • Squad Leader
  • ****
  • Posts: 296
    • View Profile
Battlescape Pathfinding Limit 16 Squares - Bug or Feature?
« on: April 25, 2010, 11:23:17 am »
I have noticed that battlescape pathfinding and trying to figure out optimized movement is problematic for soldiers with more than 32 TUs. This is because the pathfinding algorithm seems to have a hard limit of a maximum of 16 squares away from the soldier's current position, which in a straight line would mean using up exactly 32 TUs for movement.

For soldiers with more than that, e.g. 34, it becomes impossible to plot full movement, since you first have to move the 32 TUs and then you need to see how much you have left and move those. This can lead to a unit being left out in the open with not enough moves to get to cover. I'm particularly afected by this, as in my current game my main team has half the soldiers over the 32 TU line and it's only the beginning of May. I got a crop of really fast ones and they just keep on getting faster.

This seems like a bug in the sense that it does not take into account soldiers having more than 32 TUs, even though they can get there pretty quickly. It looks like a feature in the sense that everything does work well within the limits, just that the limit is low.

Would it be possible to extend this pathfinding limit to e.g. 25 squares? That would consume 50 TUs in straight line movement and eliminate the problem rather handily, since training a soldier up to that quick is going to take considerably more time.

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Battlescape Pathfinding Limit 16 Squares - Bug or Feature?
« Reply #1 on: April 25, 2010, 09:48:33 pm »
It's a bug AND a feature.
We did some opimizations recently so the path isn't calculated as far as before (it was 32 *squares* IIRC).
It should now calculate the path for the available TUs+1.
If it stops after 32 TUs, that's clearly a bug.
Plz open a tracker item for this.

Offline Edi

  • Squad Leader
  • ****
  • Posts: 296
    • View Profile
Re: Battlescape Pathfinding Limit 16 Squares - Bug or Feature?
« Reply #2 on: April 25, 2010, 11:27:47 pm »
It's a bug AND a feature.
We did some opimizations recently so the path isn't calculated as far as before (it was 32 *squares* IIRC).
It should now calculate the path for the available TUs+1.
If it stops after 32 TUs, that's clearly a bug.
Plz open a tracker item for this.

Thank you kindly for the swift answer. Tracker item located here.

I can provide savegames on request where you can see this immediately (available missions and soldiers who are over 32 TUs.)

Offline Edi

  • Squad Leader
  • ****
  • Posts: 296
    • View Profile
Re: Battlescape Pathfinding Limit 16 Squares - Bug or Feature?
« Reply #3 on: April 30, 2010, 11:59:33 pm »
This has been fixed now and in build 29651 everything works okay.