ScratchData LogoScratchData
Back to iaobardar's profile

Flocking Boids

IAiaobardar•Created February 22, 2022
Flocking Boids
46
37
642 views
View on Scratch

Instructions

Use the mouse to add boids. Use Turbowarp or my optimized version for faster evaluation and more boids: https://scratch.mit.edu/projects/649415364/ The "boids" try to go to the middle of their neighbors and match their velocities, but also keep some distance between them. Tune the parameters to scale each of these biases. The center is calculated as the average, the alignment velocity is a weighted average, and the avoidance accel is a weighted sum, both weighted based on 1/(dist^2 + 1). (I would use a weighted average for the center, but it didn't work that well.) I was inspired to finally make this by a bunch of other boid projects I saw recently. But what I really wanted to do was make the spatial hashing version, so this was the first step. https://people.ece.cornell.edu/land/courses/ece4760/labs/s2021/Boids/Boids.html https://youtu.be/bqtqltqcQhw

Project Details

Project ID648774624
CreatedFebruary 22, 2022
Last ModifiedApril 30, 2022
SharedFebruary 23, 2022
Visibilityvisible
CommentsAllowed