A downloadable game for Windows

Overview

Boids FishTank: Predator–Prey Flocking Simulation (Orca vs Tuna) is a real-time aquatic ecosystem built in Unity HDRP. It extends the classic Boids flocking algorithm into a predator–prey scenario where tuna school together and orca pods coordinate hunts using role-based behaviors.

The goal of the project is to explore how far flocking models can be pushed toward more cinematic, natural-looking, and fun-to-watch behavior—almost like a digital fish tank powered by AI.


Features

  • Prey Agents (Tuna) – Classic Boids flocking (separation, alignment, cohesion) with obstacle and predator avoidance.
  • Predator Agents (Orcas) – Extended, role-based behaviors (leader / flanker / striker / support) with targeting, pursuit, interception, flanking and attack.
  • Predator–Prey Interaction – Tuna schools tighten, scatter and reform in response to orca pressure and strikes.
  • Obstacle & Boundary Avoidance – Both species steer around tank walls and terrain using lightweight spherecast-based avoidance.
  • Real-Time UI Tuning – In-game panels let you adjust flocking weights, speeds, radii and predator parameters while the simulation is running.
  • HDRP Environment – Built in Unity HDRP using the Water/Ocean and Terrain systems for reflections, depth and atmosphere.
  • Cinemachine Cameras – Free-roam camera plus follow/overview rigs to watch the school or focus on individual orcas.
  • Underwater / Above-Water Audio Blend – Audio mix shifts smoothly as the camera moves below or above the water surface.

Controls

  • Camera Move: W A S D
  • Camera Look: Mouse
  • Zoom / FOV: Mouse scroll
  • Boids (Tuna) Parameters: F1 – open/close tuning panel
  • Orca Pod Parameters: F2 – open/close predator tuning panel
  • Audio Mute / Volume Toggle: F3 (and additional audio controls in the small on-screen panel)

Note: This is an interactive simulation / sandbox, not a traditional game with win/lose conditions. The fun is in watching the behaviors emerge as you tweak the parameters.


Performance Notes

This project focuses on behavior and visual quality rather than extreme agent counts. The simulation uses Unity Jobs + Burst and a spatial hash grid to accelerate neighbor queries, but performance can still drop at very high fish counts, especially with HDRP water, terrain, and post-processing enabled. If your frame rate is low, try reducing the number of boids in the UI panels.


Planned / Possible Future Extensions

  • More species and behavior variations (e.g., different fish types and predator styles).
  • More customizable “behavior presets” similar to a particle system for easy authoring.
  • Additional environment types and lighting setups.
  • Further optimization for higher agent counts.

Thanks for checking out the project! Feedback on flocking behavior, predator–prey dynamics, or performance is very welcome.


Credits

3D models used in this project are licensed under the Sketchfab Standard / CC Attribution licenses. Proper attribution to the original creators is provided below:

Assets are used under their respective Sketchfab Standard / CC Attribution licenses. No redistribution of original source files is included.

Download

Download
UnityBoidFishTankHDRP_Build.zip 255 MB

Leave a comment

Log in with itch.io to leave a comment.