Anna Howard
Games Computing Graduate & Programmer/Game Developer
Overview
This project was written in C++ using the opensource Urho3D game engine. The game involves trying to hit as many of the moving marine reptiles as possible by firing a projectile.
The simulated boids are divided into two groups, the plesiosaur group and the ichthyosaur group, which are visually distinguishable. The members of each group only react to other members of their group.
The player can fire a projectile and boids hit by the projectile are destroyed. The player can also fire their projectile at various nautilus shells on the seabed, knocking them away.
The project was also built with server and client functionality to allow for multiplayer within the Urho3D engine.
Reflection
Working with a less thoroughly documented engine to build my first multiplayer game certainly presented challenges. Adjusting to the significant shift in how the game's code had to be structured to work properly in multiplayer required some getting used to. In particular ensuring that all game behaviour was deterministic and that actions were only taken by the host to avoid desync amongst clients was something I struggled with early in development.
Given the experience I gained from the completion of this project, and the experience I have since gained from other projects, I would explore other optimisations for the boids algorithm if I was to recreate this game. I would also want to expand upon the game's mechanics, since as it stands the gameplay is barebones and could be significantly improved.
Design
The boids algorithm implemented featured multiple optimisations to improve performance. The core optimisation is that the game uses spatial partitioning reduce the number of boids each boid checks when updating it's trajectory. Instead of checking every other boid it only checks other boids in its partition.
Another optimisation is that the boids are split into two groups. This optimisation up to halves the number of boids any given boid would have to check.
To further improve performance the collision meshes for the boids were simplified to rectangle. The collision meshes for the other static and dynamic objects were similarly simplified as well. This resulted in a substantial increase in performance, allowing more boids to be simulated within the game.
Urho3D Boids Simulation
A Multiplayer Boids Simulation