This program was an assignment for Programming for Digital Media. The objective of the assignment was to make several autonomous characters on the screen that used some of the Boids flocking behaviors and obstacle avoidance. In this demo, the steering of the characters is governed by some vector math (dot products etc.).
For the characters, I chose to use Pac-Man and the blue ghosts that he can eat. There are three Pac-Man characters, several hundred ghosts, and some cherry obstacles that all of the characters avoid.
An example of a flocking behavior would be how the Pac-Man characters use separation so that they don’t bump into each other. This behavior creates the effect of having the hungry Pac-Men characters competing with each other for food. On the other hand, the ghosts do not use separation. This creates the effect of having swarms of ghosts that look like schools of fish.
The other thing that is different about this program is that the characters are all generated using bitmap images instead of vectors. Instead of rasterizing vector drawings, the program creates a sprite sheet for each character to quickly copy over the images to a bitmap that is drawn to the screen.
