Administrator Instructions

The sections below contain information for an administrator of the environment. These instructions are old and are in the process of being updated!

General Information

To run a tournament or any of the other modes outside of the IDE, you just need to pull out 2 jars from the com.ibm.games plugin. One is games.jar, which is the main game engine. The other is the jar for the game you want to run, e.g. CodeRuler.jar. Just copy these jars into another directory or machine if you want to use the following instructions on another machine.

Setting up a machine

To setup a machine with the game environment, take the following steps:
  1. Configure one machine using the regular Eclipse v3.1 or above installation instructions.
  2. Unzip the game zip into eclipse/plugins.
  3. Start Eclipse.
  4. Go to File > New > Project...
  5. Go to Other > Game Project.
  6. Select one of the available games and enter a project name. Click Finish.
  7. Optional: Open the games.xml editor and/or a Java editor on the class that teams will be editting.

Setting up a game server

To run a distributed game, you'll need a game server to collect submissions and distribute code. To configure and start a server, take the following steps:
  1. Start Eclipse configured with the IBM Games environment.
  2. Go to Window > Preferences > Games.
  3. In the Server section, select a port number.
  4. Click Start. Click Ok.
  5. If you want to view incoming requests and information about the server, go to Window > Show View > Other... Then select IBM Games > Game Server.
  6. To stop submissions, simply go back to the Preferences and click Stop.
Submissions are stored in workspace metadata under /.metadata/com.ibm.games.

Each client machine must take the following steps to connect to this server:

  1. Start Eclipse configured with the IBM Games environment.
  2. Create a new Game project if one doesn't already exist.
  3. Double-click on game.xml to open the editor.
  4. Expand the Game Server section.
  5. Enter the hostname or IP address of the server as well as the port.
  6. Save and exit the editor.
  7. Optional: You can lock the server information by manually adding a 'serverLocked="true"' to games.xml. You can use Open With > Text Editor to open up a text view of the xml, but be sure to use Open With > Game Editor afterward to restore the Game Editor as the default editor.
  • You can now click the Submit button on the toolbar at any time to send your code to the server. Once you have done this, use the public track to compete against the other player's code that has been downloaded to your machine.

    Every submission you make to the server is backed up. Only the latest copy of your code (not including source) is sent to each new user who submits code to the server. Class files are encyrpted to prevent decompiling.

  • Administering a Tournament

    To administer a competition, the administator must take the following steps to setup the machines and run the tournament:

    Machine configuration

    1. Configure one machine using the regular Eclipse installation instructions.
    2. Start Eclipse.
    3. Go to Window > Preferences.
    4. Select IBM Games.
    5. Select the game that you want to play. Click Create Project... to create the project within the workspace.
    6. Enter the server host name and port that you will be using.
    7. Click Apply, and then OK.
    8. Copy the eclipse installation directory and workspace to any number of machines that you want to use for the tournament.
    9. The JavaDocs (javadoc.zip) and manual (manual.html) found in this directory can be edited to include information for the current tournament, and then printed for each contestant or placed on the machine's desktop.
    10. Copy games.jar to your server machine.
    11. Optional: Use another spare machine and map a drive to the server. This machine will be used for a spectator scoreboard.
    Running the tournament
    1. Use the -server mode to start the server.
    2. Optional: On the spectator machine, run using the -spectate mode to start the spectator scoreboard on this machine.
    3. [Coding portion of the tournament runs for 1 to 3 hours]
    4. When the coding portion is over, use Ctrl-C to stop the server.
    Finding and displaying the winners
    1. Use the -tournament mode to run a tournament on the server.
    2. Optional: If you need to do elimination rounds, backup the tournament directory and remove the players that did not make it past the first round. The placement information can be found in the trace files within the working directory.
    3. When you want to playback the tournament, use the -playback mode.
    4. Optional: Use another machine and map a drive to the server. Run using the -scoreboard mode to start a secondary scoreboard on this machine.

    Matches, Rounds, and Tournament

    IBM Games allows any number of players to compete in a tournament. Each tournament consists of a given number of rounds, in which each player competes exactly once per round. In the first round, players are randomly grouped into matches containing six or less players per match. Each of these matches is run, so each player gets a chance to compete once.

    For each successive round, the players are bracketed into matches according to their point values, and players with similar points play against each other. This continues for the number of rounds in the tournament, at which point winners are declared based on the total point values.

    When there are a large number of players, manual elimination rounds can be used to speed up the tournament. In this case, a tournament is run for 3 rounds (for example) and then only the top half of the players proceed to the next elimination round. This next elimination round can be run as a separate tournament, so all players start with 0 points again and there is an even playing field.

    Providing your own Samples

    All games will look for sample classes within the "sample" package, or any subpackages. Each sample must have the same name as the main class in the default package (e.g. "MyRuler" for CodeRuler). For instance, to create a CodeRuler sample ruler, start with an existing MyRuler. Using the Java perspective in Eclipse, create a new package in the CodeRuler project called "sample", and then copy and paste the existing MyRuler Java file into that package. The next time you run the game, this sample should be listed in the left-hand pane.

    Disabling Security

    If you want to disable security (e.g. to run code that uses reflection), set the disable.security environment variable to 'true'. You can do this by setting the system environment variable before launching Eclipse or running the game ('SET disable.security=true' on Windows), or by adding the following attribute when running from the commandline: -Ddisable.security=true.