Pirate Simulation

This is a complex simulation of independent agents and a prey/predator model. Rules outlined below. 
Interaction: Click on a ship for the pirates to attack it!

Islands

There are 4 types of Islands in the Game

  • Fruit Island
  • Treasure Island
  • City Islands
  • Empty Islands

Empty islands can grow fruits (on a random timer) and they can be converted into Treasure Island by the pirates!

The Pirates

The Pirates follow a set of 3 main behaviours:

  • Hungry
    • Pirates have an internal food meter that when it reaches 0, they pathfind to a fruit island. Eating fruit will reset the counter
  • Hiding
    • Pirates also have an internal "riches" counter that goes up when pillaging. 
    • Once full, they will seek out an empty island to bury their treasure
  • Pillage
    • They hear of a town that's good for pillaging, and they pathfind to it.
    • Once there, they will hold for a few seconds
    • And then onwards to pillage!

Pirates also hunt down nearby ships! If successful, they will plunder the ship, gaining +1 riches.

Other Ships

There are two other types of ships:

  • Traders
    • Spawn at a town not on fire
    • Travel to another town for trade
  • Bounty Hunters
    • Spawn at a town not on fire.
    • Travel to a Treasure Island and steal the treasure!
    • Find a town to sell your loot!

Assets and tilemaps by Kenney