Download The Bub's Brothers
Step 0. Introduction
Sorry, these instructions are a bit long and tedious. At some point we will maybe make a nice full-featured auto-installing single-click release. Or if someone would like to do it, it would still be better :-)
The Bub's Brothers is a network, client-server game. It does not mean that you cannot play it alone, on a non-networked computer, but that will just be less fun. The game is written in the Python programming language.
- The server is the program that you only need to run on one machine. It is a non-graphical program that computes the gameplay and sends display data to the clients via the network.
- The client is the display program that must be executed on every machine.
The server doesn't display anything. Only one client should be run per machine. Put the server either on one of these machines or on yet another machine; a single modern processor should not have any trouble handing both a client and the server.
Step 1. Prerequisites
- You need Python 2.2 or later. The server will definitely not run with an older Python version, although the clients may.
- The client exists in three versions, all of which are fully interoperable:
- Based on the cool Pygame libraries. This is the recommended version because the other clients cannot play sounds and music. Download and install a recent package from the Pygame site on each of the machines you want to use as client.
- X Window client. Works on any X Window display with more than 256 colors, like most Linux and Unix variants, or XDarwin on MacOSX.
- New: there is a Java client ! Very cool to try out the game. Too bad it doesn't have sounds yet. With this one you don't have to install anything on the client machines: just play in any Java-enabled browser. See below.
Step 2. Downloading the code
You can get the game in one of the following ways:
- By downloading a File Release from the project page.
- By getting the latest CVS tree.
- If you are not familiar with the command-line
cvs
program, you could try CVSGrab.
Step 3. Starting a server
Python code need not be compiled, but there are a couple of
C extension modules that you may want to compile in the
situations specified in the sequel. You need a working C
compiler for this, but note that you need to compile on
each specific platform only the C extensions (if any) that
are meaningful for the usage (client or server) of that
machine, as specified below. For example, a MacOS Pygame
client does not need any C extension to be compiled.
On the server side, you can optionally enable the
Clock bonus
(try it, it's fun!) by compiling the C extension module
statesaver
in the bubbob
directory with
the following command:
cd bubbob
python setup.py build_ext -i
This should create a file called statesaver.so
or statesaver.dll
on Windows.
To start a server, enter that bubbob
directory and run
bb.py
with the name of the level file (level files are found
in the bubbob/levels
subdirectory):
cd bubbob
python bb.py levels/scratch.py
or:
cd bubbob
python bb.py levels/RandomLevels.py
You can also use the levels of the original MacOS game Bub & Bob. They must be uncompressed and put in the levels
subdirectory in MacBinary mode (e.g. via the Fetch
FTP transfer tool of MacOS9). I will add a couple of these original levels on this site if their original authors allow me to do so.
There are a couple of options that you may want to use when starting a server, most notably to start at a different level within the level file or to skip levels.
Step 4. Starting the clients
Note that client machine not acting as a server will not use the bubbob
directory at all, but only the display
and common
directories (unless you are using the Java client, which requires absolutely nothing; skip to the end of this paragraph).
- To run the Pygame client, run the script
pclient-pygame.py
on the top-level directory (see below for options):
python pclient-pygame.py
- To run the X Window client, first compile the required Python extension module:
cd display
python setup.py build_ext -i
Then you can run pclient-xshm.py
on the top-level directory (see below for options):
python pclient-xshm.py
The client tries to use the SHM extension of X Window, which will not work if your DISPLAY
points to a non-local display or if the X Window server just doesn't support it. In this case it should revert automatically to the plain X protocol. For troubleshooting you may want to try pclient-slow-X.py
which does not even try to use the SHM extension.
- To run the Java client, all you have to do is figure out the correct URL to type in your browser. It is the URL that the server prints when it starts:
HTTP Java server: http://xxx.yyyy.com:8000
Server selection for the Python clients
- The Python clients
pclient-*.py
will look for a server at the following network addresses, in order: first on the local machine (127.0.0.1); then on the local network loop (broadcast), then on magma.unil.ch (which is the server we generally run here -- but please only use this server for testing purposes, it will be closed if it is too overloaded. We keep this address public currently so that we can get some feedback at how many people are using this game). You can change these addresses by editing the file pclient-*.py
. The syntax for the address list should be pretty straightforward. Also note that running clients can communicate server addresses to each other: if your client discovers another running client it will connect to the same server, even if the server is not in your own address list.
Troubleshooting
- If the client is behind a firewall (if you cannot see anything in your window apart from the blue bottom bar), or if your network connection is slow, start the client with the command-line option
-no-udp
. It instructs the server to stream the display data over the TCP link instead of sending UDP packets. It lowers the required bandwidth a bit because it can be compressed, but in most cases it probably increases your client's reaction times. Still it has been found to be quite playable.
- The Java client will not work behind a firewall yet (i.e. it has no
-no-udp
option).
That's it. You can e-mail any question you may have to me, arigo
, at users.sourceforge.net
, or join our IRC channel #ima
on irc.freenode.net
.
Armin Rigo and the IMA connection