Text version | Website feedback | Campus Portal | Campus email: Hull / Scarborough

MSc in Games Programming

Simulation and Distributed Programming

 

Assessed coursework 1 of 2 (20%)

Push Football: A Physically-Based Interactive VE/Game

 

Aim

The aim of this assessment is to develop a Virtual Environment for playing Push Football.  The application will model the behaviour of the players (represented by a rectangular block) and a puck (a short cylinder) using Newtonian mechanics and should, as far as possible, allow for a smooth movement of all objects independent of frame rate. 

 

Learning Outcomes

During this assessment you will apply many of the techniques required in generating realistic virtual environments and physically-based games. Formally, this coursework will address the following Learning Outcomes as indicated in the Module description:

 

2. Analyse real world problems and identify appropriate physically-based algorithms for their simulation

4. Implement real world problems, applying techniques from mathematics and physics, for use in virtual environments and computer games

 

A less formal description is that you will gain and understanding and appreciation of:

  • Physically-Based Modelling/Simulation Loop
  • Collision detection/response
  • Friction/Drag and elasticity
  • User interaction
  • Real-time graphics

 

Problem Outline

The problem is to model a game of ‘Push football’, the two player version of the game is played on an enclosed table.  The table in question consists of a rectangular playing with goal at either end.  Across the middle of the field is a central line, dividing the pitch into two.  Each player controls a bat, represented by a rectangular block, which is able to move freely within one half of the pitch. The bat can be move forward/backwards and left/right.  The player should be able to control the velocity of the bat with either with a mouse, keyboard or joystick.  In your simulation you should limit the speed of the bat a maximum value, which is left to you judgement.  Located in each side of the pitch is located a cylindrical post (see figure 1).  The puck can collide with this post, causing a change of direction.

 

In the simplest form of the game, a single puck is placed in one side of the pitch and one player strikes it with his/her bat.  The puck reacts to this collision and it moves with a velocity calculated through the application of Physically-Based Modelling PBM) techniques. When the puck travels into the opponents half of the pitch, he/she  has an opportunity to hit it back.  If the ball collides with a wall then it should bounce off it in a direction again calculated using PBM.

 

The aim of a player is score a ‘goal’ by getting the puck past the opponent and into the goal area.

 

A match will be complete when one player scores five goals.  To increase the difficulty of the game (and the simulation), a player has three ‘bonus balls’ which can be injected into the game at any time.  These pucks should appear in from of the players bats and start with the velocity of the bat.  A player can use the ‘bonus puck’ tactically, for instance, when the opponent is busy fending off the other puck that is in play.  No more than two pucks can be in play at any time.

 

When construction your simulation, you should work in real physical units (eg metric).  You should calculate the collision response between bat and puck using, for instance, momentum equations.  The bat should therefore have mass.

 

Objectives

You should include the following in your environment:

  1. A 3D OpenGL representation of the pitch.
  2. An underlying PBM simulation of the puck(s) with elastic collisions and drag.
  3. Collision detection.
  4. Multiple camera positions (looking down on the pitch, puck views looking along the velocity vector and player view
  5. Goal detection and scoring (but not necessarily displayed in the OpenGL window).
  6. User interaction.  The details of this are left to you to decide.  However one approach is to use the mouse to control the bat (up/down pushes the bat in and out, left/right moves the bat left/right). 
  7. The implementation of an opponent.  This should be computer controlled and designed to enhance game play.
  8. Extra Items:  these include sound, on-screen scoring, puck spin.

 

 

Suggested Approach

This is a reasonably large and complex problem, which will require some careful planning.  You should take care to plan your work before coding, producing a detailed design of your system.  You may also decide to implement the graphics first and then integrate the code for producing interaction and physical simulation.  DO NOT LEAVE EVERYTHING TO THE LAST MOMENT.  Use the forum for this module to ask question and discuss problems with the lecturer (Derek Wills) and other students.

 

Deliverables

You will be required to produce a short report (no more than five pages) containing the following:

  • A list of implemented features (1 page)
  • Theory used (pay special attention to how you have implemented the physical simulation loop, collision detection and collision response (2 pages)
  • Outline Design (1 page)
  • Conclusions and user guide (1 page)

 

Section lengths are for guidance only.

 

You will be required to electronically submit documentation, source code and an executable in a zip file.  It is your responsibility to ensure that all file are included and that the program will compiler using Microsoft Visual Studio C++ V7.  You will also be required to give a short demonstration of the software in a laboratory session.

 

Tools

You should use Microsoft Visual Studio C++ V7 to produce you code.  The graphics should be in OpenGL and should run under Microsoft Windows.

 

Marking Scheme

 

This is a summary of how marks will be allocated.

 

Task

%

Learning Outcome

Graphics representation, user interaction (1,4,6)

10

4

PBM Model (drag, elasticity etc)(2)

50

2,4

Collision detection(3)

15

2,4

Goal detection and scoring (5)

5

4

Implementation of the opponent (7)

5

4

Extra Items (8), overall impression

10

2,4

Documentation

5

2,4

 

 

Deadlines

All work should be completed and submitted via email to d.p.wills@dcs.hull.ac.uk by Monday 9.30am on 17 March 2003.  If you zip file is too large for email, then please contact me to discuss an alternative submission method.