Name of Project:
Engine used:
Created by:

Boids Demo
QGF2D (extension of SFML)
Khanh Dat Ho


Source code: Boids Demo

Boids Demo was created as part of a presentation for AI Programming.

I decided to pick Boids as my topic, simulating animal flocking behaviour (eg. birds, fish, flies) with QGF2D as framework and the following website as basis for my code:

My demo was able to show 1000 boids in 2D space. There are also variables to control the separation distance, the velocity of all the boids and whether the boids should follow the mouse cursor (red dot) or avoid it. Additionally the boids would become more transparent until the mouse cursor comes in contact with the boids, making it visually nice.

  • Boids (flocking behaviour)
  • Basic AI
  • 2D vector maths
online portfolio