A simple 2D Boids demo using OpenGL.
This demo implements a 2D boids simulation, with the inclusion of nests that the boids get attracted to. There are clouds that pan from left to right at different speeds.
There are zoom controls and tracking controls for tracking either a boid (with t) or a nest (with y). There are also 3 slider controls that control parameters of the simulation, controlled with [, ], ;, ', ,, and .. You can toggle a mode to attract nearby boids with your mouse by clicking.
- Windows with Visual Studio (MSVC) or MSBuild.
- GPU/drivers supporting OpenGL. (Project includes GLAD/GLFW/GLM headers in the repo.)
- Recommended: open the solution in Visual Studio
- Open Project.sln in Visual Studio.
- Select Platform = x64 (if needed) and Configuration = Debug or Release.
- Build -> Build Solution.
- Command line (MSBuild)
msbuild Project.sln /p:Configuration=Release /p:Platform=x64- From Visual Studio: Start Debugging / Start Without Debugging
- From command line: run the built executable (example paths below — adjust for Debug/Release)
cd x64/Release
Project.exe