A simple game implemented with OpenGL.
This is a simple game implemented with OpenGL. In the game, the scene is made up of several boxes placed in different height. Besides, there are several breads floating on different places of the boxes. The player, in the first-person-perspective, need to move, jump and look around, to look for the breads and eat them!
Play
First-Person-Perspective of the scene
Third-Person-Perspective of the scene
Basic functionalities
Additional features
Scene switching: When starting the program, we will enter the home page, containing the game rules and a Start button. Clicking the button, and we will enter the main game scene. (You can see the effect from the GIF above)
Gravity simulation & Collision detection: see the code explanation in Chinese version: http://blog.csdn.net/qq_33000225/article/details/72861956
Stencil Test: We use Stencil Test to draw the edge of the bread.
Display Text: We have English and Chinese text on the home page. At the game scene, a string text is placed on the upper left corner of the window to show how many breads the player has eaten. Keeping the text at the fixed position is relavant with the camera roaming.
Complex Texture: We use bumpmap here to make the boxes more stereoscopic.
Particle System & Explosion Effect: When the player eats the bread, an explosion effect with several particles will be generate ahead.