View Issue Details

IDProjectCategoryLast Update
0018764Starward RogueSuggestionMar 8, 2016 3:52 pm
ReporterPepisolo Assigned Tokeith.lamothe  
Status resolvedResolutionfixed 
Product Version1.016-1.017 
Summary0018764: PathFindingAttacker interval too long
DescriptionThe recalculation interval for PathFindingAttacker seems to be too long. Often if you set an enemy to this they will run right past you before then turning around, which kind of works for super dumb enemies, but overall it's undesired, I'd say.

I would prefer it if we could set our own interval, but if that's not possible I would just halve the interval so it seems a bit less janky. Or create another PathFindingAttackerIntelligent.
TagsNo tags attached.

Activities

ptarth

Mar 3, 2016 8:15 pm

developer   ~0045357

Side note: A system's minimum range should probably be equal to the system's shot hitbox. Likewise some of the homing shots that fail to "hit" might be served by seeing how big their hitboxes are and increasing them.

Pathfinding attackers are given FlockOrderType of FlockOrderType.Attack. This provides them with the location where they need to go in order to attack. Flock.cs line 653 checks if a GameEntity with FlockBehaviorType (or other types, it is the final entry in case statement) has a either no orders or any order OTHER than an attack order. Since the Ship HAS an attack order, it doesn't receive any new ones.

If you remove the AttackOrder check there, then the ship will reorient itself terrifying fast (every 200 to 300 ms I believe). However, it also starts jiggling every time it resets the AttackOrder. I'm not seeing why though. My first thought was momentum, but that doesn't seem to be the case (no massive differences between deceleration 0,1,50,500). Attack debug log is: 2a:1:2a:1:1d. It seems that it has to search for a target twice. It finds the player both times, but only one the second trip is it a valid target.

Something like running UpdatePathfinding when order.TypeData.Type == FlockOrderType.Attack seems to be what should be done. But I'm not making enough sense of this to make it work.

keith.lamothe

Mar 8, 2016 3:50 pm

administrator   ~0045378

For 1.017:

* PathfindingAttacker enemies now update their paths more frequently.

Thanks :)

keith.lamothe

Mar 8, 2016 3:52 pm

administrator   ~0045379

ptarth: you can probably see what I did: it still treats an existing attack order as "oh, I don't need to actually look for a target, so I'm done", but now it updates the pathfinding on that attack order before skipping the rest.

It also ditches the first move point if that's on the same tile as the pathing entity is already, so they don't keep doing those short back-ups when they do an update.

Issue History

Date Modified Username Field Change
Mar 1, 2016 4:25 pm Pepisolo New Issue
Mar 1, 2016 4:26 pm Pepisolo Description Updated
Mar 1, 2016 4:27 pm Pepisolo Description Updated
Mar 1, 2016 4:28 pm Pepisolo Description Updated
Mar 3, 2016 8:15 pm ptarth Note Added: 0045357
Mar 6, 2016 5:03 pm ptarth Assigned To => keith.lamothe
Mar 6, 2016 5:03 pm ptarth Status new => assigned
Mar 8, 2016 3:50 pm keith.lamothe Note Added: 0045378
Mar 8, 2016 3:50 pm keith.lamothe Status assigned => resolved
Mar 8, 2016 3:50 pm keith.lamothe Resolution open => fixed
Mar 8, 2016 3:52 pm keith.lamothe Note Added: 0045379