Project structure

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:

  • OpenPatrician: contains the source code, as well as some documentation.
  • -OpenPatricianWeb: a web project containing the game’s website files.- (obsolete)
  • OpenPatricianGameArt: contains the art production resources of the game.
  • -OpenPatrician-assembly: used for assembling OpenPatrician’s modules in one executable.- (obsolete)

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:

Maven module dependencies

Module dependency

Events modules:

  • GameEvent: provides data models for events that aren’t specific to OpenPatrician and that can be passed around using Guavas EventBus.
  • OpenPatricianGameEvent: contains game-specific event classes.

JavaFX modules:

  • OpenPatricianJavaFX provides UI components used by OpenPatricianDisplay.
  • OpenPatricianDisplay: manages the UI of the game by using the control elements provided by OpenPatricianJavaFX. This module also includes the main class OpenPatrician.

Server/client architecture modules:

  • OpenPatricianClientServerInterface: interfaces used by the client and the server. Provides the basis to divide the whole application into a server and a client part, which will be used for multiplayer.
  • OpenPatricianServer: the server part of the game.

Game data and resources modules:

  • OpenPatricianData: contains data (text, icons…) that is shared by several modules.
  • OpenPatricianModel: one of the most central modules which basically holds all the logical data structures (game, player, city, …) and some utility logic to instantiate these models.
  • OpenPatricianEngine: drives the models and the game and it is where the AI is implemented.
  • OpenPatricianImage and OpenPatricianSound: takes care of loading image and sound resources.
  • OpenPatricianUtilities: provides several tools such as the management of game properties, text, locales, etc…
  • OpenPatricianSound: Sound infrastructure


  • OpenPatricianStandalone: This is the game client for standalone single player games
  • OpenPatricianPluginInstaller: This application allows verification and installation of plugins, so they can be used by the application.


  • MinimalMap-Plugin: Plugin for a minimal map

Test modules:

  • MarvinFXEssentials: module with largely imported code. It is a utility that allows testing the JavaFX user interface.
  • OpenPatricianTestUtilities: Common utilities used for testing
  • OpenPatricianTest: additional game wide tests and test applications