This text intends to be the main reference for everyone feeling interested in taking part in the development of OpenPatrician. In this quick review we will guide you through the most basic features of the project development.
OpenPatrician is based on the game The Patrician and its successor Patrician II plus its Add-on. The Add-on was sold on the international market as Patrician III. To avoid confusion we will use international terminology and call the Add-on Patrician III. Patrician IV, the game that Kalypso Media started selling in 2010, is currently not the focus of this development.
The development of the game is planned to follow these three stages of continuously improved games. We are currently working on the first stage, which will consists in the implementation of a basic game engine that will be used as a base for the next stages. This engine will contain the features included in The Patrician.
If you haven't played the game, you should read the following reviews:
Valuable hints on how the internals on Patrician III work can be found in this German tip collection. For a more general and interactive description of the game, there is also a Patrician III wiki in English.
An important address may be the German Patrician Forum.
OpenPatrician is stored in the SVN repository's trunk. Branches are used for experimental purposes and tags are created with each new release. In the trunk we can find the following four projects:
Game art can be found on OpenGameArt and sounds and music on OpenGameArt.
The source code of the project is structured by using Maven. Therefore, there is a master project (OpenPatrician) which contains several Maven children modules. These modules have dependencies between them, which are resolved by using Spring framework's dependency injection. The current game modules are the following:
Events modules:
JavaFX modules:
Server/client architecture modules:
Game data and resources modules:
It is recommended to use the command line or an IDE to edit the game code. There are many options, but we suggest you to use one of the following because we tested the project on them.
Producing a runnable jar is fairly easy. If maven 3 and svn are installed and in the executable search path, all you have to do is to issue the following on the command line.
Checkout:
We will just checkout the needed projects (anonyoumous and with username):
svn co svn+ssh://svn.code.sf.net/p/openpatrician/code/trunk/OpenPatrician OpenPatrician
svn co --username=<username> https://svn.code.sf.net/p/openpatrician/code/trunk/OpenPatrician OpenPatrician
or update an existing project:
svn up OpenPatrician
Build all the components (inclusive running all tests):
cd OpenPatrician
mvn install
Build an executable jar file:
mvn install -P build-installer
Run the game:
java -jar target/OpenPatrician-jfx-0.0.1-SNAPSHOT.jar
The version number (in the above example 0.0.1-SNAPSHOT) may be adjusted, based on the version built (see output of the mvn package command).
IntelliJ IDEA community edition is the IDE that we are currently using. To import the project, just check the code project (OpenPatrician folder) from the SVN repository by using File->New->Project from Version Control. To avoid problems with lombok annotations, you need to install the Lombok Plugin, which can be found in Settings->Plugins.
Check out the code project (OpenPatrician folder) into your Eclipse workspace by using the import from SVN option or by importing it as a Maven project after checking it out from the command line. You will need to install the M2Eclipse plug-in if Maven support isn't already included in your IDE.
To check out the code project (OpenPatrician folder) under NetBeans go to Team->Subversion->. Since it has been used under other IDEs you may not find the needed properties to set the projects up.
To get the projects from the checked out code you need to have the Maven plugin installed. Then you can File->Open Project and select the folder where your code lies. This will create a root folder with the parent project. All children are in the 'folder' modules. Double clicking on a module will extract it as a project that can be used.
The compilation usualy is done in the IDE. However to build the whole project use the Maven command:
mvn clean install
The dependencies are gennerally defined and managed by Maven. However there is one dependency that you need to add to the classpath of your JDK. It is the tools.jar which is located in the JDK's lib directory. This jar file holds utilities that are needed for documenting purposes, so it does not go into any productive release but is required to build the classes locally.
There are several tasks that you may want to help us with: programming, game art, sounds and music, documentation, etc... For coding it is recommended (not actually needed) to have some experience with the following tools:
If you have never used Maven I suggest Sonatypes Getting started guide and the more complete version.
Basically we commit everything, here are some guidelines:
Contact me so you can be added as a developer to the project and gain write access to the repository.
On this page various issues aree listed that need to be addressed in some way. The list is generated at the end of each release, therefore it might not be that up to date, but it is a good starting point. It allows you to take a look at some of the smaller issues and in doing so browsing through the code.
Another approach is to take a look at the issue tracker for issues labeled starting task. Those are issues that were created and thinking that they are not that complex and do not need that much knowledge of the inner working or other parts of the code. Of course this initial asumptioon might be wrong.