Setting up the Rule Game Server and Client

Updated 2024-03-06

This document descibes the process for setting up the Rule Game (a.k.a. Game of Hidden Rules - GOHR) software on your own web site, so that your team could design experiments and process experimental results independently of the University of Wisconsin - Madison team.

For an overview of the main concepts of the Game Server, see Main Rule Game server concepts.

Rule Game software components

The Rule Game project at University of Wisconsin - Madison has developed two products:

The two applications described above can be installed and used completely independently from each other, even though the share much of their code base. (This means, in particular, that if you want to build both applications from source, you need to download the source code from our GitHub repository only once).

The Rule Game web application system used by the players and researchers consists of the following components:

Necessary third-party software

Client side

To play games, a player need a computer with a modern web browser, such as Chrome or Firefox.

Server side

We are running the Rule Game web application server on a Linux machine (the OS version is Ubuntu 18.04), but if you like challenge, you probably can set it up on a MacOS or MS Windows machine as well. (We have tested a MacOS installation successfully on MacOS Catalina 10.15.7, but not a MS Windows one so far).

The necessary third-party software includes the following.

Mandatory (sufficient if you want to install the pre-built WAR file):

Optional (needed if you want to build the server from source, i.e. go for Option B or C):

Setup Option A: server and client binary install.

There are several ways to set up your Rule Game software. Option A is the simplest one. If you follow this option, you will install on your server host two WAR files (Web application Archive file) pre-built by our team at UWM, and for the server and one for the client. Here are the step-by-step instructions.

  1. The SQL database. You need to install a relational database server, if you don't have one already. Our team uses a freely available MySQL server, but if you're running something else (such as the Microsoft, Sybase, or Oracle SQL server), it probably will do fine as well. At the server, create the datbase named game, and the user account named game as well. For more detailed instructions, see SQL database setup guide.
  2. The master configuration file. This file will, among other things, tell your Rule Game Server how to connect to the database server. See config file setup for details.
  3. Tomcat. Assuming that you have chosen the Apache Tomcat as your web server, install it (if you don't have it yet) and configure it for running the Game Server web app on it. For the instructions (which also ask you to install an additional library), see Tomcat setup guide. Once Tomcat is running, you should be able to verify that it's running by going to the appropriate URL, such as http://MY_HOST:MY_PORT/ . (Put your host name and port number instead of MY_HOST and MY_PORT in the URL; if you are sitting at your server's console, and are using the default port number 8080, that would be http://localhost:8080/ )
  4. Rule Game Server WAR file. Download a recent version of our server application WAR file from our server's Download Area. Look for a recent file with a name such as w2020.war or w2020-5.002-2022-06-01.war, rename it to w2020.war if needed, and put that file into the web apps directory of your Tomcat (/opt/tomcat/webapps, if you followed our defaults). You can do it by simply copying the downloaded WAR file to that directory, or you can use Tomcat's management web interace for loading applications ( http://localhost:8080/manager/html , if you are sitting in front of your server).
  5. Rule Game GUI Client WAR file. In this option, you will simply download a recent version of our client application WAR file our server's Download Area (look for a recent file with a name such as ruele-game.war), and put that file into the web apps directory of your Tomcat (/opt/tomcat/webapps, if you followed our defaults). You can do it by simply copying the downloaded WAR file to that directory, or you can use Tomcat's management web interace for loading applications ( http://localhost:8080/manager/html , if you are sitting in front of your server).
  6. Experiment control files. To be able to run experiments, you need to populate the experiment control file directory (/opt/w2020/game-data, if you followed our defaults) with control files for some experments. See the experiment control file setup guide.
  7. Testing! Now that everything is in place, you can test some components of the software system you have just set up, to see if it actually works. See the testing guide to get started.

Setup Option B: server source code install + client binary

Instead of downloading the WAR file, you may choose to download the Game Server source code and the necessary third-party libraries, and carry out the build process yourself, compiling the source code and building the WAR file. This approach is appropriate if:

In this case, the setup process is as follows:

  1. Set up the SQL database, exactly as in step 1 of Option A.
  2. Set up the master configuration file, exactly as in step 2 of Option A.
  3. Set up Tomcat, exactly as in step 3 of Option A.
  4. Download the necessary third-party libraries, as well as the tools necessary for compilation. (You would not need to do that with Option A, because those libraries are already included into the WAR file). See the list here.
  5. Download the source code of the Rule Game Server from our Github repository: Rule-Game-server, compile it, and build a WAR file. For instructions, see the Rule Game Server build Guide. You can also make any code changes here, if desired.
  6. Download and install the GUI client WAR files, as per Step 5 in Option A.
  7. Work on your control files, as per Step 6 in Option A.
  8. Proceed with testing, as per Step 5 in Option A.

Setup Option C: server source code install + client source code install

You can choose to compile the GUI client from the source code, instead of downloading the WAR file. This is appropriate if you want to customize the client in some way.

The steps are the same as in Option B, except that in step 6, instead of just downloading the client app WAR file, you download and compile the source code. See client setup for details.