A Tutorial on Writing a New Multistage Game Plugin

Writing a new multistage game plugin consists of several steps. Downloading the source code and preparing the pom.xml? and plugin.xml files are covered on the Developer Guide page, and this tutorial is intended to focus on the details of the game plugin specific java files and the parameter file.

A Multistage game plugin has only three strict requirements:

  1. A class which extends ServerControl?. This class implements the server-side logic of the game, including reading the parameters file, asking the clients for their moves, calculating payoffs, and outputting the results.
  2. A class which extends ClientGUI. This class implements the client-side user interface of the game, including receiving messages from the server, accepting input from the client, and sending information back to the server.
  3. A plain text parameter file which, when loaded at runtime, will tell Multistage which game plugin you're trying to run, along with basic setup information like the number of repetitions of the game to run, and how many subjects the game requires.

Multistage, as a software development platform, provides much of the functionality needed by interactive laboratory software as well as the flexibility to extend this existing functionality. This tutorial will guide the reader through the process of writing a simple Dictator Game game plugin.

1. Initial Preparation

2. The Server Controller

3. The Client GUI

4. The Parameter File

Last modified 3 years ago Last modified on Oct 18, 2013 4:14:47 PM