View Issue Details

IDProjectCategoryLast Update
0020915AI War 2SuggestionDec 7, 2021 12:35 am
Reporterwm46 Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.811 Transport Ships 
Summary0020915: Suggestion: Don't run decollision planning when moving to a wormhole
DescriptionI 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.
TagsNo tags attached.

Activities

wm46

Feb 7, 2019 9:13 pm

reporter   ~0050791

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

                            case EntityOrderType.Wormhole:
                                {
                                    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
                                    {
                                        return DelReturn.Continue;
                                    }
                                            
                                    
                                }
                                break;

BadgerBadger

May 17, 2019 11:08 am

manager   ~0051663

Is this fixed then?

wm46

May 17, 2019 2:29 pm

reporter   ~0051664

Yes it is, I forgot I even made this suggestion...

wm46

May 17, 2019 2:30 pm

reporter   ~0051665

Or rather, it's always been in, its just a really small radius of only 2,000. That's smaller than most ships ranges, it could maybe use a bump up to 4,000 or something.

Chris_McElligottPark

May 17, 2019 8:46 pm

administrator   ~0051674

Please feel free to experiment with it; I'm fine with a bump to 4k.

Chris_McElligottPark

Dec 7, 2021 12:35 am

administrator   ~0063414

Fixed a while ago, thanks!

Issue History

Date Modified Username Field Change
Feb 7, 2019 2:33 am wm46 New Issue
Feb 7, 2019 7:57 am BadgerBadger Assigned To => Chris_McElligottPark
Feb 7, 2019 7:57 am BadgerBadger Status new => assigned
Feb 7, 2019 9:13 pm wm46 Note Added: 0050791
May 17, 2019 11:08 am BadgerBadger Note Added: 0051663
May 17, 2019 2:29 pm wm46 Note Added: 0051664
May 17, 2019 2:30 pm wm46 Note Added: 0051665
May 17, 2019 8:46 pm Chris_McElligottPark Note Added: 0051674
Dec 7, 2021 12:35 am Chris_McElligottPark Status assigned => resolved
Dec 7, 2021 12:35 am Chris_McElligottPark Resolution open => fixed
Dec 7, 2021 12:35 am Chris_McElligottPark Note Added: 0063414