Battle Scenes
Initialize System builds a complete playable battle presentation layer with only six root objects, reflecting a deliberately compact scene design
After the selected GameEncounter reaches GameCardManager, six root objects turn the player, enemies, piles, and phase state into a battlefield the user can see and control. Whether a fixed scene starts through GameCardEncounterBootstrap or a map, level, or quest starts dynamically through GCSApi.StartBattle, the same GameCardManager, Battle Runtime, Battle Canvas, and presentation objects take over the battle.
Initialize System builds the scene skeleton
Open an empty scene, use the following menu to open Game Card System, then click Initialize System:
Tools > TinyGiants > GCS > Game Card System
After the command finishes, the Hierarchy contains a scene skeleton ready for an Encounter and presentation changes.

The six root objects above divide battle startup, camera and input, background, unit and card interaction, HUD, and effects feedback into clear entry points. When replacing presentation or integrating project flows later, follow this Hierarchy to the corresponding surface:
| Root object | Core components | Responsibility in the complete path |
|---|---|---|
Main Camera | Camera, AudioListener, Physics2DRaycaster | Renders the world-space battlefield and sends pointer events to world-space cards with CardViewInput |
GameCardManager | GameCardManager, GameCardEncounterBootstrap | Registers databases, holds the current battle state, and provides the default Encounter startup entry in a fixed scene |
EventSystem | EventSystem, StandaloneInputModule | Sends pointer, Submit, Cancel, and button input to cards, the HUD, and temporary interfaces |
Background | SpriteRenderer, BattleBackgroundFit, BattleEncounterBackground | Fills the camera view and applies the Encounter icon or class background for fixed-startup scenes |
Battle Runtime | Battlefield, hand, Canvas, and Presentation children | Turns the player, enemies, piles, and battle phases into interactive scene content |
Battle Fx Directors | IntentThreatTelegraph | Plays separate visual and audio warnings when a high-threat Attack intent appears |
-
The Manager is found by its
GameCardManagercomponent, but an incompleteBattle Runtimeor another template root with the correct name is not replaced as a whole. -
A camera or EventSystem with equivalent behavior but a different name is not detected either.
-
Before initializing again, check the root names and internal structure. This prevents incomplete objects from remaining unrepaired or a second copy of the same service from appearing in the scene. Background components, sorting, and class-background configuration are still added or overwritten according to the rules above.
For the complete workflow from an empty scene through Encounter configuration, see Create Your Second Battle.
Startup, input, and background form the scene foundation
GameCardManager turns the Encounter into a runtime battle. Main Camera and EventSystem receive input for world-space cards and Screen Space UI, while Background supplies the battlefield image.
| Object | Template default | Boundary to preserve when modifying it |
|---|---|---|
Main Camera | Orthographic Size 5, position (0, 0, -10), full-screen Viewport, HDR and MSAA enabled | You can replace the composition, Render Texture, or camera stack. If world-space card input remains in use, the event camera must retain Physics2DRaycaster |
EventSystem | Navigation events enabled, Drag Threshold 10, input axes Horizontal, Vertical, Submit, and Cancel | You can replace it with the project's input module, but keep only one enabled EventSystem in the scene |
Background | Sorting Layer Background, Order -20, Overscan 1.01, Vignette Strength 0.3 | You can replace the background system completely, but its final render must remain behind units, cards, and the HUD |
An Encounter passed dynamically to GCSApi.StartBattle does not trigger this background change. A dynamic flow must update the background through its scene coordinator, or copy the Encounter to Bootstrap.DefaultEncounter before calling Apply on the background component explicitly.
The finished Demo binds EncounterParallax above the single-image background for multi-layer motion. A newly initialized scene begins with a clean background so you can establish your own visual system. See Demo Scene Reference for the finished hierarchy and motion effects.
Battle Runtime turns state into an interactive battlefield
Once startup, input, and background are ready, Battle Runtime expands units, the hand, interfaces, and feedback in the same order the player sees and uses them.
🎬 Battle Runtime # Complete battle presentation and interaction root
├── ⚔️ Battle Board # Creates and positions player and enemy unit views
│ ├── 🦸 Player Area # World-space anchor for the player unit
│ ├── 👹 Enemy Area # Parent that arranges enemy positions in order
│ │ ├── 1️⃣ Area1 # Position for the first living enemy
│ │ ├── 2️⃣ Area2 # Position for the second living enemy
│ │ └── 3️⃣ Area3 # Position for the third living enemy
│ └── 🎯 Targeting Arrow # Visual line from a dragged card to its target
├── 🃏 Hand # Hand layout, object pool, pointer input, and card-play presentation
├── 🖥️ Battle Canvas # Root for the Screen Space HUD and pop-up interfaces
│ ├── 📊 HUD # Energy, piles, End Turn button, and turn banner
│ ├── 📚 Pile Inspector # Paged view of draw, discard, and exhaust piles
│ ├── 🔀 Choice Presenter # Displays FlowGraph candidates and confirmation controls
│ ├── 🎁 Reward View # Selects a card, energy, cost, or Skip reward
│ ├── 🏆 Result Popup # Victory and defeat results panel
│ └── 🎭 Splash Screen # Presents Encounter information and delays battle startup
├── 🗃️ Pile Cards # World-space card container used by Pile Inspector
├── 🌫️ Pile World Blur # Dims the battle behind an open pile
├── 🃏 Choice Cards # World-space container for candidate cards
├── 🌫️ Choice World Blur # Dims the battle during a choice
├── 🎁 Reward Cards # World-space container for reward cards
├── 🌫️ Reward World Blur # Dims the battle while rewards are shown
├── 🌫️ Result World Blur # Dims the battle behind the results panel
└── 🎛️ Presentation # Shared audio, VFX, text, impact, and cursor feedback
├── 🔊 Audio # Music, ambience, gameplay SFX, and Mixer routing
├── 💥 VFX # Responds to scene-level and unit-level effect requests
├── 💬 Floating Text # Damage, healing, status, and custom battle text
├── ⏳ Delayed Trigger Indicator # Marks delayed effects attached to units
├── 💢 Impact Director # Coordinates hit stop and impact feedback
└── 🖱️ Cursor # Applies the battle cursor texture and scale
Battle Board establishes unit and target space first
When a battle enters the scene, BattleBoard creates player and enemy views from runtime state, places living enemies into the available areas in order, and coordinates Tier scale, health-bar and status offsets, intent positions, selection feedback, and death-hide timing.

