sweemeng / pygame-boids

Boids implementation in pygame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is my implementation of Boid algorithm.

Boid algorithm is that simulate flocking behavior in birds. It is also well known that the rule for the behavior is reasonably simple.

To run

  • I assume that you have poetry running
  • Install dependency poetry install
  • Run by poetry run python main.py

To play

To see flocking behavior, please click on the pygame window

boids running

Also you can run this on repl.it at https://replit.com/@sweemengng/pygame-boids-1

Source

Explanation is here: https://cs.stanford.edu/people/eroberts/courses/soco/projects/2008-09/modeling-natural-systems/boids.html

Pseudocode I use for reference: https://vergenet.net/~conrad/boids/pseudocode.html

About

Boids implementation in pygame


Languages

Language:Python 100.0%