Downhill Race is a fluffy racing game by Carina Pratsch and Philipp Erler. Up to 4 players in split-screen steer sheep through a rural area into the goal.
This game is completely free and open source. It is run by a self-made game engine on OpenGl 3.3 with shadowmapping and volume rendering. We created this game during the computer graphics exercise of our studies at the TU Wien.
How to Start
Edit the “start.bat” to set your resolution, monitor refresh rate, full-screen state, and number of players (1-4). Then double click the “start.bat”.
How to Play
All players can use XInput game controllers. Accelerate and break with the triggers. Steer with the left stick.
The keyboard controls are: WASD (player 1), arrow keys (player 2), IJKL (player 3), and NUM8456 (player 4).
About our Task
For the computer graphics (worth 6 ECTS = 150 working hours) exercise we had to create a game with 3D graphics and 3D gameplay from scratch. “From scratch” means that we were allowed to use e.g. a library to load images into the memory but we had to load it onto the graphics memory on our own. This how we started creating a 3D game with an own engine.
We used GLM for the vector and matrix math, OpenGl with GLEW for the graphics, GLFW for input handling and window, Bullet Physics for collision detection and “driving” physics, and SDL 2 to play the music.
The input axes, forward-backward and left-right, are multiplied with the vectors from the camera to the sheep or a perpendicular sidewards vector (both with y-component = 0). These vectors are then multiplied with forces and applied to the sheep’s center of mass. A torque is applied to the sheep, which turns it to the direction of its velocity vector.
The camera follows the sheep with some distance. Its movement is slightly damped.
We have simple Phong shading and shadow mapping applied to all surfaces. The wool of the sheep is rendered with a slicing approach as described in the GPU Gems Chapter 39, including shadowing. The dust clouds are made with billboard particles.
- Programming: Philipp Erler, Carina Pratsch
- Modelling: Carina Pratsch
- Music: This game uses the following sound from freesound.org:
animals_sheep_bleating_many_001.wav by soundscalpel.com, used under CC BY / Record chopped into smaller pieces, thanks to Harald
- Textures, Models, Libraries: see license.txt in downloads