The Inspector exposes the player anchor, enemy parent, three default enemy positions, and the four visual configurations for Normal, Elite, Boss, and Summon. Selection colors, health-bar offsets, and death timing beyond the screenshot remain coordinated by the same BattleBoard.
| Setting | Template value | Effect on the battlefield |
|---|---|---|
Player Area | Player Area | Defines the world-space position of the player unit view |
Enemy Area Root | Enemy Area | Parents the entire enemy formation |
Enemy Areas | Area1, Area2, Area3 | Assigned to living enemies in order. Add positions when showing four or more enemies at the same time |
| Player-area position | (-5.2, 0) | Establishes the layout anchor on the player side |
| Enemy-area position | (5.2, 0) | Establishes the layout anchor on the enemy side |
| Enemy spacing | -1 | Tightens or expands the formation according to the current enemy count |
| Unit scale | Normal 0.4, Elite 0.5, Boss 0.6, Summon 0.35 | Gives each Tier a distinct visual size |
| Intent Y | Normal 1.4, Elite 2, Boss 2.4, Summon 1 | Places intent UI above the corresponding body size |
| Death hide delay | 0.9 seconds | Leaves time for the death presentation before hiding the unit view |
BattleOpeningEnemyTooltip on Battle Board anchors the opening enemy description to Enemy Area. The template lets it run independently without Splash Screen and uses a character interval of 0.026 seconds.
The project can replace its Prefab, text, and timing. Disable the component entirely when no opening enemy description is needed.
Hand connects card interaction to the battlefield
After the unit views and enemy positions are established, HandController connects drawing, hovering, dragging, the play area, and target selection, then sends successfully played cards to the exit presentation and object-pool return path.

