idea for possible improvement to pathfinding destroying ups on deathworlds

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Divran
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Wed Jan 14, 2015 9:13 pm
Contact:

idea for possible improvement to pathfinding destroying ups on deathworlds

Post by Divran »

Hi

I'm playing on a deathworld. Here is a picture so you get a sense of just how many enemies there are.
https://cdn.discordapp.com/attachments/ ... nknown.png

The problem is, I'm unable to fire my artilleries at their max range, because firing that far behind enemy lines causes the enemies to attempt to pathfind to me indefinitely, which lowers my UPS from 60 to unplayable levels.
The main issue is that enemy pathfinding gets blocked so far behind enemy lines that they can just never finish calculating. Or at least, it will take a very, very long time.

I had an idea which might solve this issue.

The idea is:
1. When an enemy fails to pathfind to your base for X amount of time, due to being blocked by other enemy bases, it will "pass on its agression" to any random enemy of the same size & type as itself, which happens to be standing within a cone facing the direction of your base.
2. The current enemy becomes passive (loses its agression) and stops pathfinding, and the new enemy will pick up where it left off and try again.
2b. Optionally reduce the amount of time before giving up so that it tries for shorter and shorter intervals each time.
3. Repeat until the "wave" of agression enters the border between the enemy lands and your cleared artillery lands. They are now free to pathfind to your base.

Side note: It would probably be possible to fine-tune the time before "giving up" and passing the agression along, such that the "wave" of agression takes the same amount of time to reach you, as an enemy would if it ran that whole distance in a straight line. That said, it might be better to make it faster, so that the massive UPS drops can clear up quicker.

Thanks.

User avatar
leadraven
Filter Inserter
Filter Inserter
Posts: 354
Joined: Fri Jan 18, 2019 7:23 pm
Contact:

Re: idea for possible improvement to pathfinding destroying ups on deathworlds

Post by leadraven »

Another idea : let enemies walk over their buildings, at least where it isn't a big deal.
Last edited by leadraven on Wed Mar 13, 2019 2:48 pm, edited 1 time in total.

Pin-Lui
Inserter
Inserter
Posts: 27
Joined: Fri Apr 01, 2016 12:09 pm
Contact:

Re: idea for possible improvement to pathfinding destroying ups on deathworlds

Post by Pin-Lui »

Another idea : Trigger the biter attack nearest to the Artillery, not where it hits.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: idea for possible improvement to pathfinding destroying ups on deathworlds

Post by Tekky »

Divran wrote:
Wed Mar 13, 2019 12:04 pm
The problem is, I'm unable to fire my artilleries at their max range, because firing that far behind enemy lines causes the enemies to attempt to pathfind to me indefinitely, which lowers my UPS from 60 to unplayable levels.
In this thread, one of the Factorio programmers asked for savegames to be posted that have specific or extreme performance issues. Therefore, I suggest that you post your savegame in that thread.

The Factorio programmers have better possibilities to diagnose performance issues, since they can profile the source code with your savegame loaded.

Divran
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Wed Jan 14, 2015 9:13 pm
Contact:

Re: idea for possible improvement to pathfinding destroying ups on deathworlds

Post by Divran »

Tekky wrote:
Thu Mar 14, 2019 2:30 am
Divran wrote:
Wed Mar 13, 2019 12:04 pm
The problem is, I'm unable to fire my artilleries at their max range, because firing that far behind enemy lines causes the enemies to attempt to pathfind to me indefinitely, which lowers my UPS from 60 to unplayable levels.
In this thread, one of the Factorio programmers asked for savegames to be posted that have specific or extreme performance issues. Therefore, I suggest that you post your savegame in that thread.

The Factorio programmers have better possibilities to diagnose performance issues, since they can profile the source code with your savegame loaded.
Sure I can do that as soon as I get home, but it shouldn't be necessary since this is a very simple issue to reproduce.

If you create a new game with enemy frequency and size maxed out (and spawn area radius minimized so that more enemies are nearby) and then immediately just spawn in a bunch of artilleries and fire them at the max radius in a circle it should start lagging as soon as the shots hit. I haven't tested this but it should behave the same way.

Post Reply

Return to “Ideas and Suggestions”