wiki:DeveloperGuideNew

Prerequisites

Several pieces of software are required to build the existing multistage platform and any existing game plugins.

  1. The Java SDK is required to compile any java software. To see if your computer already has java installed, open a command prompt and type "java -version" (without quotes), then press the return key. If the system complains that it cannot find the 'java' command, then java is not installed (or is not in the system path), and you should install from the java website.
  1. Apache Maven is used to build both the Multistage platform and existing game plugins.
  1. (Optional/Recommended) NetBeans is an interactive development environment geared toward java which eases the overhead of large project management, has its own bundled version of Maven and has a graphical GUI form builder which could help java programmers unfamiliar with Java Swing

Downloading and Bulding the Platform

The Multistage source code is available for download here. Once the archive is unpacked, it can be compiled with the maven command-line binary or with an IDE like Netbeans or Eclipse.

Initial Steps

Because of the structure of the Multistage project, a few initial steps are required to set up your local Apache Maven repository before the platform can be compiled:

  1. Build the Multistage base project, by navigating to the multistage root directory and running mvn install on the pom.xml file located there (or open the Multistage base project in NetBeans? by Choosing Open Project and selecting the multistage directory, then right clicking on the open project and choosing Build.
  2. Build the Multistage plugins directory project, by navigating to the multistage/plugins directory and running mvn install on the pom.xml file located there (or open the Multistage plugins directory project in NetBeans? by Choosing Open Project and selecting the multistage/plugins directory, then right clicking on the open project and choosing Build.

Once these steps are taken, both the multistage project and multistage plugins directory project are compiled and installed in your local Maven repository, and the Multistage platform and individual plugins (which depend on these other projects) will be able to be compiled.

Compiling using Maven

To compile the multistage platform using your computer's system console, navigate to the project's platform subdirectory, and execute:

mvn install

This should create a subdirectory in the target directory which contains everything necessary to run a session (once a game plugin for that session has been installed).

Compiling in NetBeans (using Maven)

To compile the multistage platform using the NetBeans IDE, choose Open Project from NetBeans's File menu, and select the platform directory's pom.xml file. The project should show up in the Projects window of the IDE. Right-click on the project and choose Build.

Building a Game Plugin

Individual game plugins can be built very similarly to the platform, either by using the maven executable or with an IDE. Since all game plugins depend upon software contained in the platform, each game plugin requires a copy of the platform .jar file installed to your local maven repository to compile. If you've used the instructions above to build (and install) the platform, this should already be done. If you haven't, please do so.

Compiling using Maven

Similarly to building the whole platform using the maven executable, open the computer's console and navigate to the game plugin's directory (which is usually a subdirectory of the platform's plugins directory), and execute:

mvn install

This will generate a set of directories containing a clean copy of the platform with this game plugin installed, which you can then execute. If you wish to use the game plugin on a different Multistage installation, all that needs to be done is to copy the game's plugin directory from this installation to the new location.

Compiling in NetBeans (using Maven)

To compile the multistage platform using the NetBeans IDE, choose Open Project from NetBeans's File menu, and select the game plugin directory's pom.xml file. The project should show up in the Projects window of the IDE. Right-click on the project and choose Build.

Writing a New Game Plugin

Several steps are required to write a new game plugin:

  1. Download and extract the Game Plugin Template from the Download Page, and extract it to the plugins subdirectory of the maven source tree.
  1. Fill in the pom.xml file with details specific to your project.
  1. Actually write the logic and interface for the game plugin. The minimum requirement is a class which extends ServerControl? and a class which extends ClientGUI?.

A more in-depth look at writing a game plugin can be found in the Tutorial on Writing a new Game Plugin

Last modified 4 years ago Last modified on Nov 13, 2013 10:59:59 AM