Skip to content

This was a project done for Computer Graphics course (2017) at Faculty of Mathematics, University of Belgrade in Serbia. Programming language used is C, with OpenGL graphics library. It was done in about 5 days and contains ~1.500 lines of code.

Notifications You must be signed in to change notification settings

ajvazz/All-Quiet-on-the-Western-Front

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

All-Quiet-on-the-Western-Front

This was a project done for Computer Graphics (2017) course at Faculty of Mathematics, University of Belgrade, Serbia.

It is a simple two-player game implemented in C using OpenGL.

The idea is to deal more damage to the opponent, which can be done by using the indicator at the bottom of the screen. There are three levels of damage that can be inflicted:

  • low - either side of red part of the bar
  • medium - greenish/reddish
  • high - center of green

Requirements

  • OpenGL - graphics rendering API used for this project
  • gcc - compiler system used for this project. Others may work as well.
  • make - build automation tool

To install OpenGL, run in terminal:

sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev

To install gcc and make, run:

sudo apt-get install build-essential

Setting up

You can clone this project by copying its url, opening up your terminal and using it with git clone <url> command. Or just execute this command: git clone https://github.com/ajvazz/All-Quiet-on-the-Western-Front.git.

Then, navigate to newly created folder, and run make: make or make mainProgram to compile all files needed for the game itself, and then: make mainMenu to compile main menu program.

Then, type ./mainMenu to start the game!

Preview

Game Instructions

When you start the game, main menu presents options to the user to start or exit the game. Upon clicking ENTER, the game is started. When it is opened, you are required to click ENTER, G or g to initialize the game!

The idea is to win in a gun duel between two weird, faceless cowboys in a town that is apparently to small for both of them. That can be done by dealing more damage to the opponent, using pinpoint precision and good timing. The more cowboys are closer to death, the more chaotic will the indicator move.

Controls

Button Action
ENTER start
ESCAPE exit
G or g initialize animations
SPACE fire

Known Bugs

After one player has finished his turn, the other player should wait for the opponent to put the gun down, then raise his. This process is automatic, but only when the indicator stars moving again should the next cowboy shoot. If not, the animation may be partly broken and the player won't be able to take his turn, thus making the game unplayable.

Fortunately, this stupid bug occurs sometimes, even if the player (more often than not) intentionally wants to break the game.

ENJOY!

About

This was a project done for Computer Graphics course (2017) at Faculty of Mathematics, University of Belgrade in Serbia. Programming language used is C, with OpenGL graphics library. It was done in about 5 days and contains ~1.500 lines of code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published