home *** CD-ROM | disk | FTP | other *** search
-
- ++++++++++++
- +++ TRON +++ - an XWindows game
- ++++++++++++ (colored or black&white)
-
- by Helmut Hoenig (MAY-1988)
-
-
- This is an X-version of the well known light-race of
- the TRON-film. I actually wrote that program to get a bit
- more familiar with X and with communication between programs
- through sockets. (That should be an excuse for writing pro-
- grams with such a bad structure.) But at least it runs and
- besides the programming-experience I got, we already had a
- lot of fun with it.
-
- After we tested the program for more than a year, I
- finally decided to post it. To play that game you need:
- UNIX, XWindows X11R3, a C-compiler, a lot of include-files.
-
- The makefile will help you to compile the 4 source-
- files into the 2 binary-files "tron_server" and "tron_run".
- These files have to be available in the same directory on
- every host, where the program should be used (e.g.
- /usr/games), since the programs are getting started via a
- remote shell using a system()-call. (see "tron_server.c",
- line 284ff)
-
-
- +++ HOW IT WORKS +++ (you might skip this if it works)
-
- The "tron_server"-program is used to start the system
- up. I also call it the master. In the startup-sequence, a
- "tron_run"-program is started for each player (usually on
- different hosts). Each program connects itself to the mas-
- ter. Through that stream-connection, the master is able to
- send commands to the players (e.g. start game) and the
- players can answer with the number of rounds they played
- until they were busted.
-
- After the startup-sequence, we have a star-
- configuration of the players and the master. Each player
- sends the port-number of an additional datagram-socket to
- the master, which is used during the game. The master opens
- a window to select the players and start the game. When the
- game gets started, every player-program receives the port-
- number and host of the next player. In that way a datagram-
- paket, produced by the first player, can be send around in a
- ring.
-
- No effort (except a timeout, which ends the game) has
- been made to recover from missing datagrams, since it seems
- that they don't get lost on our system. They just come a bit
- late sometimes and then there's no sense in playing anyway.
-
-
- +++ WHAT TO KNOW +++
-
- The game is made for up to 8 players. At least one of
- them has to be human.
-
- The players control their racers by mouse or keyboard.
- The keys to use are available from the program.
-
- Even if you play with the keyboard, you've got to place
- your racer with the mouse (and middle button) in the field.
- It starts running in the direction of your mouse. If you
- wait a few seconds, the racers are automatically placed
- under your mouse and the game starts.
-
- For each player you can enter the display- and the
- host-name (separated by a '^', e.g. 'display:0.0^host'). If
- there is no display-name given the host is used for an
- auto-player only (e.g. '^host'). As you usually play on the
- host of the display, a single name is enough to select host
- and display. (So the usual command-line looks like
- 'tron_server host1 host2 ^auto_player1 ...) You might get
- problems in the starting up sequence, if there are too many
- auto-players on the same host.
-
-
- +++ PROBLEMS +++
-
- On our system, we sometimes have problems in the
- startup-sequence as there seem to be a lot processes
- envolved when starting the remote-shells. It happen, that
- the startup fails, when there are too many players (auto-
- players) on the same host. To avoid that it is possible to
- let the server sleep some seconds between the starting of
- players by the option '-s<seconds>'.
-
- When controlling with the mouse, you might get problems
- with your window-manager, if it grabs combinations of
- shift/control and mouse-buttons. Play with keyboards or kill
- the window-manager in that case.
-
-
- +++ HAVE FUN +++
-
- Helmut Hoenig
-
- PS.:
-
- TRON runs on our system with suns and MicroVaxes. It is
- tested on 3 kinds of monochrom-displays and a colored one.
-
- Please let me know if TRON runs on your system !
- My address:
- hoenig@informatik.uni-kl.de
-