Войти
  • 241Просмотров
  • 1 месяц назадОпубликованоThe Pathfinders Codex

Interactive Boids Simulation with Compute Shaders in Godot 2D (open source)

Exploratory Programming series - Boids Flocking Simulation in Godot Source Code is available on GitHub - Run and modify the Godot project yourself to try it out! Learning new stuff is fun! Here's the compute shader walkthru that shows the inner workings of a 2D Boids simulator in Godot. We're using a GLSL Compute Shader and 3 force rules (Separation, Alignment, and Cohesion) to create natural looking emergent behaviors. Witness agents flocking, swarming, and schooling in real-ish-time as we try different configurations and create some artistic visuals and procedural behaviors. 00:00 Intro 00:54 What are Boids? 01:44 Godot Pipeline 02:59 GLSL Compute Shader 04:18 Boids Forces 05:36 Moving the Boids 07:58 Drawing the Boids 09:21 Conclusion