This is the code for the first project for the Computer Graphics course at the University Of Bologna. The goal was to make an interactable 2D scene in OpenGL. I decided to make a clone of the mobile game "DoodleJump", which is the perfect example of a simple yet fun game.
Some of the features of the original are missing (such as enemies and springs) due to time and complexity constraints.
This branch represents the Linux version of the code (which is essentially the same aside from some minor tweaks and the compilation method). You can check the Windows version of the code here.
To compile and run in Linux, simply use the following commands:
cd doodleJumpGL
make && ./DoodleJumpGL
and that's pretty much it.
This project uses the following libraries:
- freeGLUT - an implementation of GLUT
- GLEW
- glm - the openGL math library
Both can be easily downloaded with pacman
or apt-get
.
The project also uses two additional libraries: json.hpp
and gltext.h
, which are both included in the project.
You simply press a
to go left and d
to go right. The goal is to reach the highest point possible. If you die, you can simply press r
to restart (as prompted).
Here are some of the known issues with this version, which hopefully will get fixed in the next version:
- The game does NOT recognize capital 'A', 'D' or 'R' as input. Check if Caps Lock is enabled.
- The collisions with the platforms are a bit wonky.
- Some of the Hermite meshes are slightly broken.
- The code a bit rough, and could use some refactoring.
The game features a debug mode, which shows the main character's colliders, as well as additional info on the game on the stdout.
Also, there's a special Mesh for the character made with an Hermite curve, which is disabled by default.
Both of these features can be enabled by modifying their respective macros in Definitions.h
.
A normal gameplay session.
The special character mesh. It's disabled by default 'cause I like the first one better.