This game was originally written for my major assignment in Real-Time Rendering and 3D Games Programming subject. However, it has been changed to accommodate more features; such as being able to choose the formation of each team.
The game was inspired in a popular game in Brazil called Button Football.

(Original link)
The game was written in C using OpenGL, SDL and ODE.
Downloadables
Screenshots
(click to enlarge)
Game Objectives
This is a 2 player game where the player who scores three goals first wins.
Each player has two turns to shoot, being able to control the ball orientation and the force.
Usage
Pre-requisites
Before compiling you must have the libraries for OpenGL, SDL and ODE.
Compiling and Running
- Compile using the Makefile provided by typing “make”. It should produce an executable called “football”
- Run “football” by typing ./football
Commands
Key |
Action |
| Escape | Menu |
| F | Displays frame rate |
| Arrows | Ball orientation |
| Spacebar | Force |
| Left mouse button + mouse movement | Moves camera |
| Mouse movement | Tilt camera |
Functionalities
Gameplay
Ball orientation: Player can see where to shoot using the small ball that moves with the force and orientation. The small ball changes colour according to player’s turn; blue for player 1 and green for player 2.
Ball contact: The ball bounces off walls and objects when it hits them.
Out of Bounds: When the ball goes out of bounds it is brought back to the position where it was shot.
Goals: A goal is counted only when the whole ball enters the goal.
Physics
ODE: The ODE Physics Engine was used for all the physics in the game. The engine is responsible for all the friction and collision detection in the game.
User Interface
Formation: Each player can choose the formation before each game.
Camera: User can walk and tilt camera to change view.
Other features
Load formation: The team formation is loaded from file; thus it is configurable.
Texturing: The walls and the sky have textures; coordinates are generated automatically because it is a sphere.
The scoreboard and menus are switched to ortho2d mode before creation. So they won’t rotate with the rest of the objects.
Ball movement: The ball is moved in real time from position retrieved from the ODE Engine.
Lights and smooth shading: All objects that are not textured have lighting and smooth shading.
Nice work!!!!:)
Thank you :)