Skip to content
A simple game implemented with OpenGL.
C++ Objective-C Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Documents
Executable Add 《Installation instructions》, and the Executable files Jun 19, 2017
OpenglGame
ResultScreenshots
.gitignore
OpenglGame.sln
README.md

README.md

OpenglGame

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!

1. Introduction

1.1 Result

  • Play

    Image text

  • First-Person-Perspective of the scene

    Image text

  • Third-Person-Perspective of the scene

    Image text

1.2 Control

  • W/A/S/D on keyboard to move.
  • Space on keyboard to jump.
  • Click the left button of mouse and drag for perspective roaming.

2. Coding Environment & 3rd Party Library

  • Win10(x86) + VS2015
  • C++
  • freeglut
  • GLEW
  • Assimp
  • DevIL
  • SOIL

3. Functionalities

  • 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

4. Additional Features' Detail

  1. 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)

  2. Gravity simulation & Collision detection: see the code explanation in Chinese version: http://blog.csdn.net/qq_33000225/article/details/72861956

    Image text

  3. Stencil Test: We use Stencil Test to draw the edge of the bread.

    Image text

  4. 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.

  5. Complex Texture: We use bumpmap here to make the boxes more stereoscopic.

    Image text

  6. Particle System & Explosion Effect: When the player eats the bread, an explosion effect with several particles will be generate ahead.

    Image text

You can’t perform that action at this time.