Defining Custom Games
Card Game Simulator allows users to download custom card games to use within the application.
CGS Core Concept
A custom game in CGS is a specification for a collection of information about a card game. This information primarily includes sets of cards and a definition of what properties those cards have. Ancillary information can include decks and boards to use with the game. See below for the full specification.
CGS games directory
Custom games are created with a new folder within the persistent games data directory. The location of this persistent data directory varies depending on platform. Some examples include:
- Android: /Data/Data/com.finoldigital.cardgamesim/files/games/
- Mac: ~/Library/Containers/com.finoldigital.CardGameSimulator/Data/Library/Application Support/com.finoldigital.CardGameSimulator/games
- Windows: C:\Users\<user >\AppData\Local\Packages\FinolDigitalLLC.CardGameSimulator_499qk536pdy94\LocalState\games
Custom game folder structure
The structure of this custom game folder is:
- Game:Id/
- Game:Name.json
- AllCards.json
- AllDecks.json
- AllSets.json
- Banner.<bannerImageFileType>
- CardBack.<cardBackImageFileType>
- PlayMat.<playMatImageFileType>
- boards/
- GameBoard:Id.<gameBoardFileType>
- …
- decks/
- Deck:Name.<deckFileType>
- …
- sets/
- Set:Code/
- Card:Id.<cardImageFileType>
- …
- …
- Set:Code/
JSON File Structure
The GGS AutoUpdate Url that is used to download a card game is actually a pointer to the Game:Name.json file. CGS generates the rest of the folder structure based off that CardGameDef.json file.
You can create your own json and validate against these schema:
Examples
The default examples can be found in the CGS GitHub Repository. Further examples can be found in the CGS Google Drive folder.