Big improvement: Refined AI behaviors


Opponent AI UPDATED - Better than ever


I have held off from this project since I entered my full time job and had no idea how to improve the game further. One day, I looked more into AI behavior and I realized that distinct behavior is needed to break away from all AI chasing players non-stop.

Therefore, I have implemented a few new components that modularizes AI behavior including Waypoint Generator, Setup Initial Target, and more. Additionally, I made sure that when waypoints are generated, they will always spawn only on walkable areas so the AI are less likely to stand still all of the sudden.

AI Behavior in Action:

Green - Wanders randomly

Yellow - Aims towards the screen edge from player location


Red - Now patrols in circles


Blue - Still the same aggressive spinner



What does that mean?

With the AI improved, now I can feel confident to tackle the other sides of polishing including visuals, sounds, UI refinement, and more.


Improvements List

  • New AI behavior implemented to all opponents
  • Adjusted a few levels - Some levels now contain narrow gaps to explore size dynamics of regular fish and small fry
  • Polished code that forces fish entities to bump away from solids, especially when the fish gets stuck between two or more solids for quick ejection. Will likely tweak around that code some more.

Extra

What happens when visited nodes do not get reset:


Quick Update 1

Fixed up collision code and set solids to have no friction, so any entity can smoothly slip out of tight gaps. Previously, solids had no physics2d material, and caused entities to stop with friction. When applying the material with any friction above 0, then the fish could get stuck in tight gaps. Now there's certainly no way for any fish entities, including players to get stuck inside, especially with players re-growing from small fries to normal size.

Quick Update 2

Did some more minor polishing on player movement and tweaked some AI behavior to experiment with difficulty appropriate behavior.

  • All fish entities will decelerate slower when not moving. Useful for expanding player dynamics and strategies. Achieved by lowering linear drag at runtime.
  • Adjusted speed of fish entities to move smoothly while keeping controls responsive.
  • When any fish gets shrunk to small fry, they get pushed back and will get bumped again from normal fish during their brief invincibility. Indirectly prevents small fries from not being eaten when their invincibility is over. Need to consider Collision On Stay condition to really complete the scenario.
  • Minor tweaks on green and yellow fish AI for behavior fine tuning
  • One level tweaked - Cross solids now closes gaps to the edge for experimentation on AI opponents

Quick Update 3

Based on having difficulty defeating some opponent AI, I tweaked behaviors and fixed up a few behavior bugs

  • Any fish with standard Attack and Flee behaviors will now respond properly based on angle of closest player
  • Green and Yellow fish AI tweaked to reflect more of intended difficulty flow:
    • Green fish will now torpedo towards nearest player, and bump upon hitting solid or player. Does not ever turn around
    • Yellow will flip when both closest player and opponent face each other, and will flee when player's tail blade is in front of opponent
  • Increased waiting time for most opponent fish AI after making attack move

Files

fintailPC_01_72_Win.zip 22 MB
Mar 24, 2021
fintailPC_01_72_Win64.zip 25 MB
Mar 24, 2021
fintailPC_01_72.app.zip 24 MB
Mar 24, 2021
fintailPC_01_72_Linux.zip 13 MB
Mar 24, 2021

Get Fintail Gladiator Prototype

Leave a comment

Log in with itch.io to leave a comment.