Design Document Game Boxes
|This page has been updated to comply with Release 2.5.x of BOARD18.|
|Design Document edit|
BOARD18 can be used to play any 18xx style game for which a game box exists. A game box consists of the graphics files and control tables that describe the game board, the stock market and the various playing pieces. A game box is built using a graphics editor (such as GIMP) and a text editor. The files created with these tools are then packaged and uploaded to the BOARD18 server. This upload is accomplished via a built-in administrative facility.
|Game Boxes edit|
- 1 Graphics Standards
- 2 Control Structures
Historically most 18xx game boards had a hex grid orientated with the points of the hexes facing North and South as is shown in the diagram to the right. But a number of game boards [especially newer ones] have a hex grid orientation that is rotated 30 degrees from this orientation. BOARD18 can handle both orientations.
This document will refer to map boards in the first orientation as "Point Up" or Type P map boards. And it will refer to map boards in the other orientation as "Flat Side Up" or Type F map boards.
This note describes a potential problem with some Type F map boards.
In order to coordinate the size of the various graphics files, so that things fit together, BOARD18 will use the following sizing standards. Except as stated below all graphics must be sized to follow these standards.
Hex Tile Standard
All tiles should be sized as shown in the diagram above and to the right when displayed in Type P orientation. Tiles displayed in Type F orientation will, of course, be rotated by 30 degrees. Thus they will be 100 pix high and 116 pix wide.
Most circular tokens should be sized to have a diameter of 30 pix. Most Square tokens should be sized to have a width and height of 30 pix. But some 18xx games require odd sized tokens for special purposes. For example the destination markers in 18QQ. The game box standard has provisions to accommodate odd sized tokens.
A BOARD18 Game Box will contain four types of graphics files.
Game Board Files
board page. As with tiles and tokens all Game Board graphics must be sized correctly. That is the hex grid must fit tiles sized to the above standard.
Stock Market Files
The stock market graphic is the background of the BOARD18 stock market page. All Stock Market graphics must be sized with market boxes large enough to contain tokens correctly.
Hex tile graphic images are grouped onto “tile sheets” containing rows and columns of evenly spaced tiles. The illustration to the right shows a part of such a tile sheet. Each column is a different tile and each row in the column is a 60° rotation of the tile. There can be from one to six rows for each tile.
Token graphic images are grouped onto “token sheets” containing rows and columns of evenly spaced tokens. The illustration to the lower right shows such a token sheet. Each sheet will contain one or two columns of circular or square tokens. Each row in the column is a different token. If there are two columns then the image in the first shows the front side of the token and the second shows the back side.
The JSON Box Data Structure
Th first part of the game box JSON file contains data structures that define the file itself, the game board and the stock market board. The bname, version and author keys are used to identify the JSON file itself. The board and market keys head complex structures that define the game map and the stock market. They each contain fields that define the location of the graphic file and positioning of its grid.
The JSON Tray Data Structure
The data structure in the game box JSON file with the key of tray defines the tile and token sheets in the game box. It is an array of complex data structures each of which describes a tile or token sheet. There are actually three different types of sheets on a tray. The type key defines the type for each sheet in the array.
The Tile Sheet Type
The sheets with a type value of tile are tile sheets. The tName key defines the menu name for the sheet. The imgLoc key defines the location of the tile sheet image file. The next group of keys define the values that locate the actual tiles on the tile sheet image file.
Finally the tile key defines an array of values (one for each tile) that specify the the number of duplicates of that tile in the game box and the number of rotations that exist for each tile.
The Board Token Sheet Type
The sheets with a type value of btok are board token sheets. The first part of a board token sheet is the same as a tile sheet. But there is no tile key. Instead a token key defines an array of values (one for each token) that specify the the number of duplicates of that token in the game box and whether the token can be flipped. (i.e.: does it have a back side.)
The Market Token Sheet Type
The sheets with a type value of mtok are market token sheets. A market token sheet is the same as a board token sheet with one exception. The token key defines an array of values (one for each token) that specify only whether the token can be flipped. There is no 'number of duplicates' field for mtok.
The JSON Links Data Structure
The data structure in the game box JSON file with the key of links defines the HTTP links associated with the game box. It is an array of data structures each of which describes a link to a useful file that is associated with the game box.