Termite Simulation Thumbnail
Name Termite Simulation
Description I first wrote a Termite Simulation for a second year assignment whilst at University.
C source code [written in 2014] WPF OpenGL Three.js [Browser]

I first wrote a termite simulation for a second year assignment in the low level programming language "C". Simulation

Later on, when I was teaching myself C#, I created another termite simulation as a WPF app with OpenGL graphics. Simulation

Afterwards, I wanted to make it more accessible and therefore programmed a browser friendly version in JavaScript using Three.js Simulation

Each termite simulation consists of a 2D environment with termites and woodchips that are randomly placed at the beginning of the simulation. The termites follow a basic set of rules that are outlined below. A woodchip can be picked up and dropped off by a termite upon collision.
Termite rules
  • Each turn move one square in a random direction i.e. north, south, east or west
  • If a woodchip is in the way, then pick it up
  • If a woodchip or another termite is in the way and are already holding a woodchip, drop it