The function's documentation includes a detailed description of the algorithm employed. The basic approach of the algorithm is to generate a sphere around a ship, and check if the point on that sphere which is at the most acute angle to the camera is within the frustum's bounds. Given our current bullet speed and maximum ship speed, however, this condition should never occur. It keeps the game information, such as the score, ship location, enemy location, remaining ships, and current game mode. In addition, it also displays the the keymap according to the current mode.
Explosion is implemented by texturing mapping a square with a sequence of animated explosion images.
The alpha value of the background are altered so that only the explosion part of the image can be seen. The original idea was to have a game where you could control a fleet completely from the squad control level. However, when we realized the difficulties with interface, we decided to go with direct control of one ship in order to keep things simple. Squad control ideas were kept, though. As for ship movement, this was basically modelled on what I thought real physics in space should be.