Originally a coursework project of CPT205 Computer Graphics, Xi'an Jiaotong-Liverpool University
A simple and lightweight cross-platform1 C++ 3D game engine based on legacy OpenGL.
- Hierarchical Modelling
- Texture Mapping
- Simple physics engine
- AABB collision detection
- Heightmap Terrain
The Demo project implemented a 3D First-person Shooter (FPS) game. To play this game, build the Demo project and run.
Control | Action |
---|---|
WASD | move around |
Mouse | look around |
Left mouse button | shoot |
Right mouse button | use telescopic sight to aim |
R | reload the magazine |
Sapce | jump |
- freeglut 3.2.2
- glew 2.2.0
You can use vcpkg to install these dependencies. For example:
vcpkg install freeglut:x64-windows-static
vcpkg install glew:x64-windows-static
Use Visual Studio to open LightGameEngine.sln
solution.
A CMakeLists.txt
will be provided in the future.
- The current implementation of collision detection use brute-force algorithms.
- Legacy OpenGL is used per the coursework requirement. Maybe I will rewrite this project using modern OpenGL in the future.
- In release mode, the screen may flicker when the player moves.
Footnotes
-
Currently, most of the engine is cross-platform ready except for PNG texture loading in
Texture.cpp
. If you want to use this engine in Linux or macOS, you will need to modifyTexture.cpp
first. ↩