In this chapter, we learned how to implement the player character, platforms, and collectible items in conjunction with a basic yet functional physics simulation and collision detection code. Nonetheless, it should be mentioned that the physics simulation as well as the collision detection code both have their limitations. However, as long as our original requirements of the game do not change, we will be just fine.
Furthermore, we have completed the level loader and discussed how jumps for our player character work. Two conditions for losing extra lives and reaching game over have been added. The camera's position has been constrained in a way that it will never follow the player character below the height of the water. Finally, we have added a GAME OVER text message so that the player receives a visual feedback that all lives have been used up. The feather power-up also gives a visual feedback when collected and active by displaying a feather icon with a nice little countdown timer...