CS101 Programming Contest:
Breakout on the Web

Announced: Friday, April 25
Entry Deadline: Monday, April 28 at 12:00 noon

Goals and Benefits:

All contestants will...

Before starting:

  1. Be sure that your Lab 9 Breakout game works and make a copy of it in another folder.

  2. Next remove all uses of the Terminal class from your program. Remove the line import cs101.terminal.*; from all of your files. After doing this, make sure the game still works.

  3. Download the CS101 Programming Contest Kit into your cs101 folder by clicking on the "download project" button below. You'll get a BreakoutApplet folder with a few .java files in it. Also, theres a cs101 folder inside that contains the cs101.canvas package classes you'll need.

    [[[Download Contest Kit]]]

  4. Copy the following files from your Lab9 folder into the BreakoutApplet folder you just downloaded: Lab9.java VelocityVector.java Ball.java Wall.java Brick.java BonusBrick.java StubbornBrick.java PassThroughBrick.java

    Do NOT copy the file GameCanvas.java because the one you downloaded is different. You need to use the one you downloaded with the contest kit.

  5. Using the "Edit" option in the "Project" menu of Cafe, add the above files (except Lab9.java) to the BreakoutApplet project.

  6. If you don't already have a home page, you need to create a home page.


Directions:

  1. Open the provided file breakout.html and read it. This hypertext document is set up for loading the applet you will create. There is a space in the file for you list special features of your applet that you want the contest judges to notice. For now, just fill in your name in the appropriate place (XXX). Later, you can come back and list the special features of your applet.

  2. Open the provided file BreakoutApplet.java and read it. You should not need to modify this file. This is the applet that will run the game. It instantiates a Breakout object that you will write using your code from Lab 9.

  3. Open the provided file Breakout.java and read the code and comments. Copying code from your Lab9.java file, fill in the instance variables, constructor, run method and reset method as described in the comments in the file. This should mostly be a matter of copying and pasting.

  4. Select "Build All" from the project menu, but do not execute the program within Cafe since Cafe is not set up on CEC for viewing applets. (Cafe may freeze if you try to execute an applet within it... we're working on this and will let you know if it becomes possible to execute applets from Cafe on CEC.)

    If you get an error (about not finding applet, etc.) when building the project, select "Settings..." from the project menu. Then select "directories", and delete the entire first line in the dialog box and click OK.

  5. To test your applet, open Netscape Navigator. In the File menu, select "Open File in Browser." Then, where it says "Look in...", select your H: drive and select the breakout file from your BreakoutApplet folder. It may take about a minute to load.

  6. If you want to go for prizes and glory, you should add new features to your breakout program that will impress the judges. (Be sure to list the new features in the breakout.html file so the judges will notice.) Possible ideas include: making new kinds of bricks, making "rounds" of play (where the wall resets with different kinds of bricks after each round), adding sound, playing with two balls at once, and improving the way paddle collisions and spin factors are calculated in GameCanvas.java for better "game action." Be creative! Impress the judges!

  7. As you make changes to your applet, you may need to restart Netscape to test them if Netscape doesn't get the new version when you hit the "reload" button.

  8. Once your applet is fully tested, you're ready to enter the contest, as described in the contest rules below.


Contest Rules:

  1. Only students currently enrolled in CS101 may enter.

  2. Entries will be judged by a panel of CS101 TAs on the basis of quality and originality. Prizes will be awarded in various categories (graphics, game action, creativity, etc.). All judges decisions are final.

  3. All entries must execute and must contain only "G-rated" material. Judges will disqualify entries containing inappropriate language or media content (even if it is funny). Disqualified entries will not receive any of the benefits listed above.

  4. All entries must be accessible on the web. To do this, copy your entire BreakoutApplet folder into your .www-docs directory and set the permissions so that all folders and .class files are world-readable. We strongly recommend putting a link to the game from your www home page (the URL will be "BreakoutApplet/breakout.html") and testing that it works. You may also want to add a link back to your home page in the breakout.html file so that people can admire you after playing your game. We strongly suggest that you do not make your .java files world readable, or another contestant might steal your code.

  5. Stealing other people's code is strictly prohibited. All submissions should be your own work. Substantial penalties, beyond disqualification from the contest, are involved.

  6. To submit your entry, send an email message to cs101@cec.wustl.edu containing two lines: (1) your name, as you want it to appear in the list of contestants, and (2) the complete URL for accessing your game. For example, http://www.cec.wustl.edu/~kjg/BreakoutApplet/breakout.html

  7. All entries must be received by 12:00 noon on Monday, April 28. We are not responsible for lost, delayed or misdirected email.
Good Luck!


Kenneth J. Goldman (kjg@cs.wustl.edu)