Opponent Fish AI Implemented
It has been a long time since I have made the prototype of one of my game projects. Now that I got motivation for work on it more, I finally got one of the core features that I wanted: Opponent Fish AI
Basically, the idea behind the AI is to utilize the path-finding while combining both dynamic physics and having a virtual "game controller" direct its movement.
Feature | Intention | |
A* Pathfinding | The base navigation system to detect the closest player to seek and then flip tail to flee when close to player. In its current implementation, the pathfinding refreshes in real time to encourage the AI to adapt themselves to better aim towards the player. Additionally, the pathfinder is also used for the flee waypoint, which may not always work. | |
Dynamic Physics | The game is built around basic 2D physics in Unity to add flavors of chaos like early Williams arcade video games, including Joust. I was originally going to implement a more restricted physics, but found that Unity's built-in physics are sufficient for this game. | |
Virtual Joystick | The AI fish will move based on the "virtual joystick" based on path-finding logic. Hope to expand usage of virtual joystick to do crazy things with different AI opponents as well as simulating "hardware input lag", which may come in handy for future development. That can come even handy for creating an "Attract Mode Player", which is a computer controlled player fish, but is superior to the opponent fish AI. |
As a Minimum Viable Prototype (MVP), I went ahead and implemented a basic A* pathfinding on a grid as well as putting in the basic Finite State Machine (FSM) with seek and flee. As you can see, the fish behave as intended for the most part. However, there are still many more refinements to go.
Even through I am glad to build in the foundation for opponent fish AI, there's more room for real growth.
In case you like more of the snapshots of the AI in action, there's more with plenty of behavior bugs:
Current version - I don't know why they sometimes move too fast...
A test level, not in the demo version, which I think behave more smoothly and maybe not as fast for some reason:
Anyways, feel free to download the demo and try it yourself. I encourage you to leave some feedback, especially on improving the path-finding that accounts for 2D physics and not getting suck at dead ends.
Files
Get Fintail Gladiator Prototype
Fintail Gladiator Prototype
A game concept that involves a tribute to Joust, but with fish and tail blades.
More posts
- Fintails Have Grown Bigger Blades and Smoother ControlsMar 26, 2021
- Big improvement: Refined AI behaviorsMar 21, 2021
- Fintail Gladiator - Level Switching Done and Prototype ClosureNov 15, 2020
- Dynamic Difficulty Adjustment AddedOct 10, 2020
- Major Polish Boost (or not...) Version 01-4-3Sep 19, 2020
- Minor fixes - Fixed fatal crash and small fry graphicsSep 18, 2020
- Small Polishing and bug fixes - Score Text Pop up and moreSep 13, 2020
- Small fries: The new and integral feature!Sep 08, 2020
- Wave Demo - Now you can play the game in wavesAug 25, 2020
- Small Game Polishing - Pause, High Scores, Fish Art UpdateJul 31, 2020
Leave a comment
Log in with itch.io to leave a comment.