Skip to main content

Overview

Guide

Build Unity card roguelike battles with visual content and rule editors. Use GCSApi and battle events to connect your game's UI, progression, and saves.

The complete GCS visual authoring workflow, including Game Card Editor, FlowGraph, Play Mode, and Game Card Monitor

The image follows a card from its definition in Game Card Editor to its Behavior in FlowGraph. When you play that card, Game Card Monitor shows the state changes and execution history. Use those records to adjust the card or its graph.

Enter the complete workflow through scene initialization​

The diagram starts with Initialize System, which connects the scene to the Manager and content databases. After you create and play an Encounter, inspect it in Monitor or read the same battle through GCSApi and events.

CapabilityCore scaleDirect value to your project
Visual content authoring6 editing modesCreate cards, decks, players, enemies, statuses, and encounters in one window
Visual gameplay authoring148 available nodes and 103 mechanic recipesCombine nodes to express card, status, and enemy behavior
Runtime and code integration176 public GCSApi member names and 48 built-in eventsRead, control, save, restore, and extend battles while connecting project flows and custom UI
Play Mode diagnosis7 Monitor tabsCheck live state, wait sources, Flow execution summaries, and event history
Included finished content13 battles across 2 database setsPlay the 12 single-character battles or open the Party Showcase to try shared turns and ally targeting

Build battle content on the scene foundation​

Open Game Card System and click Initialize System. GCS creates or reuses GameCardManager and GameCardEncounterBootstrap, adds the battlefield, hand, HUD, and presentation objects, and registers the six preset database types. Once initialization finishes, you can author content or start a fixed Encounter.

Game Card System after initialization, with the Manager, six database types, and Bootstrap ready

When the Manager, six database types, and Bootstrap are all ready in the panel, the scene has a working battle entry point. Battle scenes explains each object's responsibility, while Starting a battle distinguishes fixed and dynamic entry points.

The six Game Card Editor modes, covering Card, Deck, Player, Enemy, Status, and Encounter

Game Card Editor keeps List, Inspector, and Preview synchronized around the current content. List manages databases and entries. Inspector edits the definition and its Behavior. Preview checks appearance, composition, behavior summaries, and direct references. All six modes also share search, filtering, sorting, Undo/Redo, Validation, and Used By, so after completing one content type you can follow its references into the next.

ContentMain definitionResponsibility in battle
CardsName, description, cost, type, Target, keywords, art, and BehaviorPlayer actions, card lifecycle, and resolution rules
DecksCard entries and copy countsContent sources for the Starting Deck, Reward Deck, and Master Deck
Player unitsHP, energy, starting deck, Prefab, and resource displayPlayer units, starting resources, and character presentation
EnemiesHP range, Tier, Prefab, Intent, and BehaviorPreview and execute enemy actions
StatusesBuff/Debuff identity, stacking, cap, decay, icon, and BehaviorPersistent effects, rule changes, counters, and turn responses
EncountersPlayer, enemy lineup, reward deck, and Battle RulesAssemble existing content into a battle that can start and resolve

The single-character Demo database has 80 cards across 5 types and 4 rarities. Party Showcase uses a separate database with Strike, Defend, and four cards that target allies. The cards cover attacks, skills, bursts, support, and curses, with examples of cost changes, multi-hit attacks, status application, card generation, pile movement, and ally targeting.

Workbench Card mode editing a finished card with its inspector and live card preview

In Player, set a unit's HP, energy display, Starting Deck, class tag, Prefab, and preview art. The Demo includes Warrior, Mage, Hunter, and Priest.

Workbench Player mode showing a player unit, starting deck, and preview

In Enemy, open the Behavior to see how an opponent chooses and performs its Intents. The 16 single-character Demo enemies cover normal, elite, boss, and summon roles.

Workbench Enemy mode showing an enemy unit with attributes, behavior, and intent preview

In Status, set stack and decay rules, then use Behavior to respond to battle events. The 30 single-character Demo statuses cover damage over time, shields, reactive damage, regeneration, and Hook-based rule changes.

Workbench Status mode showing status identity, stack rules, behavior, and usage information

These six content types are stored as ScriptableObject sub-assets in their databases. When a battle starts, GCS creates independent card, unit, status, and pile instances from those definitions. Runtime values such as HP, cost, and status stacks change only on the instances and never write back to the source assets. Database management explains how content is organized and activated. Definitions and runtime instances covers the boundary between static definitions and runtime data.

Game Card Editor defines which objects exist in a battle and how they reference one another. The actual behavior of Cards, Statuses, and Enemies belongs to their FlowGraph Behaviors.

Combine gameplay behavior with 148 nodes​

