UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #2464 Battlescape Pathfinding does not work correctly
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Battlescape
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/2464 Item 2464] imported from sourceforge.net tracker on 2013-01-28 19:35:59

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.

According to Duke, the correct operation would be to calculate the path available for current TUs +1. The problem is probably a side effect of the recent pathfinding optimization changes.

Right now I'm on version 29482, I have not had time to install the 29532 that was provided with a full installer a couple of days ago.

Machine is Windows XP Pro SP3 with all patches, graphics card ATI Radeon HD4870, latest drivers.

Savegames where this can be verified available on request, ask in the forum thread located at http://ufoai.ninex.info/forum/index.php?topic=4725.0
===== Comments Ported from Sourceforge =====

====== aduke1 (2010-04-27 22:15:33) ======

I did 3 things:
- made more places use ent->TU
- increased MAX_ROUTE by 2 TUs
- added 3 TUs in the central pathfinding calculation

The idea is to show at least one square of the path as red.

@Edi: as soon as you can get your hands on a build > r29624, please test and report if this works for you. We can can further increase MAX_ROUTE, but have to be cautious here. What is the highest number of TU your actors have ?

====== edirr (2010-04-28 07:39:11) ======

The highest TUs at the moment are 36 and 34. However, I'm having to rely on the installers uploaded by the community currently, so it may take a while. I don't have the skills to compile the source myself. I've been looking at the Wiki, but now it's aborting my download of the all-in-one package that would get me started. I'll test this as soon as I am able.
====== tlh2000 (2010-04-28 08:00:19) ======

set to pending until someone tells the opposite ;)
====== edirr (2010-04-28 17:40:48) ======

If anyone with a newer build wants to test this immediately, they can download the attached zip file of a savegame from tracker item https://sourceforge.net/tracker/?func=detail&aid=2992803&group_id=157793&atid=805242

There are soldiers with over 32 TUs there. Otherwise I will probably have managed to compile myself a newer version in a couple of days because I managed to download the tools on my work computer.
====== aduke1 (2010-04-28 21:01:45) ======

@Edi: glad to hear you'll jump on the svn train :)
If I did everything right, you should notice a difference between the 34 and the 36 TU guys.
====== edirr (2010-04-30 21:59:12) ======

Looks like I remembered incorrectly. I have several 34 TU people, one must have had speed 36, but in any case this seems to work as it should in build 29651. It's not stopping at 32 TUs anymore and will calculate full movement for 34 TUs, then indicate the next square is out of range. So it's probably time to close this and if something else crops up later, a new ticker can be opened. Thank you for fixing this, Duke. :)
====== aduke1 (2010-04-30 22:23:56) ======

You're welcome.
Thx for reporting so precisely :)
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif