Soccer Shootout
Josh Dean
csc 471
Winter 2007

Introduction

For my final project, I created a soccer shootout.  Soccer shootouts are always exiting and fun to watch and even more gut-wrenching to participate in.  I played soccer through high school, and I was involved in numerous shootouts both as a goalkeeper and as a shooter.  These shootouts were exhilarating and the goal of this project was to try and bring this excitement to the computer screen.

The executable can be found here.

Controls

You can press 'h' during the game to print the help screen to see the keyboard shortcuts.  Here are the keyboard shotrcuts:

   'w'- zoom in
   's'- zoom out
   'a'- strafe left
   'd'- strafe right
   '1' - change camera to shooter view
   '2' - change camera to goalie view
   '3' - change camera to angled sky view
   '4' - change camera to sky view
   '5' - change camera to goalie sky view
   'q' or 'Q' - Quit Application;
   'r' or 'R' - Reset shooter and goalie. Push r to start over.
   ' ' (space bar) - Control the shooter.  Select Power and horizontal and vertical directinos
   'h' - Print help menu

Game Play

The goal of the game is to score five goals before you miss five goals.  You can miss a goal due to the following: shooting wide or over the goal, hitting the post, or by the keeper making a save.  The user doesn't control the goalie, he can only control the shooter.  The user can control the speed and the horizontal and vertical directions of a shot.  The user selects these by pressing the space bar.  The user first selects the power of the shot by pressing space bar while the power meter is oscillating.  The power meter changes color from green to red as the meter gets more powerful.  Figure 1 shows what the power meter looks like.

Power Meter

Figure 1: Power Meter

The more powerful the shot he selected (the more boxes on the screen) the faster the shot will be.  Because the shot is faster, it will be more difficult to shoot accurately.  Once the user has selected a power level, the directional arrow appears on the screen.  The arrow starts oscillating left and right.  The more powerful the shot, the faster the arrow will be oscillating, thus making it more difficult to shoot accurately.  The user selects the horizontal direction by pressing the space bar.  After the horizontal direction is chosen,  the user needs to select a vertical direction.  The same logic applies for the vertical direction as with the horizontal direction.  Figure 2 shows the directional arrow (Note: The power meter is more green, meaning the shot is less powerful than figure 1).

Directional Arrow

Figure 2: Directional Arrow

After the user selects the vertical direction, the ball is shot with the speed and direction selected by the user.  The goalie then reacts and dives towards the ball.  I calculate where the ball will cross the goal line and rotate and translate the goalie towards that position.  Depending on the speed and placement of the shot, the goalie will make the save.  Scoring a goal isn't easy and the AI for this isn't the greatest.  But, you can score a goal with all power levels.  Each power level has a placement that works well. (i.e. with a really slow shot, aim high and in the corner)  I won't give away all the secrets..  Figure 3 shows the ball in flight and the goalie diving towards the ball.

Goalie Dive

Figure 3: Shot in motion with goalie diving

There is collision detection for each of the nets, the posts, the goalie, and behind the goal.  A message is printed to the console telling the user the result of his shot.  It also prints out the user's statistics.  Figure 4 shows the output given to the user.

Output

Figure 4: Output to console

There are also different camera that you can use.  One of them is a skybox view from behind the goal.  Figure 5 shows the view from here.

Birdseye Goalie

Figure 5: Skybox View Behind Goal