Author Topic: AI modifications  (Read 2245 times)

0 Members and 1 Guest are viewing this topic.

Offline Fury

  • The Curmudgeon
  • 213
AI stuff has been discussed in other threads, but let's have it all in under one topic. :)

1) Fighter/Bomber AI collision checks
2) Turret AI
3) Gunship AI

Fighters and bombers tends to crash into other ships, especially wingmens and the player. According to Bobboau(?), this could be sorted out by expanding collision checks to include nearby ships. How about AI uses collision checks on all ships that are closer than 300 meters or so?

Turret AI, it needs threat rating. Targeting targets that are in top of threat rating first, and targeting lower priority targets last.
Threat rating could be something like this:
A) Bombs
B) Bombers
C) Capital ships
D) Fighters
Then turret AI uses the most effective weapon it has against those targets. Eg. anti-cap ship beams or "Huge" pulses against cap ships, flaks against bombs and bombers and anti-fighter beams or "normal" pulses against fighters.

So, Gunship is basically a large bomber with possible hangar bays. It can use turrets, primaries and secondaries. Righteous1 is working on this and more details can be found in this thread.


Please discuss people. :) AI mods are important.

 

Offline vadar_1

  • Mr. Crispy
  • 29
  • .
    • http://dynamic4.gamespy.com/~freespace/hosted/fullcircle/
I like how volition did the turret targeting system, and it seems to work fine, Check the BFotD on freespace2.com to see the system.

As for collision checking, you havta watch out and make sure that your not making your wingmen more idiotic then before by making them always run away from nearby ships.
"Shockingly, checking Draw Lines Between Marked Icons draws lines between the marked icons. " -Volition quality help files

Projects;
The Full Circle Project (site down - server side problem)
Paradox (site down - server side problem)

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
I think how turrets pick targets works just fine. (Part of that is checking things like how many turrets are targeting that target against how many max should target one ship depending on the difficulty level.) What does need adding I think is support for multiple weapons per turret. That means code to check what weapon, of the ones assigned to the turret, it should use against any particular target. It is possible to assign multiple weapons to a turret as is, they just don't do anything.

As far as collision checking, the AI is really stupid. It will not only collide with ships in the same wing or on the same team, it may repeatedly collide with them. Which any sane pilot would avoid. Here is an example in a mission I made: I have a wing of 4 ships following some waypoints. The player is 1 of the ships so that leaves 3. 1 of them is fine, the other two repeatedly collide with each other for no reason. FS2 ought to be able to have a group of ships follow a waypoint path without them all colliding with eachother. (Yes, I know I could make 3 seperate waypoint paths to fix the problem in this case, but that's beside the point. This is about AI updates.) Another example can happen if you have several wings of friendly ships and order all of them to cover you. :D I'll leave the rest of that one to your imaginations.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
ne'er mind
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 
What we need to do is get the AI to check if it collided with a ship over 'x' number of frames, and if so to move away. But, preferably we'd add some extra layers of intelligence to this - my idea is that when in formation the AI must maintain a certain sphere of clear space around itself.

Basically, we need to code some formation logic in there (I'm willing to start work on AI modifications once DX8.1 is done personally - its an area I love). Essentially, the AI checks if its in formation, checks this sphere of influence against what it was the last couple of frames, and if something impinges on one side it moves away and waits a few frames to see if its gone etc. etc. My idea is that we should be able to get the ships flying with a 'flocking' behaviour when in formation, so if one turns it triggers others to turn and so the whole wing turns.

 

Offline Fury

  • The Curmudgeon
  • 213
##UnknownPlayer##, otherwise a good idea but pure AI wings do not fly in true formations... Only when if it is assigned to guard another target.

AI fighters can only maintain formation when player uses "Form on my wing" command. But that is only usable by player, for obvious reasons.

Although I'd like to see AI wings to engage enemies in formations rather than behaving like lone wolves who gets pulverized by the enemy.

Hey! Can you make AI to understand teamwork? So that wings really engage single enemy together and tries to destroy the enemy who's attacking a wingmate and so on, unless single fighter is ordered to do something that does not include other wingmates.
« Last Edit: November 07, 2002, 07:07:27 am by 173 »

 
Good thread!

Based on discussions in other threads concerning the integrity of the original campaign, we will need a flag of some sort to activate 'improved AI' features.  Anyone making improvements to the AI would check the flag.  Even simple updates in this can change the way the campaign plays dramatically.  The flag should probably be on an options menu and be saved so the player only has to select it once.

Some things I've been toying with in the back of my mind:

1)  I suspect the part fighter/bomber spinning/bumping may be due to initial positioning.  The fighters/bombers must move from their initial positions to their 'prefered' formed positions when the mission starts.  Since there is no collision detection between them, they bump.  I've not noticed if a strictly AI wing has this problem or not, just with the AI ships assigned to the players wing.

Possible solutions:

a)  Improve the collision detection logic.  Drawback here is if we're not careful we could take a hefty performance hit.  Especially if there are a lot of ships in the mission.  Co-op multiplayer missions could take a hit here as well.

