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!
- W/A/S/D on keyboard to move.
- Space on keyboard to jump.
- Click the left button of mouse and drag for perspective roaming.
- Win10(x86) + VS2015
- C++
- freeglut
- GLEW
- Assimp
- DevIL
- SOIL
-
Basic functionalities
- Camera Roaming
- Texture Mapping
- Simple Lighting
- Sky Box
- Deep Test
- Model Managment
-
Additional features
- Scene switching
- Gravity simulation & Collision detection
- Stencil Test
- Display Text (En/Cn)
- Complex Texture (Bumpmap)
- Particle System & Explosion Effect
-
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.