In the current version of the game, you can steer the rocket, start and stop the additional engine, and move in the game world. In this part, you will create a class used for storing game data, including the level number, the score, and the number of remaining rockets. You will also prepare the logic for loading the level with a given number, as well as increasing the score when the rocket is flying towards the target planet.
An implementation requires to add a few constants, create the
Game class, as well as make some modifications in the
At the beginning, you add some constant values regarding the game:
#define SA3D_NEW_ROCKET_BONUS 100000 #define SA3D_REACH_PLANET_BONUS_BASE 1000 #define ...