Home▸Animals & Their World▸Butterfly Migration Flock (2D)

Butterfly Migration Flock (2D)

A top-down boids simulation of a monarch butterfly swarm: separation, alignment and cohesion rules drive the flock toward a drifting migration target, or click the sky to redirect it yourself.

Animals & Their World2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-butterfly-migration ↗ Open standalone

This top-down companion runs the exact same boids algorithm as the 3D butterfly migration scene — separation, alignment and cohesion forces between neighboring butterflies, layered with a steering force toward a shared migration target. The target drifts along a slow looping path by default, or you can click anywhere on the map to redirect the whole flock manually. Population, flock speed and wing-color palette all carry over as controls, letting you compare how flock size and cohesion strength change the emergent movement of the swarm.

⚙ Under the hood

A top-down boids simulation of a butterfly swarm: separation, alignment and cohesion between neighbors drive the flock toward a migration target that drifts on its own or can be redirected by clicking the map.

butterflyboidsflockingmigrationseparation alignment cohesionswarm behavior

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)