pFlock
Started: Dec 2003 .. Updated: Jan 2004 .. Status: Complete.
Description .. News .. Screen Shots .. Downloads
pFlock/0_small.jpg
pFlock/0_small.jpg
Posted: 2005-03-03 02:29:54
Single group flock on a small world. You can see they are all pointing the same way and moving together (well you can imagine the moving bit) and this is the essence of flocking. This is the 2D version (3D version below). Yes those are real time shadows - not because I think this demo needs them, just because my model manager class has the shadow code already so its 2 calls to put them it .... so why not!
pFlock/1_small2.jpg
pFlock/1_small2.jpg
Posted: 2005-03-03 02:29:36
The same as above but with a number of different groups/flocks. pFlock enables you to select the number of groups/flocks in each sim which makes it much more interesting that just having the one flock. The flocks avoid each other and try to stick to their own kind.
pFlock/2_large_RF.jpg
pFlock/2_large_RF.jpg
Posted: 2005-03-03 02:29:11
With the force lines turned on, you can now see which boids are connected, and what they are doing. Connections in bright red are between different groups and push away, while lines in any other colour are internal lines between members of that group and represent the cohesion, seperation and alignment forces that goes with flocking. This screenshot was take directly after a reset so all the boids are jumbled up randomly as they havn't had a chance to find their friends and "flock" yet.
pFlock/4_large_F.jpg
pFlock/4_large_F.jpg
Posted: 2005-03-03 02:28:20
The same simulation as above but some time later when the boids have had time to fly around a bit and find their friends. Here you can clearly see the force lines between groups and internally - this is what drives the simulation.
pFlock/3_large.jpg
pFlock/3_large.jpg
Posted: 2005-03-03 02:27:40
And again without the force lines clutting things up.
pFlock/5_3DRandom.jpg
pFlock/5_3DRandom.jpg
Posted: 2005-03-03 02:27:06
Here is the 3D version. It is exactly the same code but this time with height being used as well. I put in both the 2D and 3D versions because even though originally I thought it would be 3D its hard to watch and see whats happening. The 2D version is much clearer and you can see how the boids move over time. This shot was taken after a reset and so is pretty random.
pFlock/6_3DTogether.jpg
pFlock/6_3DTogether.jpg
Posted: 2005-03-03 02:26:32
Same simulation as above a while later when the boids have flocked a bit. You can really see how much harder it is to figure out whats going on here than in the 2D verion. Even though all teh colours have grouped it doesn't really look like it, hence I think the 2D version is much clearer!
pFlock/7_3DTogetherF.jpg
pFlock/7_3DTogetherF.jpg
Posted: 2005-03-03 02:25:59
The same shot as above but this time with the force lines drawn. This makes it easier to see whats going one because you can see the connections, but still I think the 2D version is clearer. Not that it really matters because pressing 'd' while its running will switch the 'd'imentions from 2D to 3D and back.
pFlock/8_huge.jpg
pFlock/8_huge.jpg
Posted: 2005-03-03 02:25:28
The world size is variable. Ther walls (or in the 2D version the plane) aren't hard limits for the boids, they can be crossed but the more they are the more the boid will be drawn back to the center. As such you can make the world huge and watch the boids drift around then shrink the world and watch them all drift back inside. The simulation gets kind of boaring though with large worlds because they boids never collide which is the only interesting part hahaha