Berger de Poissons
Herd a school of fish to shelter while the sharks close in
A small arcade game built on a real boids simulation (alignment, cohesion, separation). Hold the mouse button to charge an attractor that pulls the school in and sets it swirling, press Space to fire a shockwave, and push 15 fish into the green zone within 60 seconds while a shark chases the nearest one. There are also 9 bonus and penalty tokens (reversed attraction, +10 s, a new predator…), four difficulty levels and a debug mode that draws each fish's perception radius.
What shines
- Real-time boids simulation: each fish reacts to its neighbors within an 80 px radius
- Charging attractor: the longer you hold the click, the larger its radius and pull, with a tangential component that makes the school swirl
- Predator sharks that target the nearest fish, across 4 difficulty levels (0 to 3 sharks)
- 9 bonus/penalty tokens with durations, cooldowns, badges and an event log
- Debug mode (D key) that shows perception circles, velocity vectors and the shark's target
How to use it
Hold the click to attract the school, Space to push it away, click the tokens; 1-4 sets difficulty, D toggles debug, R restarts
Made with
- p5.js 1.9.3 (CDN)
- JavaScript
- HTML/CSS