/fishy-sim

A simple fishy simulator using HTML5 and JS

Primary LanguageJavaScript

I was given a task at work a while back to create a simple simulator.

In this simulator three objects exist namely:

  • Fish
  • Foodsource (Coral or whatever you want)
  • Sharks

Fish need to move around and have simple grouping behaviour. If they move around, they lose a small amount of "energy". To maintain their energy levels they need to feed and once they've eaten enough, they reproduce.

However there's a shark swimming around wanting to eat the fish to restore his energy.


This exercise was first built using C# and Windows Forms. I have since decided to rewrite the project as a JS project using the HTML canvas.