Asset types#

Object#

An object in Tabletop Club refers to anything in-game that is dynamic (that is, it is driven by the physics engine). There are many different types of objects, each with their own special functionality:

Board#

An empty chess board on a table.

Boards are generic objects with no special functionality. In this way, they are equivalent to Piece, with the exception that they are placed in a separate type in the objects menu.

Card#

A row of five cards in a white rectangle representing the player's hand, from left to right, they are the ace of clubs, the ace of diamonds, the ace of hearts, the ace of spades, and a card that is facing down. The text "player" is shown in front of the hand.

Cards are flat, rectangular-shaped objects that are stackable, and they have the unique functionality to be able to be put in a player’s hand, where only the player whose hand it is can see the front face of the card.

Unlike other objects, you need two separate textures for cards - one for the front face, and one for the back face. The game registers each of the textures in the cards/ folder as the front face of a card, but you need to tell the game where to find the back face in the config.cfg file.

Cards also have a fixed thickness, so you only have to set the width and height value.

Here is a simple example that will apply a back face texture (in this example, BackFace.png) to all of the cards in the folder:

; cards/config.cfg
[*]

; Width (6.35) and height (8.89) in cm
scale = Vector2(6.35, 8.89)

; Set the back_face for all cards
back_face = "BackFace.png"

[BackFace.png]

; If we don't ignore the back face, then a card with both sides being the
; back face will be imported.
ignore = true

Container#

A red plastic cup is placed near the corner of a table.

Containers are special objects that can hold an unlimited amount of other objects inside themselves (including other containers)! Containers are opaque, meaning you cannot see the objects physically inside of them, but you can peek inside a container by right-clicking it and pressing Peek inside, which will open a pop-up showing the contents of the container.

Objects can be placed inside a container by touching the container with the object you want to add, and objects can be randomly removed from the container by quickly dragging from the container.

Containers can also be configured to drop items out when they are shaken upside-down by setting shakable = true in the config.cfg file.

Dice#

On the table is a set of dice of varying colours and sides.

Dice are objects that, when shaken, randomize their orientation.

They can also be configured to report certain values depending on their orientation in the config.cfg file, using the face_values property:

; dice/d6/config.cfg
[*]

face_values = {

   ; This is the format of an entry in face_values:
   ; A number, followed by a semi-colon, followed by a Vector2. Each Vector2
   ; has two numbers inside, followed by a comma if it is not the last entry.
   1: Vector2(0.0, 0.0),

   ; The two numbers inside the Vector2 correspond to the rotation in the
   ; x-axis (left/right), and the z-axis (forward/back), respectively.
   ; If you are not sure what these numbers should be, you can use the
   ; Transform menu in-game to manipulate the dice and find out what the
   ; rotation is for each face of the dice.
   2: Vector2(0.0, 90.0),

   3: Vector2(-90.0, 0.0),
   4: Vector2(90.0, 0.0),
   5: Vector2(0.0, -90.0),

   ; Alternatively, the Vector2 and the number may swap places.
   ; This allows multiple rotations with the same value.
   ; Values given this way may be null, numbers, or strings.
   ; Values that can't be parsed as numbers are totalled as 0.
   Vector2(180.0, 0.0): "6"
}

If the face values are configured correctly, then the player will easily be able to check the total of a set of thrown dice by selecting, then right-clicking the dice. The total will be shown at the top of the context menu.

If face_values is not configured, the dice will always report 0 as its value.

Piece#

On the table are two chess pieces, a white pawn and a black queen.

Pieces are generic objects with no special functionality.

Speaker#

By the corner of the table is a large, metallic gramophone.

Speakers are objects that can play audio tracks. They can be configured to emit sound positionally, so the audio will vary depending on the position of the speaker relative to the camera.

Timer#

Timers are objects that can be used as countdowns, stopwatches, or to display the system time. If an audio track is loaded, it will automatically play when the countdown reaches 0.

Token#

On the table are some stacks of poker chips varying in height, representing various values, those being 1, 5, 10, 25, and 100.

Tokens are objects that are vertically stackable, meaning they join together when their top and bottom faces touch, similar to cards.

