Skip to main content

First Battle

GCS ยท Quick Start

Take one demo encounter from Play to the reward screen: read the board, land a card, survive the enemy turn, win.

For your first ten minutes with GCS. Nothing gets authored here; the goal is proof that the battle loop runs in your project.

GCS ships 12 playable battle scenes, and playing one is the quickest way to understand the runtime. This page follows the Hunter's first encounter, Fenmoss Hollow, from pressing Play to picking a victory reward, and tells you what to check at each step.

Do this right after Installation and Initialization. Resist the urge to edit content first: get a known-good battle running, then customize.

Open a demo battle sceneโ€‹

The demo scenes live under:

Assets/TinyGiants/GameCardSystem/Demo/Scenes/<Class>/<n>-<Name>.unity

Four class folders (Hunter, Mage, Priest, Warrior), three scenes each, ordered by tier: scene 1 is a normal fight, scene 2 an elite, scene 3 a boss. This walkthrough opens Hunter/1-Fenmoss Hollow.unity. Any first scene behaves the same way; the screenshots follow the Hunter.

Every demo scene comes fully wired, but it helps to know what "wired" means before you build your own:

Scene objectWhat it provides
GameCardManagerThe active preset databases the battle reads its content from.
GameCardEncounterBootstrapThe Default Encounter for this scene and the Auto Start On Play toggle.
Battle UIHand, unit, energy, intent, status, reward, and result widgets.
Player and enemy anchorsThe positions where units spawn on the board.

With the scene open, you should see all four of these in the Hierarchy before you press Play.


Start the battleโ€‹

Press Play. Every demo scene has Auto Start On Play enabled on its bootstrap, so the encounter begins on its own.

At battle start, GCS builds the player and enemies from the encounter, shuffles the starting deck into the draw pile, draws the opening hand, raises OnBattleStarted, rolls enemy intents, and hands control to you. You should see the board settle into this state:

Fenmoss Hollow at battle start: a five card opening hand, three energy, and the enemy already showing its intent


Read the boardโ€‹

In Fenmoss Hollow the opening turn looks like this: five cards in hand (Poison Arrow, two Strikes, Insight, Defend), 3 of 3 energy, 12 cards left in the draw pile, your Hunter at 70 of 70 HP, and one enemy at 16 HP with an intent icon above its head.

UI areaWhat it tells you
HandThe cards you can play this turn.
EnergyThe resource cards cost. It refills at the start of your turn.
Player unitYour HP, armor, and any statuses on you.
Enemy unitsEnemy HP, statuses, and the intent icon telegraphing the next enemy action.
Pile countersHow many cards sit in the draw, discard, and exhaust piles.

If the hand comes up empty, the encounter has no valid starting deck or a card database is missing from the manager. That is a content problem, not a scene problem, and the Workbench is where you would fix it.


Play a cardโ€‹

Poison Arrow costs 1 and does exactly what its text says: deal 3 damage, apply 2 Poison. Play it on the enemy and compare your board against the screenshot: the enemy drops to 13 of 16 HP and gains a Poison icon at 2 stacks, your energy falls to 2, and the discard pile counts 1.

After Poison Arrow resolves: the enemy at 13 of 16 HP with two stacks of Poison, two energy remaining, one card in the discard pile

Behind that one click, GCS paid the energy cost, raised OnCardPlayed, executed the card's behavior graph, and moved the card to the discard pile.

Whether a card asks you to pick a target depends on the Target Mode stored on the card definition. Poison Arrow uses SingleEnemyUnit, which is why it wants an enemy:

Target ModeBehavior
SingleEnemyUnitPick one enemy.
AllEnemyUnitsJust play it; every living enemy is affected.
SelfJust play it; the effect lands on the player.
NoneJust play it; the card's graph decides who is affected.

If a card refuses to play, the runtime rejected it for one of these reasons:

  • It is not currently the player phase.
  • The card is not in the hand pile.
  • Energy is below the card's effective cost (cost modifiers count).
  • The card carries the Unplayable keyword.
  • A status hook cancelled the play.

End the turnโ€‹

Press the end turn button. GCS discards or retains cards according to the battle rules and keywords, runs end-of-turn status behavior, then hands the board to the enemy phase: each living enemy executes its behavior graph, takes the action its intent promised, and picks a new intent. Then turn two begins with a fresh hand.

Turn two of Fenmoss Hollow: a fresh five card hand, the enemy at 11 of 16 HP with one stack of Poison left, and a debuff icon under the player&#39;s HP bar

Two things changed while the enemy had the board, and both are worth spotting. Poison did its work: the enemy took damage equal to its stacks (13 down to 11) and the stack count decayed from 2 to 1. And the enemy's own action left a debuff icon under your HP bar. The pile counters moved too: 7 in the draw pile, 5 in the discard.

Intents are promises

The icon above an enemy is its next action, decided at the end of the previous turn. How much an intent reveals is a battle rule on the encounter; the demo encounters show full intents, so you can always play around what is coming.


Win and pick a rewardโ€‹

Keep attacking until the enemy falls. Victory brings up the reward screen: three cards drawn from the encounter's reward pool, a +1 Max Energy option, a permanent -1 Cost (All Cards) discount, and a Skip button.

The victory reward screen offering Volley, Perfect Shot, and Discover, alongside the +1 Max Energy, -1 Cost, and Skip options

Code can hear both moments: GCSEventNames.OnBattleRewardOffered fires when the choices appear, and OnBattleEnded reports the outcome. On defeat, its args carry Won = false.


What success looks likeโ€‹

The battle loop is healthy in your project when all of these hold:

  • The encounter starts in Play Mode and the opening hand appears.
  • Affordable cards can be played and their effects change HP, armor, energy, and statuses.
  • The end turn button hands control to the enemies, and intents change between turns.
  • The battle reaches the reward screen or a defeat state with no console errors.