VRML Boids and 3D Noughts and Crosses

[back]

This is a project to create an interesting virtual reality simulation in VRML. It is a 3rd year coursework project which was the assessed work of a module I took about virtual reality. My simulation contains flocking creatures moving around and inside a house, which also contains a game of 3D Noughts and Crosses which you can play against the AI I made in Prolog (although here it is implemented in Javascript). The flocking creatures will also intermittently decide to make a random move on the 3D Noughts and Crosses board, and the only way to stop them doing this is to click on them which stops them moving. Note that the AI treats the creatures' moves the same as ones made by the player, and this may make the game considerably easier until the creatures are stopped.

The boids work with a combination of a steering algorithm and a simple map of the house composed of nodes at the doors and in certain places in the rooms. Each of the creatures is at a specific node in the map, and will move with attraction to that node as well as the normal boids steering behaviour. At any time it may choose to move to another node that is adjacent to its current one. This does mean the creatures do not have awareness of obstacles in the world, and may rarely go through walls if their steering behaviours cause this to occur. This could be fixed with obstacle avoidance, but the javascript implementation might not be efficient enough to allow the calculations required for this.

Boids house image

The Simulation

You will need to install the BS Contact VRML viewer before you can run the simulation. It can be found here, where you should download the latest version of BS Contact. You will need to give a name and email to download the player. Once you have this installed, click here to run the simulation (it appears certain internet browsers have problems with this, you may need to open it more than once to make it display properly or use a different browser). If that version runs slowly on your computer this version with fewer boids should work better. Alternatively, you can download a zipped version of the simulation here to run in the BS Contact player. Open Project.wrl to start the simulation. This includes all source code. Contact me for permission before modifying, copying or using it in any way other than running it or looking at it.