Skip to main content

Overview

Guide

GameCardSystem (GCS) is TinyGiants' visual card roguelike battle framework for Unity. It covers the complete workflow from content authoring to runtime. ScriptableObject-based Workbench modes let you create cards and battle content visually, while the built-in FlowGraph system can reproduce classic card mechanics from games such as Slay the Spire and Night of Full Moon without writing code. A complete low-level API and event surface remains available when a project needs deeper runtime extensions.

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

The image above shows the complete GCS workflow from content authoring to Play Mode verification. Game Card Editor defines cards and battle content. FlowGraph Editor arranges gameplay rules into Behaviors. Play Mode executes the battle, and Game Card Monitor returns state and execution records to the authoring process. All four stages use the same content and runtime, so you can follow a mechanic from its asset definition to its live result and then revise it using concrete runtime evidence.

When a project needs a custom HUD, map, quest, or save system, GCSApi and Events connect those systems to the same battle. Custom nodes, ports, and content registries also use the existing FlowGraph and authoring interface instead of introducing a separate battle implementation.

Enter the complete workflow through scene initialization

The practical entry point to GCS is a runnable scene foundation. Once the Manager, Bootstrap, and content databases are ready, content definitions and Behaviors can enter Battle Runtime. Monitor, the API, and events then carry the result back to the authoring tools and into other project systems.

The diagram above connects scene initialization, content authoring, behavior design, battle execution, diagnosis, and code integration in one repeatable workflow. The editors establish content and rules, the runtime produces results, Monitor supplies evidence, and the API and events connect the same battle to the rest of the project. This relationship defines the main capabilities and working model of GCS.

CapabilityCore scaleDirect value to your project
Visual content authoring6 editing modesCreate cards, decks, players, enemies, statuses, and encounters in one window
Visual gameplay authoring147 available nodes and 103 mechanic recipesCombine nodes to express card, status, and enemy behavior
Runtime and code integration147 public GCSApi members and 43 built-in eventsRead, control, 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 content12 battles, 80 cards, 16 enemies, and 30 statusesRun finished content, then inspect its configuration in the production assets

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

Cards are the main authored action; the preset content ships with 80 cards across five broad card types and four rarity levels, enough to show attacks, skills, bursts, support effects, curses, cost changes, multi-hit cards, status application, card generation, and deck manipulation

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

Player units define the controlled character: HP, energy display, starting deck, class tag, prefab, and preview art; the demo includes four class lines: Warrior, Mage, Hunter, and Priest

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

Enemies define the other side of the battle; the 16 shipped enemies cover normal, elite, boss, and summon roles, each driven by an intent behavior graph rather than hard-coded AI

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

Statuses model buffs, debuffs, counters, and rule modifiers; the 30 shipped statuses cover damage-over-time, shields, strength/dexterity-style modifiers, control states, 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 147 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 above places all three Behavior types and Group on the same canvas system. Cards resolve from card play or lifecycle entries. Statuses respond to battle timing and Hooks. Enemies select actions through Intent Patterns. Group organizes a dense section of connections without changing execution. The 147 available nodes consist of 145 core nodes and 2 Demo FX extension nodes.

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
Get19Read 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

These systems maintain the final battle result together. When the screen cannot explain where a result came from, Game Card Monitor places live state and the execution process in one diagnostic window.

Verify results with Game Card Monitor

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

The seven tabs above provide both result evidence and process evidence. Battle, Pile, and Unit confirm the current battle, piles, and unit state. Phase, Gate, Flow, and Event show where the process stopped, which nodes were visited, and whether the corresponding event fired.

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 single entry point for project code that accesses a battle. A HUD, map, quest, save system, or development tool can use it to start battles, submit player actions, read state, mutate the battle through supported paths, and subscribe to events. Project code and visual content always drive the same battle state.

The smallest integration selects an Encounter and submits player intent. The actual battle rules still come from content assets and Behaviors.

using TinyGiants.GCS.Runtime;

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

GCSApi guide provides complete examples in integration order. API reference lists every public member. Event guide and Event reference explain how to subscribe to the 43 built-in events and when each one fires.

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

The included Demo combines the authoring tools, FlowGraph, runtime, presentation interfaces, and extension model into finished content that runs directly. Warrior, Mage, Hunter, and Priest each have Normal, Elite, and Boss battles. All 12 scenes use the production toolchain, and you can trace each one back to its databases, content assets, and Behaviors.

Demo contentCountComposition
Playable scenes12Four classes × Normal, Elite, and Boss
Encounters12One Encounter for each scene
Player units12Four classes × Novice, Veteran, and Master
Enemies16Four classes × Normal, Elite, Boss, and Summon
Cards806 Basic, 20 Support, 40 Skill, 12 Burst, and 2 Curse
Decks1612 class starting decks and 4 reward decks
Statuses3015 Buffs and 15 Debuffs

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.

This finished content also provides engineering evidence that the same toolchain covers multiple class builds, normal battles, elite battles, boss phases, summons, complex statuses, and post-battle rewards.

Engineering boundaries for production projects

Engineering areaIncluded foundation
Unity and render pipelinesSupports Unity 2021.3 and later, with Unity 6 recommended. 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
Extend nodes and content typesCustom nodes, Custom ports, and Execution context
Diagnose authoring or runtime problemsProblem index, Authoring problems, and Runtime problems