Sound#

Sounds can be played through either a Speaker or a Timer.

Music#

Music tracks are the same as sounds, but they can also be configured to play in the main menu. See the main_menu property in config.cfg.

Game#

A game is a Save File that has been pre-made such that players can instantly setup the table to play a particular game.

Note

If there is an image next to the save file with the same name, it will be shown next to the save file in-game.

Skybox#

Skyboxes are special textures that determine what the environment around the table looks like.

Skybox textures in Tabletop Club use equirectangular mappings, as opposed to six-image cube mappings. Godot recommends using this tool to convert cube-mapped skyboxes to equirectangular skyboxes.

For the best lighting quality, it is recommended to use a HDR panorama. Tabletop Club supports the Radiance HDR (.hdr) and OpenEXR (.exr) formats.

Note

If the skybox is either too bright or too dim, then you can change the strength of the ambient light generated by the skybox by setting the strength value in the config.cfg file.

Table#

A table is a 3D Model that is placed in the centre of the game world for players to put objects on.

However, unlike custom objects, the position and scale of the exported model matters. Keep the following points in mind when you export models to be used as tables:

  • One unit in the exported model = one centimeter (cm) in-game.

  • The lowest vertical position the camera can zoom to is 0 (this is either the y or z axis, depending on the program you’re using).

Tables also have a set of hand positions, which are assigned to players by the server when they join the game. These hand positions can be defined in the config.cfg file:

; tables/config.cfg
[Table.gltf]

hands = [
   ; The first player's hand will be facing forward.
   { "pos": Vector3(0, 5, -50), "dir": 0 },

   ; The second player's hand will be in front of the first player's hand,
   ; but it will be facing backwards.
   { "pos": Vector3(0, 5, 50), "dir": 180 },

   ; The third player's hand will be to the side, facing right.
   { "pos": Vector3(-50, 5, 0), "dir": -90 },

   ; The fourth player's hand will be on the other side, facing left.
   { "pos": Vector3(50, 5, 0), "dir": 90 },

   ; You can add more hand positions here...
]

Tables can also be painted on by the players! You can set the size of the area that the players can paint on by setting the paint_plane property in the config.cfg file.

Template#

An example of a template being used by the notebook to keep track of player's scores over a number of rounds.

A template is a pre-made page for the in-game notebook. It can either be an Image or a text file (.txt).

If it is a text file, then the page itself will also resemble a text file. If it is an image, then textboxes can be configured using the config.cfg file so the player can save text on top of the image.

The template can be selected when creating a new page in the notebook.

Textboxes for image templates can be configured in the following ways:

; templates/config.cfg
[Template.png]

textboxes = {
    ; Each textbox must at the very least have an ID, which helps the game
    ; keep track of which text belongs to which textbox.
    "the first id": {},

    ; Most of the time, you will want to adjust the position and size of the
    ; textbox. This can be done with the "x" (horizontal position), "y"
    ; (vertical position), "w" (width), and "h" (height) entries, which
    ; correspond to the pixels of the image. Note that the origin (0, 0) is
    ; at the top-left of the image, and the position defined by "x" and "y"
    ; is where the top-left corner of the textbox will be.
    "pos_size": { "x": 50, "y": 100, "w": 500, "h": 350 },

    ; You can also rotate the textbox by setting the number of degrees
    ; clockwise it should be rotated by using the "rot" entry. Negative
    ; values also work, and will rotate it anti-clockwise.
    ; Note that the textbox pivots around its top-left corner, so keep that
    ; in mind when positioning it.
    "rotated": { "rot": 90 },

    ; You can set a default value for the textbox by using the "text" entry.
    "default": { "text": "Default value goes here!" },

    ; By default, textboxes only have one line of text. If you want, you can
    ; make them have as many lines as you want, up to a maximum depending on
    ; the height of the textbox. If a textbox has multiple lines, the player
    ; can also scroll within the textbox itself. This example sets the
    ; textbox to have three lines of text:
    "multiline": { "x": 100, "y": 500, "w": 500, "h": 500, "lines": 3 }
}