Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

My Squad AI Thing Goto page Previous 1, 2, 3, 4 Next

| Inside3d Forums Forum Index -> General Discussion

View previous topic :: View next topic
Author | Message
--- | ---
MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Fri Feb 20, 2009 10:38 pm Post subject: |

UPDATED V1.1: http://www.fileplanet.com/hosteddl.aspx?/hst/e/l/elf/squad11.zip Apologies for the fileplanet hosting; quaketastic has a 50mb file size limit. What's new? Strafing while firing when appropriate to avoid player's firing line
Greater use of danger allocation for waypoints (death, pain, bullet impacts, grenades etc).
Camping behaviour (if the route selected goes through a very dangerous waypoint, it's likely the player is in a dead end camping. Camp and wait for the player to step out instead of rushing in one at a time to die.)
Damage skins (just for fun)
Footstep and bullet ricochet sounds.
Sounds alert nearby guys.
Many AI tweaks.
New level, city.bsp by Harb. This was originally going to be a DiD2 map, but was never finished.
Support for prelinked and autolinked waypoint files.
_________________
Apathy Now!

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sat Feb 21, 2009 12:57 am Post subject: |

I just tried the older version earlier today and I must say it's pretty darn neat. The exploit I was going to bring up is the one you just fixed: I was camping a corridor and waiting for them to pop out one by one. It doesn't really feel like they're a very cohesive squad however, I'd suggest some reaction to fallen teammates ("Man down!"), retreat when they feel overwhelmed ("Retreat! Fallback!") - tying into the danger stuff you've already done. What I'm suggesting is more group think I guess.
Edit: Will check out the new one on the weekend.

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Sat Feb 21, 2009 8:07 am Post subject: |

FrikaC wrote:
The exploit I was going to bring up is the one you just fixed: I was camping a corridor and waiting for them to pop out one by one.

Yeah, that was an issue before, as Urre noted eariler. Now, they'll react much more strongly to the death of teammates danger-wise. if you camp now, one will come after you, and if you kill it in the doorway/pinch point the others will try to find another route, and if not they'll just wait for you to come out instead, at waypoints just before the pinch point. The previous version had the alternate routing, but not waiting if that was the only route available.
The "corridor syndrome" is also less noticable on the new level, as it's more open with more alternate paths to each location, so they'll flank you much more often. They tag the penultimate waypoint on their route as temporarily difficult for anyone except them to force the next guy to find a different route, and so they end up attacking from multiple directions if possible.

FrikaC wrote:
It doesn't really feel like they're a very cohesive squad however, I'd suggest some reaction to fallen teammates ("Man down!"), retreat when they feel overwhelmed ("Retreat! Fallback!") - tying into the danger stuff you've already done. What I'm suggesting is more group think I guess.

Yes, this is definately the tricky part. I don't have an overall controlling squad AI entity or anything, the idea is to achieve squad-like behaviour emergently by having them communicate with each other. Most of this is behind the scenes however, with only a couple of obvious exceptions (if you have one in your sights, a friend nearby may call out for him to take cover for example). I guess I need to start recording a bunch more lines for the next version, and add a few new behaviour types.
I'm vaguely tempted to restructure it as a test-bed for genetic algorithms, but that may be going a bit too far.
_________________
Apathy Now!

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Sat Feb 21, 2009 9:44 am Post subject: |

if you gpl the code (at least a comfortable dual license to sit well between both quake modders and quakec Free Software exploiters such as myself) i'll screw with it in something new if i do something. The AI functions in WinQuake does it? I can't test because the map is darkplaces specific.

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Sat Feb 21, 2009 11:40 am Post subject: |

The AI uses a few DP extensions, but mostly for ease of coding rather than neccessity. Most of the extensions are probably replacable with standard QC. Obviously crouching needs variable hull sizes etc. Feel free to consider the code GPL, I'll make it explicit in the next version. Most of the models aren't GPLable though, and will eventually be replaced. The Industrial map is GPL I believe as I grabbed it from Nexuiz, but Harb's city map isn't, because the .map file has been lost.
_________________
Apathy Now!

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Mon Feb 23, 2009 8:38 am Post subject: |

You can still GPL assets which lack the source file you know. It really just gives people an "ok" to decompile or spread the map under the GPL. Haven't tested yet, but I do love the sound of that camping behavior, might make it pretty solid. Looking forward to getting my hands on it later on. Cool stuff!
Any chance you could list the extensions and other documented/undocumented features that makes it DP reliant currently?
_________________
Look out for Twigboy

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Mon Feb 23, 2009 9:28 am Post subject: |

Hmm, i haven't really kept a list, but i'll give it a go. Many have direct and easy replacements, but some don't. Q3BSP (variable hull sizes for crouching, HLBSP could work too I guess). Frik_file (for the waypoint file loading) External model/map textures including _luma
EF_ADDITIVE (barrel fire)
EF_NOSHADOW (barrel fire)
.ent files
md3 models
a couple of shaders
findchainfloat
cl_prydoncursor (not directly used by the player, but there is a half working prydon cursor based waypoint editor in the code that could probably be stripped out no problem).
.scale (used by the waypoint editor again).
te_lightning1 (used by the waypoint editor).
.alpha (not in relased version, but in the new version i'm working on)
.glow_size
.glow_color
EF_LOWPRECISION (not in relased version, but in the new version i'm working on)
EF_NOMODELFLAGS (to get rid of grenade smoke)
effectinfo.txt (not in relased version, but in the new version i'm working on)
SOLID_BSP on models (crates, lamp posts, barrels)
tracebox (for waypoint autolinking)
That's all the ones I can find on a quick code skim, though there may well be others. I'm planning to use getlight in the next version too.
_________________
Apathy Now!

Back to top |

worldspawn Joined: 02 Dec 2008 Posts: 26 |

Posted: Mon Feb 23, 2009 6:42 pm Post subject: |

Definitely plays smoother than the first release. The AI uses grenades sparingly now, and it definitely feels way more realistic. I have a few suggestions on that note: - Slow the ai routine way, waaaay down. It still feels like they just charge at you. Slowing down how quickly they react will help I think.
- Have them stay in cover longer. I didn't look at any of the qc, but it seems like the AI doesn't 'know' that keeping a little distance between themselves and the player is a good thing. If they're within x range of the player they should stay put and keep firing.
- Keep them in their firing stance for a while, even if they lose sight of the player. If the player crouches in and out of view, the AI basically cycles endlessly between moving and crouching to fire.

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Mon Feb 23, 2009 7:35 pm Post subject: |

worldspawn wrote:
- Slow the ai routine way, waaaay down. It still feels like they just charge at you. Slowing down how quickly they react will help I think.

They'll definitely act more cautious in the next version, and they'll not "cheat" by knowing where you are all the time, so you'll be able to hide in shadows etc. Realism does indeed sometimes mean making them less perfect.

Quote:
- Have them stay in cover longer. I didn't look at any of the qc, but it seems like the AI doesn't 'know' that keeping a little distance between themselves and the player is a good thing. If they're within x range of the player they should stay put and keep firing.

None of their AI is based on distance at all, just visibility. If they can't see the player they try to get to somewhere where they can see him, so that usually means coming closer. I'm going to improve the visibility search, which will mean they won't always come closer, they may go to visible waypoints that are further away.
As for staying in cover, that's something I need to work on. I'm planning to add a layer of communication between the AIs whereby they'll try to keep a percentage of each other in cover, a percentage shooting etc.
I've already made an improvement in this respect by making waypoints visible to the player as slightly dangerous, so they'll tend to try to use paths that stay out of his sight. This'll be in the next version.
Either way, you're right that I need to make them use cover more.

Quote:
- Keep them in their firing stance for a while, even if they lose sight of the player. If the player crouches in and out of view, the AI basically cycles endlessly between moving and crouching to fire.

Annoyingly the model doesn't have any firing stance animations other than firing, but I might knock some together. I'm limited in a lot of ways by the animations I have available. I'm not much of an animator, but I can probably knock some firing stance standing frames together, and go from there. You certainly have a valid point.
_________________
Apathy Now!

Back to top |

worldspawn Joined: 02 Dec 2008 Posts: 26 |

Posted: Mon Feb 23, 2009 8:08 pm Post subject: |

MauveBib wrote:
Annoyingly the model doesn't have any firing stance animations other than firing, but I might knock some together. I'm limited in a lot of ways by the animations I have available. I'm not much of an animator, but I can probably knock some firing stance standing frames together, and go from there. You certainly have a valid point.

If you're willing to drop compatibility and use darkplaces (almost) exclusively, I could whip up something in the dpm format.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Mon Feb 23, 2009 9:31 pm Post subject: |

worldspawn wrote:
If you're willing to drop compatibility

pft we're too good for doing that. qsg extensions ftw!

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Mon Feb 23, 2009 10:49 pm Post subject: |

worldspawn wrote:
If you're willing to drop compatibility and use darkplaces (almost) exclusively, I could whip up something in the dpm format.

As far as I'm concerned it's DP only. If anyone wants to take it and convert it to other engines that's fine with me, but I have no intention of doing so.
In other words, I'd gladly accept such a dpm model
_________________
Apathy Now!

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Thu May 28, 2009 11:09 am Post subject: |

nevermind about vanillas, i've switched to DP anyway. _________________

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Sat Aug 01, 2009 7:36 pm Post subject: |

UPDATE: New release, 1.2, with a bunch of new features: New grenade model New funky DP particle effects High-res textures for city.bsp, with normal and specular maps.
Understanding of light and dark. The player can now hide in shadows, though firing will give away his location. The enemies update each other on their last seen location of the player. The enemies will also use dark areas as cover.
"Searching" animation for when they can't see the player
Screen blood splatter when injured
Funky new player death effect
New muzzle-flashes, shell casings and other shiny new graphics.
Loads of stuff I've inevitably forgotten in the big gap between coding and releasing this.
Various tweaks.
http://www.electronicliberationfront.co.cc/files/squad.zip
Some people may have issues downloading it, so here's a fileplanet link:
http://www.fileplanet.com/hosteddl.aspx?/hst/e/l/elf/squad12.zip
_________________
Apathy Now!

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Sun Aug 02, 2009 1:55 am Post subject: |

UPDATED AGAIN I know, twice in one day, ya. Finally got the behaviour pretty much how I want it. I rewrote the cover and firepoint finding routines, and made them "hug" cover, popping out of corners to shoot then popping back in again etc. They also try to keep even numbers hiding and shooting, to provide a "covering fire" effect.
http://www.fileplanet.com/hosteddl.aspx?/hst/e/l/elf/squad13.zip
_________________
Apathy Now!

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> General Discussion | All times are GMT Goto page Previous 1, 2, 3, 4 Next
Page 3 of 4

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group