Skip to content

gamefile.jsonDefine your game with JSON, from cards and decks to gameplay.

A guide for TCG Arena game creators.

What this file does ​

A gamefile.json describes a game end to end: its name, how a legal deck is built, what happens on each turn, which board sections exist (units, ressorces, token zone...), and how they're laid out visually. The engine reads this file and renders the matching game. You never touch the engine's code.

Examples. You can find full game files from complete games on Discord.

Top-level structure ​

KeyContains
nameThe game's display name
deckBuildingPlayable formats and deck-construction rules
gameplayOne block per format: mulligan, turn structure, tokens, board layout
defaultRessourcesDefault background images and a link to prebuilt decks
cardsWhere card data and the card-back image come from

Quick start ​

This is the smallest valid file: a single section, nothing optional.

json
{
  "name": "My Card Game",
  "deckBuilding": {
    "mainFilters": ["type", "cost"],
    "formats": [
      { "title": "Standard format", "gameplay": "Standard" }
    ]
  },
  "gameplay": {
    "Standard": {
      "mulligan": { 
        "startingHandSize": 5 
      },
      "newTurn": { 
        "drawPerTurn": 1 
      },
      "countersStartingValues": [],
      "sections": {
        "layout": {
          "direction": "column",
          "content": [{ "section": "Board" }]
        },
        "sectionsDict": {
          "Board": { "isHidden": "no", "height": "MEDIUM", "alignment": "CENTER" }
        }
      }
    }
  },
  "cards": {
    "dataUrl": "https://example.com/cards.json",
    "cardBack": "https://example.com/card-back.jpg"
  }
}

General information ​

Top-level fields that identify the game and its global behaviour.

FieldTypeRequiredDescriptionExample
nameSrequiredName of the game, shown in the game picker. "My Card Game"
menuBackgroundImageSoptionalURL of a background image for the menu screen. "https://example.com/bg.jpg"
cardRotationNoptionalRotation in degrees applied to tapped cards. Default is 45 degrees.<format>. 90
customHelpSoptionalText shown to players in the Help menu in game. Supports \n for line breaks. "Drag a card onto the mana zone to add it as a resource."
translationsUrlSoptionalURL of a JSON file with UI and card text translations. "https://example.com/translations.json"

Resources & cards ​

Where the game's content lives: background images, prebuilt decks, and the card data itself.

Where the game's content lives.

FieldTypeRequiredDescriptionExample
defaultRessources.backgrounds[]optionalBackground images offered to the player by default. ["https://example.com/bg1.jpg"]
defaultRessources.decksUrlSoptionalURL of decks.json, the array of prebuilt starter decks, see the Card & deck files panel. "https://example.com/decks.json"
cards.dataUrlSrequiredURL of the JSON file containing all cards for this game. "https://example.com/cards.json"
cards.cardBackSrequiredImage shown for a face-down card. "https://example.com/back.jpg"
cards.cardBackColorSoptionalColor used for the card-pile height effect on decks. "#c8bdb3"
cards.extraCardBacks{}optionalAlternate card-back images per card type, e.g. a distinct back for "Legend" cards. { "Legend": "https://example.com/legend-back.png" }
cards.versionNoptionalOnly worth setting for a very large card file (~20MB+): it lets returning players skip re-downloading cards.json when nothing changed. Not needed for a typical-sized game. 28

Where to go next ​

Five panels cover the rest of the configuration, each focused on one specific part: