Assignment 1

A Simple Side-Scrolling XLib game

Due January 25th @ 11:59pm

For this assignment, your task is to create a type of game called a side-scrolling game using the XLib API.  The program should be written in C or C++ (your choice).

Basic Spec:

With apologies for the war-like nature of the game, a helicopter pilot must fly over buildings and eliminate missile emplacements by dropping bombs.  The game should scroll from right to left at variable speeds.  Bombs should drop on an angle from the helicopter, preserving inertia.  If the pilot wishes to drop a bomb straight down, the pilot should eliminate forward momentum by moving backward as the bomb is dropped, something that is necessary to hit the second and fourth missile towers the helicopter pilot encounters in the screenshot on the right.  The pilot should be able to fly up and down and forward and backward independent of scrolling, as is typical in side-scrolling games.

The keyboard should be used to control the position of the chopper and bomb release.

In addition to the requirements described above, the program must also:

1.       Handle window resizing events (by scaling everything up in size). Note that window resizing is only necessary before game-play starts (and possibly during pauses between levels is that is an enhancement developed for the game).

2.       Display a splash screen when your game launches. Also allow the splash screen to be displayed during game play using the “f” or “F” key.  The splash screen should include:

a.       Your name and the last 3 digits of your student ID (to handle name conflicts)

b.      A brief tutorial on game play (this aids graders).

3.       Avoid throttling the CPU, but gameplay should appear reasonably smooth.  Also, excessive flicker should be dealt with via double buffering.

4.       Allow tuning of the side-scrolling speed within a “grader” mode so that the TAs (who are probably really, really bad at gaming) can have a shot at playing for a reasonable length of time.

Please anonymize game play screens. The TAs may capture video of exceptional games and, time permitting, a subset may be anonymously displayed on the course home page.  The TAs will request permission before posting.

Fulfilling the requirements of the basic spec is sufficient to generate a mark of 75% on assignment 1.

Enhancements

The remaining 25% of assignment 1 is dedicated to enhancements to your game. For example, perhaps the pilot must also fly into buildings, as shown in the second Figure.  Perhaps the pilot can choose to shoot missiles forward as well as drop bombs. Alongside this, the graphics should obviously be enhanced to improve playability:  colour can be added, explosions can be inserted.  Finally, what is a game without some mechanism for keeping score?  Adding some scoring mechanism is an obvious enhancement that can improve the overall playability of the game and promotes “bragging rights” in real world gaming.

Your enhancements should be:

1.       Described in a README.txt file included with your submission.

2.       Accessible via a “grader” mode (also documented in README.txt) which allows the grader to skip forward and assess any of the enhancements such as levels.

Submission

Submit the following to your personal svn repository:

·         Your source files and any additional files to run the game (e.g. external config files, etc. if used).

·         A Makefile that allows the game to be run using the command “make –f run”.

·         A README.txt file that tells the marker what to look for, especially wrt enhancements.

Assessment

·         5%:         Compiles and runs

·         50%:      A working game

·         20%:      Basic game play and tuning

·         25%:      Aesthetics and enhancements

At their discretion, the TAs can provide up to 5 bonus marks to assignments that they record for screen video dissemination.