GAME INFORMATION
These details are CRITICAL; DO NOT skip them or your issue may not be reviewed.
- GAME BUILD #: 47820
- GAME PLATFORM: Microsoft Store
- OPERATING SYSTEM: Windows 10
ISSUE EXPERIENCED
DESCRIBE THE ISSUE IN DETAIL (below). LIMIT TO ONE BUG PER THREAD.
It is quite simple: Imagine a fishing ship on deep fish in coords X, Y which is a pond/mass of water that has ANOTHER mass of water nearby. The two water masses are NOT connected. If the closer dock to coords X, Y is a dock in the OTHER mass of water, the fishing ships will indefinitely attempt to deliver food to it, effectively halting production. However, the ships do not show as idle.
FREQUENCY OF ISSUE
How often does the issue occur? CHOSE ONE; DELETE THE REST!
- 100% of the time / matches I play (ALWAYS) NOTE: I have only seen this one, but I bet my programmer’s reputation it happens 100% of the time the above conditions are met.
REPRODUCTION STEPS
List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptive!
Here’s the steps to reproduce the issue:
- Start a skirmish game in the new Volcanic Island map.
- Locate two contiguous masses of water that are disconnected from one another.
- Locate deep fish in one mass of water that is close enough to a dockable position in the other mass of water.
- Build a dock in said position.
- Build a dock in the other mass of water, at a greater distance of the previously located deep fish when compared to the distance from that deep fish to the dock from the previous step (that is in the other mass of water). Build a fishing ship from this new dock and send it to collect fish from the located deep fish spot.
- Watch as it indefinitely tries to deliver the food to the inaccessible dock.
EXPECTED RESULT
What was SUPPOSED to happen if the bug you encountered were not present?
This is something up for discussion, I think, depending on the sprint work at hand and how much effort you can imprint into correcting it.
Option 1: Ideally, the fishing ships should know which docks are accessible and which ones aren’t. This is the most work: Every time a new dock is added, it needs to be assigned to a distinct mass of water. This of course, assumes an algorithm capable of identifying distinct masses of water. Every fishing ship that is spawned is provided with the mass of water identifier they were created in. Whenever they need to deliver food, they will iterate through the collection of docks that exist in with the mass of water identifier, and determine by Pythagoras’ formula the closest one, thereby automatically avoiding even trying to deliver to docks that are in other masses of water.
But if there is no time in the sprint to fulfill the above algorithm, then simpler ones can be devised. Keep reading.
Option 2: If there are time or resource constraints, this is a good enough option: Continue using the current algorithm to decide which dock to deliver to, but if the pathfinding fails to reach the destination, change dock: Make the fishing ship attempt delivery to the second nearest dock, etc. until a dock is reachable or it is all out of docks.
You can add a bit of simple machine learning here to make sure calculations are only done once, therefore minimizing the performance hit, which the game has several and doesn’t need any more right? Have each fishing ship have a collection of bad dock identifiers/pointers. Next time it is time to decide which dock to deliver to, make sure any unreachable docks are added to this collection, and make sure the ship always exclude those docks on future deliveries. This is a simpler solution because it does not require an initially-run algorithm to distinctly identify masses of water, nor is there a need for an algorithm to assign a mass of water identifier to each built dock. The fishing ships automatically learn by themselves which docks can and cannot use.
If you opt for this, you could improve the algorithm at a later sprint by sharing the list of bad docks among all fishing ships that are created using the same dock. Kind of a hive mind, like the Borg.
Option 3: If you guys are just too lazy (nah, just kidding), the simplest solution is to attempt different docks if the fishing ship gets stuck at a fixed coordinate for a preset amount of time. "Going to dock A to deliver. Moving, moving… stuck, ok, so second nearest dock. Moving, moving, moving… stuck, so 3rd nearest dock, etc. You get the idea. But this is hardly a solution. This I consider a workaround only. Might be a solution if you add the machine learning described in option 2. But if you do this, this option pretty much becomes option 2. It all depends on the timer here vs the algorithm that determines if a fishing ship got stuck. If not much of a difference, then this option and option 2 would become the same in practice.
IMAGE
ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the problem.
GAME FILES (SAVE / RECORDING)
Attach a SAVE GAME (.aoe2spgame) or GAME RECORDING (.aoe2record) of the match where you encountered the issue. Link it below if using an external file service.