View Issue Details
|ID||Project||Category||Date Submitted||Last Update|
|0020915||AI War 2||[All Projects] Suggestion||Feb 7, 2019 2:33 am||Feb 7, 2019 9:13 pm|
|Product Version||0.811 Transport Ships|
|Fixed in Version|
|Summary||0020915: Suggestion: Don't run decollision planning when moving to a wormhole|
|Description||I think one of the main things that makes the game feel sluggish for me is that decollision checks occur during wormhole travel. Your bound to have ships end up stretching across 3 or 4 planets just by the very nature of the decollision making ships constantly back track just to end up overlapping again when they move forward.|
I don't have time to dig through and understand all of the decollision code, but when wormhole traveling I notice a really weird movement pattern sometimes: A ship would be near the front of the pack, and just as it almost gets to the wormhole location across the map, the ship turns around and goes back to nearly the wormhole it entered from.
I think while the ship keeps retrying, looking for a location that would not end in a collision, it's not updating the location that its search radius is centered around. So if we have a wormhole at X=0, another at X=1000, and the ship notices that its colliding at X=50, that it'll keep searching around at X=50 even when the ship is at X=900.
|Tags||No tags attached.|
I made a small change that allows the ships to run decollision for up to 2 seconds after entering a planet. They will unpack when they move to the next planet, and then will slowly converge until the next wormhole where the unpack again.
DecollisionPlanning.cs - Line 114
GameEntity_Other wormhole = order.GetWormholeToOtherPlanet( entity );
debugNum = 4;
if ( wormhole == null )
return DelReturn.Continue; //if this wormhole is null (presumably because we already went through the wormhole, do nothing
//if ( wormhole.WorldLocation.GetHasAnyChanceOfBeingInRange( entity.WorldLocation, 2000 ) )
// //if pretty close to the wormhole, then don't try to give decollision orders!
// return DelReturn.Continue;
//} (Note: this is the old code)
if ( entity.SecondsSinceEnteringThisPlanet >= 2 ) //Run decollision for a bit after entering a new planet, but just passing through