b)  Increasing the distance between the 'formed' ships might reduce the bumping some.

c)  Provide a feature in FRED2 that would allow the mission designer to position the AI ships in the preferred 'wing' formation relative to the lead ship.  It might be difficult to back out what these relative distances are but I don't know, I haven't looked at it enough to know.  We might update the logic allow the prefered wing formation to be selected similar to Homeworld while we're at it.

d)  Improve the turn rates and logic of the AI ships if the player is at zero or low velocities.  They seem to jump and turn too quickly if the player is sitting still.  In fact they probably shouldn't move at all if the player is still.  Perhaps not let the formate logic kick in until the player is above a certain speed.  If the player is sitting still, he should be able to rotate around and look at his wingmates without them running around trying to get behind him.  :)


2)  AI teamwork improvements

a)  Currently an AI ship may put out a call for help if damage gets below a certain level.  Perhaps this could be updated to change the orders of the nearest AI friendly to attack the damaged ships attacker (if the friendly AI ship is within a certain range of the damaged ship).

b)  This may already be available in FRED2 but if not, it should be.  Allow the mission designer to set up wingmates within a wing.  When setting up wings, allow one ship in the wing to be given an 'attack' order and another ship in the wing given a 'protect wingmate' order.  The second ship would 'protect' the first ship until the lead ship is destroyed then change to new orders (probably the lead ships orders).


3)  Bomber run improvements

a)  Currently bombers fly within range of their targets and stop (if they target is still).  Update the bombers 'paths' logic to model an actual bombing run.  The bomber would follow the current path logic, release its load.  if its taking damage, the bomber would move a 'safe point' on the other side of its target, then turn and make another run.

Some questions I have on this one, if the bomber is being attacked by a fighter, should it break off its bombing run and engage the fighter?  I'm thinking only if it's a good distance from its bombing target.

Those are my suggestions anyway.   I return you to your regularly scheduled thread... :D

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
One important thing needs to be done.  Ships deemed as "interceptor" should attack bombs themselves.  Sometimes I grow tired of being the only one hunting down bombs.  It would add strategy for bombing against enemy cap ships as well, because you don't just lock and shoot.  Also, a .tbl entry for missiles made specificly for destroying bombs would be nice.
Bunny stole my signature :(.

Sorry boobies.

  

Offline vadar_1

  • Mr. Crispy
  • 29
  • .
    • http://dynamic4.gamespy.com/~freespace/hosted/fullcircle/
Quote
Originally posted by Scuddie
One important thing needs to be done.  Ships deemed as "interceptor" should attack bombs themselves.  Sometimes I grow tired of being the only one hunting down bombs.  It would add strategy for bombing against enemy cap ships as well, because you don't just lock and shoot.  Also, a .tbl entry for missiles made specificly for destroying bombs would be nice.


If you tell wingmen to Defend a vessel, they will automatically prioritize bombs and bombers. however, they still arn't very good at it... much like everything else... I mean, when volition had to make a cyclops#short just so they wouldn't fire the normal one at maximum range, you know you have a problem.
"Shockingly, checking Draw Lines Between Marked Icons draws lines between the marked icons. " -Volition quality help files

Projects;
The Full Circle Project (site down - server side problem)
Paradox (site down - server side problem)