Cards, Statuses, and Enemies each have their own Behavior but share the same nodes, ports, and execution context. Entry nodes determine when execution starts. Control connections organize order and branches, while data connections carry units, cards, sets, and calculated results. When a fixed field cannot express a dynamic rule, you can turn it into a port and accept upstream data.

Card, Status, and Enemy Behaviors with a collapsible Group subgraph

The image shows cards, statuses, and enemies on the same FlowGraph canvas. Cards start from a play or lifecycle Entry, statuses respond to battle events through Entries and Hooks, and enemies choose actions through Intent Patterns. Use the library's 146 core nodes and 2 Demo FX nodes to build these Behaviors, and group related nodes without changing their execution order.

Node familyCountMain responsibility
Entry33Start a Behavior from battle, turn, card, unit, status, energy, or event timing
Hook18Modify or cancel damage, armor, healing, energy, draw, cost, and other results before commit
Action27Modify HP, armor, energy, cards, statuses, variables, turns, and units
Operator22Compare, calculate, filter, sort, select, combine, and convert data
Get20Read units, cards, piles, statuses, variables, and event arguments
Flow10Organize branches, loops, sequences, Choice, Switch, Wait, and Gate
FX7 + 2 DemoRequest VFX, SFX, animation, floating text, movement, flashes, and camera feedback
Intent6Build enemy intent leaves, sequences, random patterns, and HP-threshold patterns
Event2Raise internal GCS events or optional GES events
Group1Organize a complex canvas without changing its real execution relationships

FlowGraph basics explains control flow, data flow, context, and evaluation. Node overview provides an entry point for every family. The three recipe libraries organize common mechanics into 103 editable FlowGraphs.

Mechanic rangeRecipe entry point
Multi-hit attacks, X-cost cards, draw and discard, discover, replay, transform, cost, and card lifecycle52 card recipes
Poison, burn, strength, vulnerable, thorns, barricade, silence, revival, equipment, and global rules30 status recipes
Intent sequences, weighted random behavior, boss phases, summoning, splitting, escape, deck disruption, and cross-system events21 enemy recipes

These recipes use only production nodes and runtime systems. After copying one, you can continue changing ports, fields, and target sources. Once the Behavior is complete, it produces cost changes, target selection, damage, statuses, pile movement, and presentation requests in Play Mode.

Execute and verify rules in Play Mode​

When a player plays a card, GCS checks the current Phase, hand ownership, effective cost, target, keywords, and Hooks. Once the action is accepted, it executes the Card Behavior and uses the Controller to update damage, armor, statuses, and piles. The card then enters Discard or Exhaust. A Behavior can use Choice, Wait, or Gate when it must pause for a player selection or a specific process. Ordinary VFX, SFX, and animation requests do not block the phase automatically.

A live Hunter battle with the player, three enemies, hand, energy, piles, and intents

The player and enemy HP, card costs, energy, pile counts, enemy intents, and current turn shown above all come from the same battle state. Encounter defines the initial lineup and rules. Behaviors resolve mechanics, while the battle state machine advances turns, enemy actions, Choice, Reward, and victory or defeat.

Runtime scopeResponsible resultRead next
Battle lifecycleInitialization, player turns, enemy phases, victory, defeat, Choice, and RewardBattle flow, Battle lifecycle
Cards and pilesDraw, Hand, Discard, Exhaust, and the Master Deck across battlesCard and pile lifecycle
Target selectionSelf, Opponent, All, Selector, random targets, and player choiceTarget selection
Statuses and HooksStacking, decay, sources, Behaviors, and modification before commitStatus lifecycle
Presentation and waitsUI, VFX, audio, animation, Wait, Gate, and ChoiceCustom UI integration, FX nodes, and Flow nodes
Scene and startupManager, Bootstrap, Battle Board, Hand, HUD, and PresentationBattle scenes, Starting a battle
Save and continueRun and settled battle checkpoints, local slots, existing save providers, and scene restorationSave and restore

Verify results with Game Card Monitor​

The seven live Game Card Monitor tabs: Battle, Pile, Unit, Phase, Gate, Flow, and Event

Start with Battle, Pile, or Unit to check the current state. Use Phase, Gate, Flow, or Event to trace how the battle reached it.

TabWhat you can inspect
BattleEncounter, Phase, Turn, player, enemies, Pending Intent, and wait state
PileHand, Draw, Discard, Exhaust, and Master Deck
UnitHP, armor, energy, status stacks, alive state, and Pattern Walk
PhasePhase transition history and Choice Pending
GateHolder, Active Reasons, and Acquire/Release records
FlowBehavior Owner, Trigger, visited node count, and synchronous execution time
EventEvent timeline, Payload summary, and subscriber count

Game Card Monitor explains every field and the inspection order. Problem index starts from startup, card play, status, event, and presentation symptoms and leads to the matching repair path. Monitor confirms what happened in the battle. GCSApi lets project code read that result and submit the next action.

