Project 2


Desktop Stampede


In this project you will implement Craig Reynold's Boids.

The setting for this project is a desktop - the literal kind, not the computer kind. The desk should have several objects on it (computer, books, coffee cups, pop cans, pens, stapler, that sort of thing) to act as obstacles. Maybe its a desk in the present ... maybe its Sam Spade's desk from the Maltese Falcon, maybe its a desk in the future. A large group of creatures (paperclips? pushpins? bottlecaps? marbles?) that start out in a tipped over mug at one end of the table make a break for the other end of the table moving along the table surface avoiding all the objects inbetween.

The layout of the objects on the table, and the initial number of boids, and the rate at which the boids leave the tipped over mug is defined by an external text file. You will probably also want to have another text file where you can modify the behaviour of the boids without requiring a recompile.

The boids should continue to stream out of the mug while the application runs.

You should think about a story. What is the motivation of the boids? What is their goal? Are there any predators on the table? What happens when the boids get to the end of the desk? Falling into the trash can seems a litle anti-climatic

You can be creative in the type of desk and the objects on the desk.

The boids should be animated as they move (e.g. a marble should roll, a paperclip might sway back and forth as it 'walks, etc.) This animation doesnt need to be complicated but it can add a lot to the realism of the characters. It should also be very obvious when one of these creatures turns - ie a featureless blue ball is not a valid boid.

Unlike the first project where the endproduct was a movie, this project is an interactive application. The camera can move/rotate around the scene and zoom in and out. You may even want to have a camera that can follow a boid through the 3D scene.

The user should be able to grab and move some (all) of the items on the table - eg pick up a can and place it somewhere else, and the boids should react appropriately. This way the user does not directly affect the motion of the creatures, but does affect them indirectly.

In past classes the most common thing that students would fail to do correctly was to get the boids to turn and move smoothly, so I want to be clear that smooth movement, turning, and collision avoidance are very important.

The environment you use to implement this is up to you: OpenGL, Electro, Dark Basic, Java3D, Orge, etc are all valid. your code should be runnable somewhere in EVL or on the 2nd floor of SEL. You must write your own boid code based on Craig Reynolds code though, you cant use any built-in boid code, but given how simple the algorithms are I don't think this should take you very long. It will take you a while to figure out how to balance the various parameters, and you may want to add in some new parameters.

You should probably create a set of debugging controls that can be used interactively while the application is running to start/stop the boids from entering the space, control their various parameters, show sensor regions, etc. These can make your presentation to the class much more interesting and makes debugging the flocking constants much easier.


As with Project 1 you should create a web page. The web page should include several screen shots showing what your desktop world looks like, and it should describe what you did in the project. The web page should also link to your surce code, instructions for compiling and running, and an executable that can be downloaded and run. You should then send email to andy giving the location of your web page, along with a small 320x240 snapshot of your work to be included on the course web page.

You may also want to create a small screen-captured movie of your application running to add to your webpage.

In general the grading will be:
C - boids flock and avoid objects on the desktop, setup defined by text file.
B - smooth motion, ability to interactively manipulate at least one tabletop obstacle.
A - smooth motion, smooth turning, nice theme, nice models, interactive control over parameters within application.


Each person will give a short 10 minute presentation on what he/she did in their project (most likely making use of the web pages that you created) and get feedback from the rest of the class. Be prepared to show your application, and discuss why you did what you did and how you did what you did.


last revision 2/6/08