New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lot's of destroyed tiles in cityscape appears to slow game to a halt in Ultra-Speed #395
Comments
Hostile vehicles such as construction vehicles on a mission also seems to impact |
A further example from later in save game |
Located the stuck vehicle |
I'm debugging the stuck vehicle (Construction Vehicle 31).
However destination (43,63,2) is rewritten to (43,63,7) by adjustTargetToClosestFlying.
|
Thanks for looking into this @ashenomo <3 If you can find a solution i'd be greatly appreciative Ideally, we want the vehicle to recognise it's stuck in a loop and generate a new mission to a suitable, clear, end destination as i suspect it's the lack of a check on the random target being a suitable destination that forces the loop I notice that when vehicles get stuck in these loops they are often in Landing Tube Tiles, or Mega-Flyers Factories Not sure why the Mega-Flyer Factories in particular cause such issue, unless there is a bad tile type somewhere??? |
Looks like this is the "side-stepping" logic which is meant to trigger when the destination is occupied by another vehicle. The target is temporarily changed to a nearby empty tile. Once the vehicle gets to that tile, it tries again to go to the original target. However in this case, somehow the vehicle causing the side-stepping is CV31, i.e. it thinks it's about to collide with itself. code
Adding an additional check to ensure vehicles don't try to avoid themselves sounds like a good idea. |
Looking at this earlier savegame:
Blazer Turbo Bike 49 (near the destroyed Hades Block) is trying to get to (86,78,2), which is a destroyed road tile. But similarly to the stuck construction vehicle, I see setPathTo being called in every tick for this vehicle which probably contributes to the slowdown. |
…le, it will repeatedly try to find a path in every game tick. The vehicle will eventually get stuck and slow down the game by spamming pathfinding requests. Note that vehicles usually don't end up with a GotoLocation with an unreachable destination, but it's possible, i.e. if some road tiles on the way get destroyed after the mission is created. Other fixes: * Prevent a vehicle from side-stepping in order to avoid itself. Implementation notes: * Moved all adjustTarget* methods to a new class VehicleTargetHelper with a single method that dispatches based on vehicle type. * Note that it's now that caller's responsibility to set pickedNearest as needed. * Inverted some conditionals for clearer early returns. Manually verified these vehicles are un-stuck after this change: * #395 (comment) * #395 (comment)
Here's a PR for a fix (only manually verified): |
…le, it will repeatedly try to find a path in every game tick. The vehicle will eventually get stuck and slow down the game by spamming pathfinding requests. Note that vehicles usually don't end up with a GotoLocation with an unreachable destination, but it's possible, i.e. if some road tiles on the way get destroyed after the mission is created. Other fixes: * Prevent a vehicle from side-stepping in order to avoid itself. Implementation notes: * Moved all adjustTarget* methods to a new class VehicleTargetHelper with a single method that dispatches based on vehicle type. * Note that it's now that caller's responsibility to set pickedNearest as needed. * Inverted some conditionals for clearer early returns. Manually verified these vehicles are un-stuck after this change: * #395 (comment) * #395 (comment)
…le, it will repeatedly try to find a path in every game tick. The vehicle will eventually get stuck and slow down the game by spamming pathfinding requests. Note that vehicles usually don't end up with a GotoLocation with an unreachable destination, but it's possible, i.e. if some road tiles on the way get destroyed after the mission is created. Other fixes: * Prevent a vehicle from side-stepping in order to avoid itself. Implementation notes: * Moved all adjustTarget* methods to a new class VehicleTargetHelper with a single method that dispatches based on vehicle type. * Note that it's now that caller's responsibility to set pickedNearest as needed. * Inverted some conditionals for clearer early returns. Manually verified these vehicles are un-stuck after this change: * #395 (comment) * #395 (comment) Run clang-format Run clang-format 4.0.0, which is the version used by Travis CI.
…le, it will repeatedly try to find a path in every game tick. The vehicle will eventually get stuck and slow down the game by spamming pathfinding requests. Note that vehicles usually don't end up with a GotoLocation with an unreachable destination, but it's possible, i.e. if some road tiles on the way get destroyed after the mission is created. Other fixes: * Prevent a vehicle from side-stepping in order to avoid itself. Implementation notes: * Moved all adjustTarget* methods to a new class VehicleTargetHelper with a single method that dispatches based on vehicle type. * Note that it's now that caller's responsibility to set pickedNearest as needed. * Inverted some conditionals for clearer early returns. Manually verified these vehicles are un-stuck after this change: * #395 (comment) * #395 (comment) Run clang-format Run clang-format 4.0.0, which is the version used by Travis CI.
…le, it will repeatedly try to find a path in every game tick. The vehicle will eventually get stuck and slow down the game by spamming pathfinding requests. (#563) Note that vehicles usually don't end up with a GotoLocation with an unreachable destination, but it's possible, i.e. if some road tiles on the way get destroyed after the mission is created. Other fixes: * Prevent a vehicle from side-stepping in order to avoid itself. Implementation notes: * Moved all adjustTarget* methods to a new class VehicleTargetHelper with a single method that dispatches based on vehicle type. * Note that it's now that caller's responsibility to set pickedNearest as needed. * Inverted some conditionals for clearer early returns. Manually verified these vehicles are un-stuck after this change: * #395 (comment) * #395 (comment) Run clang-format Run clang-format 4.0.0, which is the version used by Travis CI.
Im assuming it's related to destroyed tiles, as it only seems to occur once a few buildings are downed by raids
Cityscape appears to be incredibly slow when placed on ultra-speed
To the point of being unplayable
Please find save attached
SuperHuman_Slow.zip
The text was updated successfully, but these errors were encountered: