Soccer World

by Jonathan Brophy

Description

A soccer world (written in C++ / GLUT / OpenGL) with geometric shapes, animations, textures, and collision detection.

Features

Hierarchical Models and Animation

There are number of simple hierarchical models in this Soccer World including the players, the crowds, the olympic rings, and the clouds.

Texture Mapping

There are a couple texture maps in this Soccer World. The first is the ground, it is made up of a number of tiles. Each tile is a rectangular box with the top of this box textured with a grass bitmap. This was done to achieve better looking grass for the whole field with better resolution.

The second texture mappings are the soccer balls. Both soccer balls are textured with the same soccer ball bitmap, but one is alpha mapped. I alpha mapped the ball to discard all fragments that had the color white, giving the ball a transparent look and feel.

Collision Detection

The only interaction is with the ball, when you get close enough to the white ball, it gets "kicked" and moves in the direction you kicked it with animations.

Also, when the user kicks the white soccer ball through the goal first visible when the Soccer World is created, then the score changes to cal poly being in the lead 1-0 and beating UCSB.

Texture Mapping

Download

Warning: code is not at all guarenteed to be clean, in any sense of the word, and will only build (as is) on OS X.
Source

References

Spherical Texture Mapping: