software design
>> .
*

The game is designed to subdivide into logical modules that separately handle each game element. All game object have their own data structures and update routines which are called once every logic update (approx. 30 times per second). There is no AI in the game: aside from the continuous simulation of the solar system, all events occur in response to the user's actions.

The main game loop is an FSM with five states:

The player is also an FSM with five states:

In the final version of the game, the planets and moons will be implemented as FSMs with five states: INIT (load textures and create model), RESET (put all parameters back to their defaults for that planet), ORBIT (revolving around the sun), HELIX (orbiting and drawing helix). The planets also store constant information such as radius, distance, orbital incline, axial tilt, and number of days per solar revolution; and a general update routine checks every planet at each logic update and moves it along in its orbit, handling other related tasks as needed- positioning the target icons and generating helixes, for example.

The two cameras (used for stereo) are parented to a pivot and offset equal distances to either side. The cameras move and respond differently as the player moves between modes. They are usually in first-person, but a simple chase camera implementation was used for the third-person surface mode. Since the behavior of the cameras is completely tied to the state of the player, the camera behavior was incorporated into the player's FSM.