Manifest

The manifest is a JSON file describing all configuration options for the game. These configuration options are accessible from the session creation page in Octopod:Play.

The file must be named manifest.json and be place at the root of the game folder. All fields are mandatory, but some can be left blank (see below).

Example

{
       "name": "TourVR",
       "description": "Lorem ipsum dolor sit amet",
       "version": "1.0.0.0",
       "teams": {
               "team_blue": "Blue team",
               "team_red": "Red team"
       },
       "teamPlayersNumber": 3,
       "spaces": ["box:wide", "room:deep"],
       "templateCmdServer": "tourVR_server.exe --ip={_ip-launcher} --sessionId={_session} --timeSession={timeSession} --difficulty={difficulty}",
       "templateCmdClient": {
               "_default":"tourVR.exe --pseudo={_pseudo} --id={_id} --sessionId={_session} --playerrole={role}",
               "Passer le tuto": "skiptuto.exe"
       },
       "templateCmdSpectator": "tourVR.exe --mode=Spectator",
       "advancedConfigServer": {
               "timeSession": {
                       "default_value": 15,
                       "label": "Game time"
               },
               "difficulty": {
                       "default_value": "1",
                       "label": "Difficulty",
                       "values": {
                               "1": "Easy",
                               "2": "Normal",
                               "3": "Hard"
                       },
                       "sort": "auto"
               }
       },
       "advancedConfigClient": {
               "role": {
                       "default_value": "heal",
                       "label": "Role",
                       "values": {
                               "tank": "Tank",
                               "dps": "DPS",
                               "heal": "Heal"
                       },
                       "sort": "none"
               }
       },
       "advancedConfigSpectator": {},
       "templateCmdPostInstall": "post_install_script.bat --launcher={_launcher}",
       "translations": {
               "fr": {
                       "Game time": "Durée de partie",
                       "Difficulty": "Difficulté",
                       "Blue team": "Equipe bleue",
                       "Red team": "Equipe rouge",
                       "Easy": "Facile",
                       "Normal": "Normale",
                       "Hard": "Difficile"
               }
       },
       "firewallRules": [
               {
                       "program": "foo/bar.exe",
                       "port": 4567,
                       "protocol": "tcp"
               }
       ]
}
  • name: game as displayed in Octopod:Play

  • description: short description of the game displayed in Octopod:Play

  • version: version number formatted major.minor.revision.build (ex: 1.2.3.4), must be increased for every deployment

  • teams: list of teams with their as displayed in Octopod:Play, there must be at least one team (in case of free-for-all or coop game, one team labeled “Players” for example)

  • teamPlayersNumber: maximum number of players per team

  • spaces: list of supported play areas (see Spaces section)

  • templateCmdServer: command to execute to launch the server, path is relative to the root of the game folder, the command is used to pass parameters to the game (see below)

  • templateCmdClient: command to execute to launch a client

  • templateCmdSpectator: command to execute to launch the spectator (can be left empty)

  • advancedConfigServer: additional configuration variables for the server (see below)

  • advancedConfigClient: additional configuration variables for the client (see below)

  • advancedConfigSpectator: additional configuration variables for the server (can be left empty)

  • templateCmdPostInstall: command to execute after installing the release (see Post-install command section)

  • translations: translations in various languages

  • firewallRules: list of firewall rules to create (see Firewall rules section)

Configuration variables

Variables can be passed to the game through the command line using a syntax like --key={variableName}.

Where --key= is arbitrary and depends on how the game parses the command line to extract variables, and {variableName} is either a pre-defined variable from Octopod:Play (see below), or an additional variable defined in the manifest, and will be replaced by its value when the command is executed.

Pre-defined variables are:

  • _session: UUID of the game session

  • _id: UUID of the player in this game session

  • _pseudo: nickname of the player in this game session

  • _tag: UUID of the player (persists across game sessions for identified players)

  • _player-index: index of the player (starts at 1)

  • _team: team key of the player (in the example above, would be team_blue or team_red )

  • _company: name of the client (from our backoffice)

  • _launcher: name of the launcher account

  • _ip-launcher: IP address of the computer running Octopod:Play

  • _players-total: total number of players in this game session, only players with a computer selected are accounted

  • _log: path to store session log. These log can be retrieved directly with launcher (>= 0.8.0). When daemon version is inferior at 1.0.0, variable contains na. Example: C:\VRDesk\var\daemon\sessions\XXXX-YYYY-ZZZZ\logs

  • _ip-server: IP of game machine server

  • _port-server: Port which can be used by game server. If server process use it, you can use this port to etablish connection

  • _space: the space and orientation selected by the user (one value of the manifest spaces array, see Spaces section). If no space selected it returns an empty string.

  • _tutorial: enable game’s tutorial (true to have tutorial and false to skip it)

Mandatory variables

