I'm using a game engine that uses Javascript as it's programming/scripting language and I'd like to create a very simple 3D flocking (boids) script to move 3D objects within a given area. I've searched the net and read a bunch of articles, and probably because I'm not much of a programmer, most of it is over my head.

Does anyone know of a super simple sample or tutorial that might get me started?

Yes, thank you, I have. I understand the general principles involved, but not the code as I don't know any C. In fact the full extent of my programming is limited to some Javascript and a little HTML, PHP and Python. The engine I'm using (Unity) uses Javascript, so I'm hoping to find something that will help me put together something in that.

GroundKeeper
—
2006-10-10T11:52:49Z —
#4

The general idea is linear algebra. Move you boids towards the center of mass. This can be done by using vector operations which is very affordable in simulation. If the linear algebra is the problem try reading up on it before. Other than that I would recommend to start looking at biods from the mathematical point of view first to not become confused with the indexes of vectors and stuff like that. If you understand the general mathematical principal the implementation is no problem.