AI bunching up

These are old bug reports that have been closed.
Locked
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

When groups of AI ships follow you, they all get in a line and wait for you to blow them to bits. Only the front man can shoot, and if its really bad, not even he shoots.


I suggest that the AI spreads out and fires continuously so that the player has a harder time dodging all the spread-out bullets.


I also suggest that the AI dodge bullets when they are in pursuit of a player at a range of 30ls or more, especially when they are not gaining. All this means is that they step out of your line of fire when you try to snipe them to bits and they are ordered to attack you. This would make the AI a lot more powerful IMO as the ships wouldn't die so easily once you manage to disengage (a very easy thing to do in the wolfen gunship).
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

the only problem with that is turning and spreading out slows them down. I agree that is should happen but then you would need ships to act as groups and most ships do not do that currently.
Crying is not a proper retort!
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5510
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

F50 wrote:When groups of AI ships follow you, they all get in a line and wait for you to blow them to bits. Only the front man can shoot, and if its really bad, not even he shoots.


I suggest that the AI spreads out and fires continuously so that the player has a harder time dodging all the spread-out bullets.


I also suggest that the AI dodge bullets when they are in pursuit of a player at a range of 30ls or more, especially when they are not gaining. All this means is that they step out of your line of fire when you try to snipe them to bits and they are ordered to attack you. This would make the AI a lot more powerful IMO as the ships wouldn't die so easily once you manage to disengage (a very easy thing to do in the wolfen gunship).
yeah, a really massive problem... any heavy weapons (thermo, positron, plasma, antimatter) really mows them down. Ion's pretty effective too...
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Dwarg raiders attempt to avoid each other (though not always successfully).

But in order to do that, they need to check the position of all other ships in the system--which turns into an O(n^2) problem. That is why the Dwarg slow down the game so much.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5510
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

george moromisato wrote:Dwarg raiders attempt to avoid each other (though not always successfully).

But in order to do that, they need to check the position of all other ships in the system--which turns into an O(n^2) problem. That is why the Dwarg slow down the game so much.
how about doing this only for the b-liners?
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Could you target extra AI like shot avoiding and group patterns only for the ships 'currently in action' or on screen/ close when dogfighting with the playership?
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Periculi wrote:Could you target extra AI like shot avoiding and group patterns only for the ships 'currently in action' or on screen/ close when dogfighting with the playership?
Dwarg already do that. But it doesn't help that much--to figure out which ships are 'currently in action' or 'dogfighting with the playership' you still have to loop over every ship in the system and calculate distance, target, etc.

There are some fancy techniques for segmenting objects in a quad-tree--in theory that makes it faster to figure out which ships are near a given target. But in practice you spend a lot of cycles keeping the quad-tree updated. I need to experiment more.
User avatar
Sheltem
Militia Lieutenant
Militia Lieutenant
Posts: 153
Joined: Tue Sep 04, 2007 1:44 pm

george moromisato wrote:Dwarg raiders attempt to avoid each other (though not always successfully).

But in order to do that, they need to check the position of all other ships in the system--which turns into an O(n^2) problem. That is why the Dwarg slow down the game so much.
why didn't you tell me that earlier :evil:
I had several threads complaining about dwarg caused lags -.-
Now I made a mod that fixes nothing.
regards
Sheltem

What do you think about the endless stream of spawns ?

What about modding wandering spawns which dont attack the player directly ?
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

What about storing a link to the commander ship on each of the zoanthrope raiders and then storing a link to all of the subordinate ships on the commander? Each ship will only avoid others in its group, but it will be relatively fast. Perhaps have only the commander check for ships near it, any ships near it are put into a list for the zoanthropes, that way a large part of the calculations are only done once per group?
kaypy
Commonwealth Pilot
Commonwealth Pilot
Posts: 58
Joined: Wed Apr 25, 2007 6:42 am

Another possibility-

Since you already check for 'is there anything in the way' while shooting, you could hook that straight into 'if something is in the way, turn (random offset) for a bit'
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

another possibility: divide the system in 4 quadrants, and keep a wandering dwarg master in one of them, no hard calculations needed, just keep the position of the dwarg masters and modify direction when needed.

when there are more than 4 dwarg masters, then you do calculations to keep the dwarg away from each other, but only inside the quadrant and only between the 2 dwarg masters.
Locked