My 4th year Computer Graphics course had a few assignments. The third assignment asked us to develop a game using the OpenGL graphics library and DevIL image library. The result was my group developed a Go board game.
This project was last tested on Ubuntu. The instructions for setting up can be seen below:
This project assumes you're building on Windows Subsystem Linux 2. The instructions for installing can be found here. Moreover, to run the binary, you'll need a remote desktop connection. The instructions for setting that up can be found here. With this done, you should be ready to set up the needed environment.
# install dependencies
sudo apt install apt-file
sudo apt-file update
sudo apt install mesa-common-dev libglu1-mesa-dev freeglut3-dev\ # OpenGL libs
libdevil1c2 libdevil-dev # DevIL libs
# clone the repository
git clone https://github.com/robert-7/Go-Board-Game.git && cd Go-Board-Game
Building requires the OpenGL and DevIL libraries imported. -lstdc++
was
added to resolve this issue
and -lm
was added to resolve this issue.
gcc -o main main.cpp -lGL -lGLU -lglut -lIL -lILU -lILUT -lstdc++ -lm
./main
Below are the keyboard explanations:
1 : Toggle specularity
3 : Toggle wireframe
5 : Toggle depth testing
6 : Toggle culling (try disabling both depth testing and culling)
7 : Toggle between smooth and flat shading
8 : Toggle texture
o,O : Toggle teapot rotation along the y-axis
p,P : Toggle teapot rotation along the x-axis
r,R : Activate "reset board option"
y,Y : Confirm "reset board option"
n,N : Cancel "reset board option"
v,V : Set color to white (This makes testing a bit faster)
b,B : Set color to black (This makes testing a bit faster)
wasd : Move a piece around the board
enter : Place a piece on the board
ON RIGHT-CLICK AND HOLD MOUSE:
* slide left : move camera left
* slide right : move camera right
* slide up : zoom camera in
* slide down : zoom camera out