AI Overview
The Autonomous Area Denial System is a stack of AI classes in one namespace.
Encapsulating the AI Library is a single C# class,
AIPlayer
which extends the existing PlayerBase class and adds a polymorphic interface that exposes the AI Data Types relevant to the game-specific role it supports
This system has been fully coded into a playable demo. (this game!)
AI Hierarchy
Class (Base) | Patrol | Visit | Formation | Delay |
---|---|---|---|---|
AISoldier (AIPlayer) | Nav Mesh | Nav Team | ||
AIGuard (AIPlayer) | Nav Point | Guard Wait | ||
AIGuardSoldier(AISoldier) | Nav Mesh | Guard Wait | ||
AISniper (AISoldier) | Wait |
Currently these values are hard-coded to default values, but they are set up to be parameter-ized using this design.
NPC Traits used to differentiate behaviors within formations when they scatter. All these are factored by server global AI sliders.
NPC Starting Traits (to-do: randomize)
Traits are all 1-100 | game-specific rule | Clamp Data Range / Type |
---|---|---|
Marksmanship | shot accuracy degradation factor | 0-1 / position |
Leadership | msg delay to team members | 0-10 / seconds |
Sportsmanship | shot aim delay, target headshot | 0-5 / seconds & determinism |
Aggression | avoid run away state | 0 -100 / determinism |
Threat Level Awareness | adjust hearing distance | .5 +- / position |
Stamina | adjust damage | .5 +- / damage modifier |
Armor | hit points, takes damage then fail | 0-100 / damage reduced |
Experience | ai can get abilities increased | 0-100 / level up kills for skills |
Vehicles drive themselves. The AI is just along for the ride.
Path Points Auto-Pilot Controls for Autonomous Vehicles
Action | public float PathAction |
---|---|
Pick Up Men | 1 |
Drop Off Men | 2 |
Random Dlay Time | 3 |
Decrement PathID | 4 |
Increment PathID | 5 |
Window | 6 |
Double Radius | 7 |
Random Path | 8 |
Patrol Last 4 | 9 |
Reverse Path | 10 |
Window is a 50/50 branch that runs 10 blocks of path-points then quits.
Radius expansion allows for loitering vehicles to turn tighter circles to close in on a target while in bulldog search mode. The radius resets when it hits a window.
Nav meshes support dynamic blocks in real-time based on triggers that can occur for any reason the mission designer requests.
Dynamic Nav-Mesh Blocks and Vertical Height Filtering
NavMesh Cell Type | game-specific rule | public enum CellType |
---|---|---|
Normal | path | 0 |
Blocked | no path | 1 |
CheckPos | door hinge offset to doorway center | 2 |
Window | top of stairs sets vertical ceiling height filter | 3 |
Antique | disable window updates optimization | 4 |
FightPos | n/a unused | 5 |
HidePos | n/a unused | 6 |
Blocked2 | 50% paths are randomly blocked | 7 |
Blocked3 | 35% paths are randomly blocked | 8 |
Blocked4-6 | dead body proximity. changes threat awareness | 9-11 |
Blocked7-9 | team block. prevents POWS going in doorways | 12-14 |
AI Players dont see vertically stacked navmeshes until they hit a window cell while pathfinding. Then the filtering activates based on the global height set for that level. AI with only local pathfinding wont see windows and therefore will never activate height-based filtering. Only with global pathfinding enabled will they hit the stairs or vertically placed navmeshes.
Files
Get GunTruck Patrol
GunTruck Patrol
FULL VERSION
Status | Released |
Author | harntrox |
Genre | Shooter, Simulation |
Tags | artificial-intelligence, FPS, Multiplayer, Physics, Singleplayer, Tactical, Third-Person Shooter, Vehicles, War |
Languages | English |
Accessibility | Configurable controls |
More posts
- Full Version ReleasedSep 17, 2022
- Mod SupportJun 08, 2022
- All Tree Generator toolJun 08, 2022
- Tools and resourcesJun 08, 2022
- GunTruck PatrolJan 27, 2022
Leave a comment
Log in with itch.io to leave a comment.