Integrate the project through GCSApi and extend it further​

GCSApi is the entry point for project code that accesses a battle. HUD, map, quest, save, and development systems can use it to start battles, submit player actions, read and safely update state, and subscribe to events. These calls and the visual Behaviors operate on the same battle state. A minimal integration only needs to select an Encounter and submit player actions. The content assets and Behaviors define the battle rules.

using TinyGiants.GCS.Runtime;

GCSApi.StartBattle(encounter);
bool played = GCSApi.TryPlayCard(card, target);
GCSApi.EndPlayerTurn();

GCSApi guide shows how to submit actions, and API reference lists signatures. Use Event guide to subscribe and Event reference to check when each of the 48 events fires.

Connect Save and Quit and Continue through GCSSaveController. The player resumes with the saved piles, units, statuses, Hooks, enemy plans, delayed effects, and reward choices. Save and restore also shows how to store the checkpoint with your game's own data.

When a project needs its own mechanics, extensions continue to use the same FlowGraph and runtime contracts.

Extension pointUse caseDocumentation
Custom nodesAdd gameplay actions, data sources, selectors, operators, or presentation requestsCustom nodes
Custom portsInfer field inputs or declare result outputs, choices, and control branchesCustom ports
Execution contextRead inputs and targets, mutate state through the Controller, and publish resultsExecution context
Types, tags, and description tokensAdd project classifications, filter dimensions, and dynamic card textCard types, tags, and description tokens
Copyable samplesStart from seven family templates and seven matching finished nodesCustom nodes

Four registries discover nodes, card types, tags, and description tokens that follow the contracts, so you do not maintain a manual registration list. If the project also uses GameEventSystem, GES integration creates a two-way channel between FlowGraph and the external event system.

Inspect complete finished content in the included Demo​

Open a Normal, Elite, or Boss scene for Warrior, Mage, Hunter, or Priest. Open Party Showcase to play three members with one hand and energy pool. Each battle's assets and Behaviors are editable in Workbench and FlowGraph.

Demo contentCountComposition
Playable scenes13Twelve class battles plus Party Showcase
Single-character database set12 Encounters, 12 Players, 16 Enemies, 80 Cards, 16 Decks, 30 StatusesThe original four class lines and their complete reusable content
Party database set1 Encounter, 3 Players, 3 Enemy definitions, 6 Cards, 1 Deck, 5 StatusesScout, Squire, and Apprentice share Party Tactics against a Normal, Elite, and Boss Hunter enemy

Demo overview explains the databases and content scale. Demo battle scenes shows every lineup and live battle view. Demo content reference and Asset layout connect the scene results back to the content assets and their file ownership.

Engineering boundaries for production projects​

Engineering areaIncluded foundation
Unity and render pipelinesSupports Unity 2021.3 LTS from 2021.3.18f1, Unity 2022.3 LTS, and Unity 6. The Demo supports the Built-in Render Pipeline and URP
Runtime dependenciesThe GCS runtime has no third-party dependencies. Transitions and procedural animation use TinyGiants' own TGTween
Content stabilityScriptableObject sub-assets store definitions, Unity references connect content, Active Database controls active discovery, and GUIDs support content lookup
Authoring safeguardsGame Card Editor provides Undo/Redo, Validation, Used By, and cross-database copy. FlowGraph Editor checks node identity, Host, and port structure
Runtime consistencyThe Controller submits mutations, Hooks modify or cancel them before commit, events broadcast changes, and explicit Gates wait for presentation work
Diagnostic accessMonitor displays Battle, Pile, and Unit snapshots and records Phase, Gate, Flow, and Event history

Installation and initialization gives the supported versions, import result, and first scene check. Project structure explains the boundary between package content and project data. Once both are clear, enter the tutorial, authoring guides, references, or troubleshooting section that matches your current task.

Choose the next step​

When evaluating GCS, start with the first battle or a Demo scene. When integrating it into a project, continue with the second battle, content authoring, or code integration. Use the remaining sections according to the task at hand.

Current goalRecommended entry point
Play one complete battleFirst battle
Build a custom battle from an empty sceneSecond battle
Understand content, Behaviors, and runtime mechanicsDatabase management, FlowGraph basics, Battle flow, and Runtime overview
Create cards and battle contentCards, Decks, Player units, Enemies, Statuses, and Encounters
Find a node or existing mechanicNode overview, Card recipes, Status recipes, and Enemy recipes
Integrate UI and project codeGCSApi guide, Custom UI integration, and Event guide
Save progress and continue laterSave and restore
Extend nodes and content typesCustom nodes, Custom ports, and Execution context
Diagnose authoring or runtime problemsProblem index, Authoring problems, and Runtime problems