To ensure communication with Octopod:Play, it is mandatory to: * send {_ip-launcher} and {_session} to the server * send {_session} to the clients so they can connect to the same game session * send each client his {_id} which will be used for score tracking

Additional variables

It is possible to declare additional variables for the server, clients or spectator. In the following example, we add a difficulty variable to send to the server:

"advancedConfigServer": {
  "difficulty": {
   "default_value": "2",
    "label": "Difficulty",
    "values": {
      "1": "Easy",
      "2": "Normal",
      "3": "Hard"
    },
    "sort": "auto"
  }
}

A configuration icon (cogwheel) will appear next to the Server field in the game session creation page. Clicking on it will open a configuration window, which will contain a drop-down menu labeled “Difficulty”, with the values “Easy”, “Normal” and “Hard” (“Normal” by default).

If {difficulty} is specified in the server command line, it will be replaced by 1, 2 or 3 upon execution.

The “values” field is optional. If not specified, the drop-down menu will be replaced by a text input field, and the variable will be replaced by its text value in the command.

Field sort is optional. Default value is auto. This field allows to enable/disable sort. To disable sort, uses value none.

Additional commands

If there are too many configuration variables that must be modified by the game master for every session, it may be more practical to have additional commands to cover various situations.

The following example shows how to define an additional command that skips the tutorial in game (useful if a client has to be restarted after a bug):

"templateCmdClient": {
  "_default": "tourVR.exe --pseudo={_pseudo} --id={_id} --sessionId={_session} --playerrole={role}",
  "Skip tutorial": "tourVR.exe --pseudo={_pseudo} --id={_id} --sessionId={_session} --playerrole={role} --skipTuto=true"
}

In this example, if the game master uses the “Launch Game” button to start all clients simultaneously, the “_default” command will be used. If the server has started and the game master clicks on the Launch button for a specific client, he will see a drop-down menu with options “Launch Game” (“_défault” command) et “Skip tutorial”. The client will be launched using the corresponding command.

Spaces

Octopod games can be played in different play areas. A play area (called space) is a rectangle area where players can move freely in the game.

Manifest field spaces specifies the list of play area supported by the game. Each space name has a suffix corresponding to the play area orientation. There are two kind of orientation : deep (depth is greater than width) and wide (width is greater than depth).

Available spaces in Octopod are summarised in the following table.

Name

Approximate dimensions (width x depth)

Max. players

box:deep

~ 2.5 x 3.5m

1

box:wide

~ 3.5 x 2.5m

1

room:deep

~ 3.5 x 5m

2

room:wide

~ 5 x 3.5m

2

half:deep

~ 5 x 8m

4

half:wide

~ 8 x 5m

4

line:deep

~ 3.5 x 10m

4

line:wide

~ 10 x 3.5m

4

arena:deep

~ 8 x 10m

8

arena:wide

~ 10 x 8m

8

Example:

"spaces": [
  "box:deep",
  "line:deep",
  "arena:deep"
]

Firewall rules

You can defined as many firewall rules you need. These rules will be created when a user installs a release of your game on one of his machines and cleaned at uninstall stage.

Note

Firewall rules are release related, meaning that you have to declare firewall rules in each release manifest even if they haven’t changed.

Firewall rules definition is optional therefore the manifest field firewallRules is optional.

Firewall rules are defined in manifest with the key firewallRules. It consists of an array where each element is an object representing a single firewall rule.

Each firewall rule must define its program, the protocol and the port (or the ports) to allow. These fields are summarized in the following table:

Field name

Description

Type

Constraint

program

the relative path of the executable program to allow

string

N/A

port

the port you want to open

integer

between 1024 and 65535 (included)

ports

the port range you want to open

object

between 1024 and 65535 (included), fromto

protocol

the protocol you want to allow

string

tcp or udp

Note

A firewall rule must define a single port via the port field or (exclusive) port range via the ports field, which has the following syntax:

"ports": {
  "from": 5050,
  "to": 5099
}

where from and to are the range bounds (inclusive in both side).

Firewall rules will be created at the release installation on client’s machines for all profiles (domain, private and public) and in both directions (IN and OUT).

Example:

"firewallRules": [
  {
    "program": "foo/bar.exe",
    "port": 4567,
    "protocol": "tcp"
  },
  {
    "program": "qux.exe",
    "ports": {
      "from": 5050,
      "to": 5099
    },
    "protocol": "udp"
  },
]

Post-install command

You can define a post-install command that will be executed during the release installation stage (after the effective installation and before making the release ready to play). This command will be run with administrator privileges.

Its definition is located under the manifest’s key templateCmdPostInstall. This entry is optional and if presents must be a string. You can use pre-defined variables as presented in Configuration variables section.

Example:

"templateCmdPostInstall": "post_install_script.bat --launcher={_launcher}"

Note

templateCmdPostInstall can be used to install mandatory dependencies, declare/register licenses or other stuff needed to be perform once after installing the release.