Boids on Swift with SceneKit

What are boids? according to wikipedia:

Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behaviour of birds.

That’s enough to give us an idea, but why would you need Boids? basically it all comes down to the difficulty of animating flocks. A brute force approach is to animate each member individually, a process that is both tedious and time consuming. However instead of animating each member, we can set up a few rules and let them animate themselves.

If you’re interested in implementing your own I suggest reading this article by Conrad Parker and Craig Reynolds 1986 paper

When I first came across of Boids, I thought it was going to be a complex system of interactions and complicated geometric calculations. This is not true. Boids are in fact simple to understand and easy to implement.

Using Swift and SceneKit I was able to implement a simple Boids simulation

You can see the repo here Swift-Boids


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s