Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

a truck chooses longer path for building or reparing defence structures #3576

Closed
wzdev-ci opened this issue Jun 27, 2012 · 5 comments
Closed

Comments

@wzdev-ci
Copy link
Contributor

keyword_trucks_paths_structures resolution_fixed type_bug | by anonymous


Example:

Assume that there is a field without any obstacles, with a subfield 4 x 4:

a4 b4 c4 d4

a3 b3 c3 d3

a2 b2 c2 d2

a1 b1 c1 d1

The truck is on the left lower side of defensive structures at a4, b3, c2, d1. Order the truck to build a defensive structure at c3. Sometimes, the truck chooses the shortest path to build the structure at c3 after commming to b2. More often, the truck goes to the upper right side of the map and builds the structure at c3.

There is a similar behaviour when c3 structure is damaged and the truck goes to repair the structure.

This type of behaviour is easier to spot when diagonally placed structures are much longer than in this example.

I expected trucks to choose the shortest path and stay at the same side of diagonal for building or repairing structures that are diagonally accessible.
Does orientation of the truck influence algorithm for choosing path?
Maybe allowing trucks to move backward would result with more the shortest paths and staying on friendly side of the diagonal instead of going to unfriendly side.


Issue migrated from trac:3576 at 2022-04-16 09:55:24 -0700

@wzdev-ci
Copy link
Contributor Author

Cyp changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Cyp changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp commented


Pathfind to area around queued structure to be built, instead of to tile under structure.

In the following, truck T now pathfinds to x instead of y, when ordered to build a bunker at +. (This was already
the case since 0119eda53f11d2aa5d3e3ccc82203c6657812039, for repairing something at + or building a derrick at +.)
*
+
x
y
T *

Fixes #3576.

  • Changeset: [/changeset/88c1a3c3703d2ba260a101bb24cde419fe009afe 88c1a3c3703d2ba260a101bb24cde419fe009afe]
  • URL: [88]c1a3c3703d2ba260a101bb24cde419fe009afe

@wzdev-ci
Copy link
Contributor Author

Cyp commented


Pathfind to area around queued structure to be built, instead of to tile under structure.

In the following, truck T now pathfinds to x instead of y, when ordered to build a bunker at +. (This was already
the case since 0119eda53f11d2aa5d3e3ccc82203c6657812039, for repairing something at + or building a derrick at +.)
*
+
x
y
T *

Fixes #3576.

  • Changeset: [/changeset/88c1a3c3703d2ba260a101bb24cde419fe009afe 88c1a3c3703d2ba260a101bb24cde419fe009afe]
  • URL: [88]c1a3c3703d2ba260a101bb24cde419fe009afe

1 similar comment
@wzdev-ci
Copy link
Contributor Author

Cyp commented


Pathfind to area around queued structure to be built, instead of to tile under structure.

In the following, truck T now pathfinds to x instead of y, when ordered to build a bunker at +. (This was already
the case since 0119eda53f11d2aa5d3e3ccc82203c6657812039, for repairing something at + or building a derrick at +.)
*
+
x
y
T *

Fixes #3576.

  • Changeset: [/changeset/88c1a3c3703d2ba260a101bb24cde419fe009afe 88c1a3c3703d2ba260a101bb24cde419fe009afe]
  • URL: [88]c1a3c3703d2ba260a101bb24cde419fe009afe

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant