/.metadata/com.ibm.games.
Each client machine must take the following steps to connect to this server:
- Start Eclipse configured with the IBM Games environment.
- Create a new Game project if one doesn't already exist.
- Double-click on game.xml to open the editor.
- Expand the Game Server section.
- Enter the hostname or IP address of the server as well as the port.
- Save and exit the editor.
- 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
- Configure one machine using the regular Eclipse installation instructions.
- Start Eclipse.
- Go to Window > Preferences.
- Select IBM Games.
- Select the game that you want to play. Click Create Project... to create the project within the workspace.
- Enter the server host name and port that you will be using.
- Click Apply, and then OK.
- Copy the eclipse installation directory and workspace to any number of machines that you
want to use for the tournament.
- 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.
- Copy games.jar to your server machine.
- Optional: Use another spare machine and map a drive to the server. This machine will be used for a spectator scoreboard.
Running the tournament
- Use the -server mode to start the server.
- Optional: On the spectator machine, run using the -spectate mode to start the
spectator scoreboard on this machine.
- [Coding portion of the tournament runs for 1 to 3 hours]
- When the coding portion is over, use Ctrl-C to stop the server.
Finding and displaying the winners
- Use the -tournament mode to run a tournament on the server.
- 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.
- When you want to playback the tournament, use the -playback mode.
- 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.