The four components visible in the screenshot handle hand layout, view pooling, exit routes, and card-play presentation. HandController below them continues the connection into input, target selection, and battle state.
| Component | Template default | Responsibility in the interaction path |
|---|---|---|
HandLayout | Radius 21.2, Max Angle 16, Spacing 3.296, Hover Scale 1.15, Tween 0.15 seconds, Entrance 0.38 seconds | Arranges the hand in a fan, makes room for the hovered card, and handles entrance and rearrangement animation |
CardViewPool | Basic card Prefab, Initial Per Bucket Size 4 | Starts each Bucket with a capacity of 4, creates views on demand at first use, and returns released views to the pool |
CardFlyOutConfig | Default, Basic, and Burst exit from Bottom Right; Skill and Support exit from Bottom Left | Selects a left or right exit direction by card type. CardPlayShowcase performs the actual flight |
CardPlayShowcase | Enter 0.28 seconds, hold 0.8 seconds, fly out 0.65 seconds, hold scale 1.25 | Presents the card in focus before it leaves and tracks unfinished presentations |
HandController | Draw interval 0.27 seconds, hover grace 0.08 seconds, Target Pick Radius 1.6, bottom 32% of the screen as the play area | Connects pointer input, target selection, Battle Board, the object pool, hand layout, and card-play presentation |
Changing card dimensions affects fan spacing, hover height, transitions between adjacent cards, and target-dragging feel at the same time. Recalibrate these parameters as a group after replacing the Prefab. Hand and the Three Card Piles defines how runtime cards enter and leave these views.
Splash Screen sequences fixed-scene openings first
When Bootstrap.DefaultEncounter is assigned and Auto Start On Play is enabled, BattleSplashScreen disables Bootstrap's direct automatic startup for the current run during Awake, presents the Encounter information, then calls StartBattle after a delay. The same opening flow coordinates opening audio, dealing, enemy tooltips, and the turn banner. BattleSplashScreen reads only Bootstrap.DefaultEncounter; it cannot access an Encounter passed dynamically to GCSApi.StartBattle.
When a map or quest selects an Encounter dynamically, disable, remove, or replace Splash Screen completely so it does not continue reading and starting the fixed Encounter. Starting a Battle defines the boundary between fixed and dynamic entry points.
HUD keeps the main controls available after battle starts
After startup, HUD continuously displays the current resources and pile state and sends End Turn and pile-inspection actions back to the runtime.
| Child object | Component | Function used by the player |
|---|---|---|
Energy Display | UnitEnergyDisplay | Shows the player's current energy |
End Turn Button | EndTurnButton, UIButtonSfx | Ends the player turn and plays button feedback |
Draw Pile | DeckCounter | Shows the count and opens the draw pile |
Discard Pile | DiscardCounter | Shows the count and opens the discard pile |
Exhaust Pile | ExhaustCounter | Shows the count and opens the exhaust pile |
Turn Banner | TurnBanner | Presents player and enemy turn transitions and holds an Animation Gate during its animation |
The HUD can be redesigned completely. New buttons and counters still need to call the End Turn and pile-query APIs. Custom UI Integration shows a connection that does not depend on the template Prefabs.
Temporary interfaces take over when content must be inspected or selected
Pile inspection, FlowGraph Choice, victory rewards, and final results do not remain on screen together. Each takes control of input when its state arrives and uses the earlier World Holders and Blur Sprites to organize world-space cards.
| Trigger | Child object and component | Template configuration and runtime boundary |
|---|---|---|
| The player inspects a pile | Pile Inspector, CardPileInspector | Shows 5 × 2 cards per page at a scale of 0.34, reusing CardViewPool to browse the draw, discard, and exhaust piles |
| FlowGraph enters a Choice | Choice Presenter, BattleChoicePresenter | Shows candidate cards at a scale of 0.34 and reports selection, confirmation, and Skip actions to FlowGraph. If the scene has no Presenter, Choice enters the Skipped branch directly instead of leaving an empty waiting overlay |
Victory raises OnBattleRewardOffered | Reward View, CardRewardView | Shows cards at a scale of 0.4 with two reveal delays of 0.5 seconds, then calls ApplyReward or SkipReward after a card, energy, cost, or Skip selection |
Defeat ends the battle, or a completed victory reward raises OnBattleEnded | Result Popup, BattleResultPopup | Uses victory and defeat delays of 0.9/1.0 seconds and types at 42 characters per second |
-
Choice Presentercompletes the user choice awaited by FlowGraph.Reward Viewsubmits the reward result, clearsIsWaitingForReward, and allows the battle to raiseOnBattleEnded. -
Replacements for these interfaces must preserve the corresponding callbacks. A reward interface cannot merely hide its visual object without submitting a reward result.
-
Keep only one
IChoicePresenterimplementation in the scene. -
Manager searches disabled objects as well when locating a Presenter. If the template and custom components both remain, selection order is not guaranteed. Remove the old component when replacing Choice UI instead of only disabling its GameObject.
Presentation turns resolution results into complete feedback
Once card play, status changes, and phase transitions run correctly, Presentation turns those results into audio, scene effects, floating text, and impact feedback. The player can understand what just happened without watching numeric changes alone.
| Object | Component | Feedback provided |
|---|---|---|
Presentation/Audio | BattleAudio | Manages card, UI, battle, results, music, Mixer, volume, and gameplay audio |
Presentation/VFX | BattleVFXPresenter | Responds to battle start, player turn, enemy turn, and battle end events with scene-level Ambient, BattleStart, TurnStart, Victory, and Defeat VFX |
Presentation/Floating Text | BattleFloatingTextPresenter | Shows damage, healing, status, and custom battle text |
Presentation/Delayed Trigger Indicator | UnitDelayedTriggerIndicator | Marks delayed effects attached to units |
Presentation/Impact Director | BattleImpactDirector | Coordinates hit stop and impact feedback |
Presentation/Cursor | BattleCursor | Applies the battle cursor texture, using a template scale of 2 |
Battle Fx Directors | IntentThreatTelegraph | When any Attack intent reaches or exceeds 12, plays threat VFX 0.9 units above the enemy and a warning sound at 0.7 volume |
The FlowGraph Play VFX node instantiates the Prefab configured on the node directly and does not pass through BattleVFXPresenter.
Node effects and scene-phase effects can be replaced independently. Presentation Layer defines the integration boundaries for audio, VFX, floating text, and Gates.
- Audio, VFX, Floating Text, Delayed Trigger Indicator, Impact Director, Cursor, and Intent Threat Telegraph can be replaced or removed individually to match the project style. Removing one only removes its feedback and does not change runtime resolution.
- Splash Screen, Hand, HUD, Choice, and Reward perform startup, interaction, or runtime callbacks. Their replacements must still start the correct Encounter and submit card plays, End Turn, Choice selections, and Reward results.
When a phase stops advancing, identify the object still being awaited:
AnimationGatewaits for presentation release through its Holder count.- Choice waits for its selection callback through
IsWaitingForChoice. - Reward waits for reward submission through
IsWaitingForReward. CardPlayShowcase.ActiveCountdelays only the reward and results interfaces until card presentation finishes.