CSC 471 Final Project - 3D Foos Ball

by George Polivka


Introduction

I came up with the idea for a virtual foosball game when drinking at a friends house. The demo can take anywhere from a couple seconds to minutes due to the randomness of the ball movement. The ball is not influenced by the movement of the players, but instead on a random path generating algorithm. The players do only rotate when near in proximity to the ball. A goal is made when the ball reaches past one of the teams goalie, "hitting" the small area of space where a normal sized foos goal would be. I could see this becoming an interesting game if the bar movements were mapped to the keyboard for one player and the ball was detected by the players hitting them.

Graphics techniques

This project dealt with two major graphics principles, texture mapping and lighting. I texture mapped the floor, walls, ceiling and parts of the foos table on top of a white flat material for proper lighting. I then used brass and chrome for the handles and the metal bar the players rest on. I did not load any mesh files, instead I drew almost fifty different polygons for each part of the room and table. I had a white light in an upper corner of the room which illuminated my materials.


Figure 1: The Default Camera Position.

 

User Guide

Commands and functions:
To zoom out, pause the game 'p' then use 'a' to zoom
To zoom in, pause the game 'p' then use 's' to zoom
To pause and un-pause press 'p'
To quit press the 'q' key
Mouse functionality:
To view the scene to rotate or zoom, pause the game and use mouse drags the rotate the camera around the center of the ball.

 

Screenshots



Figure 2: After the match starts, the camera tracks the ball movement.




Figure 3:When the camera moves below the floor or behind walls,
they disappear so that the sceen is not blocked.




Known issues

The players rotation is a little glitchy. It would be nice to have move collision detection with players and a physics engine to calculate ball collisions.