seabass617 / Ecosystem-Project-4-Sharks---Minnows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ecosystem Project 4: Sharks & Minnows

Fourth project as I make my way through "The Nature of Code". This project adds to my ecosystem by implementing inheritance and polymorphism with the sharks and the minnows. Sharks act as repellers to the minnows. A user is able change the scare radius and scare intensity of the shark in order to see how fish behaviors change.

I also cleaned up my code, adding more encapsulation and abstraction. And I was able to make my code more dynamic and scalable by removing hardcoded values.

How this project could go further:

  • Implementing vision! Hoping to get to this in the next few chapters of the book. Right now we are going to every fish in the system to check whether or not it is within the scare radius. This is computationally heavy. Adding vision would mean you only check and scare fish within your view.
  • Hope to add schooling behaviors next!
  • Allowing for the user to control the shark would be fun
  • It would be interesting to see a lifespan behavior of the fish, say if they get eaten by a shark
  • Population control of the fish and shark would be a nice touch

About


Languages

Language:JavaScript 93.1%Language:HTML 4.6%Language:CSS 2.3%