CGDSL is a specialized VS Code extension for designing and visualizing card game logic. It provides a formal language to describe game rules, state transitions, and card behaviors, offering real-time feedback through visual graphs and structured data.
🚀 Features
Syntax Highlighting & Diagnostics: Full language support for .cgdsl files with real-time error checking.
Automatic FSM Generation: Automatically generates a Finite State Machine (FSM) of your game flow in .dot (Graphviz) format.
Visual Diagrams: Renders your game logic into .svg diagrams for easy documentation and debugging.
Data Serialization: Compiles your game description into a structured .json file, ready to be imported into your game engine or backend.
🛠️ How to Use
Create a new file with the .cgdsl extension.
Define your game states, players, and card logic.
The extension automatically maintains three outputs in your workspace:
*.dot: The raw graph description for Graphviz.
*.svg: A high-resolution visual map of the game's Finite State Machine.
*.json: The serialized game data for programmatic use.
📋 Requirements
Platform Support: Includes native binaries for Linux, Windows, and macOS.
⚙️ Extension Settings
This extension contributes the following settings:
cgdsl.outputDirectory: Specify a custom subfolder where .svg and .json files should be saved.
cgdsl.enableLivePreview: Toggle whether images are re-generated automatically on every save.