- Share this text:
AI Pathfinding Examples & A* - By IKELOS on 28th November 2020 12:21:33 AM
https://gfycat.com/impishmeekhyracotherium
"Here are some examples of the Bot AI and giving them commands. The AI Squad has orders to follow you, take up an attacking / aggressive position, or to go into stealth mode and stay put or find a hiding spot. You can also order them to specific locations placed by you to either take up attacking positions, or use items in the world - press a switch, use a mounted machine-gun, so on. This also briefly demonstrates the weapon load-out system, where you can only carry a limited number of weapons at a time. You also carry bandages to heal yourself in 25 HP increments, rather than picking up health items off the ground. The only combat mechanic not yet implemented is Aim Down Sights, and that's because the art isn't ready."
https://gfycat.com/thunderousvibranthogget
"Here is the enemy AI patrolling pre-placed patrol paths, basically just putting them on a Locator track. There can be multiple patrol routes with multiple guards on them. Here there is one guard patrolling around the hill, and another walking up and down the hill. They can stop randomly or at predetermined positions. They become alerted when the player is within their field of view (signified in testing by the blue/red palettes). When attacked they immediately become hostile."
https://gfycat.com/sleepyyawningagama
"Here is some real world use of the Squad AI (and a peek at some weather effects). You can see the Bots taking up an Aggressive stance and following the player closely as they walk down the road, before being commanded to individual locations that might be useful during combat. Their pathfinding AI is still in progress and will be expanded greatly in the next internal update."
https://gfycat.com/bothtastycony
"Here is the 2nd type of enemy AI, where they attempt to take up a cover position to shoot from. When they become alert, they seek out the nearest pre-placed and unoccupied cover location, and if none is found, they will advance on the player and their squad to flush them out. Using these "cover points" the enemy can also take up mounted machine gun positions to make for more difficult encounters."
On top of these features Michelle has also already added A* functionality to the AI. "A* which is pronounced A Star is a pathfinding algorithm. Actually it's THE pathfinding algorithm, and it's perfect for 2D applications. Imagine each grid is a grid in BUILD. This would be automatically computed and require virtually zero involvement from map designers." - see https://qiao.github.io/PathFinding.js/visual/