Improve subterranean harvester pathfinding
This PR should allow MovementZone=Subterannean harvesters to access docks that are in areas closed off from normal pathfinding such as cliffs and islands. Whether or not it fixes all issues with such harvesters is another thing.
Nightly build for this pull request:
- compiled-dll-7d684c5bde5be3bdc9a2a84234e04ce4715c6637.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
used Project Phantom as a test, but there're still some subterrenean miners getting stuck for unknown reason, mostly happened when they're trying to get to an ore field which is being harvested when they're on their ways
1 - stuck at ore field
2 - stuck at slope
Did some games against the AI with this, and at some random point the game dropped to like 1 fps. This happened several times, but lasted only few seconds (except for one game, which didn't seem to fix itself so i had to quit). I also haven't encountered this in any build other than this one.
All these games where it happened were me and AI playing as sides with subterranean harvesters. I'll try investigating further if they are indeed the cause.
No fps drops this time, but game crashed with this build, can't tell the reason from except.txt https://drive.google.com/file/d/1xd3PoLCVYi60-u0V2jbiQue97VGWkg5t
EDIT: can be ignored, it happens because of airstrike flare, and AirstrikeTarget not being cleared up properly
Haven't had fps drops anymore, but these games were played at like 40-45 fps. The fps drops happened only in games with 60 fps, so that might have been related to how fast the game was processing, or the drawer that was used.
Had only sporadic cases of miners getting stuck, only in the lategame when the resources are mined out on most of the map. If Ollerus didn't point them out i wouldn't even be paying attention. I'm not sure how much of that was due to them being subterranean miners and some bug making them forget to mine, or simply stopping mining because they can't find anyting to mine anymore.
Attempted to further improve the behaviour but I suspect it won't fix every issue particularly with harvesters getting stuck if there's too many on single ore patch or refinery.
- Further improvements to rally point handling, should now reliably travel to rally point first if one is set instead of jumping to a ore patch if there's one nearby.
- Applied similar idle mode exceptions to subterranean harvesters as teleporting ones have.
when we were testing it in PP it gave us this, probably due to the recent include change
and it still didn't work quite well in MO after making miners move subterraneanly. They would stuck like this
Hello. Excuse me, I found some other issues in subterranean harvester.
- Phobos b47: If the subterranean harvester is ordered to move immediately after completing unloading (changing to the unload class), it may freeze indefinitely (visually stuck in the unload vxl). A workaround is to press the S key or issue multiple movement commands to resolve the freeze.
- Vanilla Behavior: When manually ordering a subterranean harvester to return to the Ore Refinery, it unnecessarily circles around once and then finally stop. However, if using this nightly fix, the harvester returns to the refinery but does not stop completely—it resumes mining instead.
But did you check the behavior in this build? How harvesters behave in b44 is not indicative of how they behave here.
But did you check the behavior in this build? How harvesters behave in b44 is not indicative of how they behave here.
I'm sorry, It's B47. I misspelled.
Hello. Excuse me, I found some other issues in subterranean harvester.
- Phobos b47: If the subterranean harvester is ordered to move immediately after completing unloading (changing to the unload class), it may freeze indefinitely (visually stuck in the unload vxl). A workaround is to press the S key or issue multiple movement commands to resolve the freeze.
- Vanilla Behavior: When manually ordering a subterranean harvester to return to the Ore Refinery, it unnecessarily circles around once and then finally stop. However, if using this nightly fix, the harvester returns to the refinery but does not stop completely—it resumes mining instead.
The first issue starts to occur after b44, and b43 does not have this issue. The second issue only occurs at close range (when the unit does not enter underground).
Attempted to fix remaining issues.
- Refactored the factory exit/rally point logic. The new version relies on code running in per-frame update logic which is far from ideal but every other approach yielded hard-to-mitigate edge case issues.
- Attempted to patch out the most common cause of subterranean harvesters going idle while harvesting.
I suspect most of these problems stem from subterranean units handling nav queue differently to other units as root cause, but I haven't been able to figure that one out.
tested it under an environment of hundreds of subterranean harvesters and AI producing subterranean units, and it seemed to be fine. Only about 10 harvesters getting stuck in the end
This might have been merged prematurely, as was getting severe lag in the lategame with this build, and i'm still getting it with the devbuild. Works fine for a while with like 6 subterranean harvesters, but after some time the framerate starts to slowly drop to like 8fps. And it doesn't seem to be caused by pathfinding, harvesters becoming idle (i noticed like 1 for the entire game), or even too many objects on the map.
I didn't report it initially as i've seen issues like this caused by a renderer, but i checked older build and, despite having same factions and map, there was no slowdown there. So it doesn't sound like the renderer is at fault.
Hopefully it's just on my side, but if someone starts noticing slowdowns with the devbuild, this might need to be reverted.
tested it under an environment of hundreds of subterranean harvesters and AI producing subterranean units, and it seemed to be fine. Only about 10 harvesters getting stuck in the end
How long did the game last? If it was shorter than 10 minutes then that might have been not enough to get the slowdown.