Tradeoffs made during the course of development:
- -Initial scope of project had to be limited to make finishing feasible to some degree
- -Sacrificed Blitz terrain features because of our choice to use tokamak
- -Because the game was stereo, we didn’t add all the information we wanted, i.e. Data about features of Mars that the users are exploring
Software Design:
- The game is based on finite state machines.
- We excersized great discipline when introducing new code to the main branch in that we were sure to always design with the state machine in mind. The only part of the game that we did break down our stateliness was in the terrain loading segments. Our "Load,Update,Close,Idle" state framework turned out to be one of the biggest successes of the project as it really gave us the flexibility we needed as we kept refiguring the process of handling and creating our content.
- There are a total of 5 major sections to the games mechanics:
- 1. Main:
- States pertaining to the overall application:
- Global APPSTATE%
- Const APP_Startup% = 0
- Const APP_MissionSelect% = 1
- Const APP_FreeRoam% = 2
- Const APP_EscapeFromEndurance% = 4
- Const APP_Exit% = 8
- Const APP_Pause% = 16
- Functions:
- GameProcess( ); -----process the main game loop
- 2. Camera:
- States pertaining to the camera:
- Global CAMSTATE%
- Const CAM_Intro% = 0
- Const CAM_FPS% = 1
- Const CAM_Chase% = 2
- Const CAM_WayPoint% = 4
- Const CAM_Static% = 8
- Const CAM_Loading% = 16
- Functions:
- InitCamera( ); -----initialize the camera.
- SetCameraLookat(target); -----take parameter “target” and set the camera position.
- UpdateCamera( ); -----update the current camera depend on the target state.
- Update_chase_camera(speed); -----a chase camera that speed is counterintuitive, but smaller is faster.
- Update_fps_camera( ); -----FPS style controls (for debugging the scene viewing).
- 3. Scene1_FreeRoam:
- States specific to the free roam mission.
- Const FREESTATE%
- Const FREE_Idle% = 0
- Const FREE_Init% = 1
- Const FREE_Close% = 2
- Const FREE_Run% = 4
- Const FREE_Reset% = 8
- Functions:
- Scene1( ); -----determine current state
- InitScene1( ); -----create skybox and extra camera setup
- ResetScene1( ); -----reset the state as free roam state
- CloseScene1( ); -----close the current free roam state
- RunScene1( ); -----load the roam state and run the rover
- InitFreeRoamTerrain( ); -----setup terrains
- 4. Scene2_EscapeFromEndurance:
- States specific to the Escape mission.
- Global EFESTATE%
- Const EFE_Idle% = 0
- Const EFE_Init% = 1
- Const EFE_Close% = 2
- Const EFE_Run% = 4
- Const EFE_Reset% = 8
- Functions:
- Scene2( ); -----determine current state
- InitScene2( ); -----create skybox and extra camera setup
- ResetScene2( ); -----reset the state as scene2 state
- CloseScene2( ); -----close the current state
- RunScene2( ); -----run scene2 and escape from endurance
- InitEnduranceTerrain( ); -----create and setup visible terrain
- 5.Scene0_MissionSelect:
- States specific to the Mission Select:
- Global MENUSTATE%
- Const MENU_Idle% = 0
- Const MENU_Run% = 1
- Const MENU_Init% = 2
- Const MENU_Close% = 4
- Const MENU_Mission1% = 8
- Const MENU_Mission2% = 16
- Const MENU_Exit% = 32
- Function:
- Scene0( ); ----- determine current state
- InitScene0( ); ----- create skybox and extra camera setup
- CloseScene0( ); -----this function seems pointless at this moment, but in case need it for later version.
- RunScene0( ); -----update the planet and update the scene
- The rover also had a couple of states that determined whether it was actively being affected by the physics engine. This was to prevent it from moving while the user was selecting a waypoint for the rover to travel to.