26 — How to program Terra Firma (Demo)
Audience: Engineers shipping the Demo · Multiplayer Ladder vertical slice first.
Engine: Unreal Engine 5.8 · Lyra host · same “no LyraGame fork” rule as Full game.
Authority: 22-demo.md · 02b-plugin-dependencies.md · Demo kanban · FS AC pack for the slice.
Sibling: Full-game programming → 25-howto-program-full-game.md.
Demo is a cut of the same architecture, not a second codebase. Same GFP packing; smaller enable list; art/systems marked Blocked where needed.
0. Demo product lock (read once)
Section titled “0. Demo product lock (read once)”| In Demo | Out of Demo |
|---|---|
| Ladder (then Regular MP stretch) | Campaign / story spine |
| One-weapon kits (no mesh modularity) | Full Refit / modular parts as product |
| Demo Mod O tuner (team-only; strip external) | External players with Mod ON |
| Hard-coded specials / parkour slice | Full skill trees / monetary platform product |
| Hybrid FPP/TPP + Melee Drive + guns + Flow | Perfect final art (placeholders OK) |
Single Demo authority: 22-demo.md. GDD: demo-multiplayer-ladder.
1. Same Lyra 5.8 rules as Full game
Section titled “1. Same Lyra 5.8 rules as Full game”- Experiences + GFPs;
OnExperienceLoadedbefore gameplay. - Do not edit Epic Lyra
.uassets — duplicate into ADDON / TFA*. - Do not put lasting combat / HUD / economy into ADDON (FS-ARCH-011).
- Remake TFACore · TFACombat · TFAWeapons on
5.8_terra_demo(old test project is not this host).
If a Demo shortcut fights Lyra updates, it is wrong — use a GFP.
2. What you reuse from Lyra on day one
Section titled “2. What you reuse from Lyra on day one”| Keep from Lyra | Demo use |
|---|---|
| Crouch + default move/look | Already works — leave HeroComponent alone |
| GAS / ASC on Lyra character | Grant Demo AbilitySets onto TF hero |
| Enhanced Input stack | Add TF IMC for WallRun/Jump family via Game Feature Action (no Vault — FS-MOV-003 WILL NOT USE) |
| CommonUI / net / EOS hooks | Ladder session + future Online cards |
| ShooterCore as reference only | Do not ship Demo as “Lyra Shooter experience” forever |
3. Demo plugin enable picture
Section titled “3. Demo plugin enable picture”Boot Active: ADDON (+ remake TFACore when ready)Experience: TFACombat (spine) · TFAMelee · TFASingularity · TFAWeapons · TFAOmniVisor (omit any Plugify GFP to lab without it — e.g. no Singularity)Optional later: TFAOnline slice · TFAAI sandbox C · TFAModularNot in Demo: full Monetary product · Crafting · Vision fog · Campaign mapsVendor: AimAssist (on) · SKG (register + glue via ADDON)Plugify in Demo: same as Full game — one GFP per surface (02-gfp-cookbook.md). Demo Experience just enables a shorter list.
Tick (Lyra 5.8): leave Actor/Component Tick off unless justified (FS-ARCH-014). Server owns combat/economy loops; no melee Tick magnet; no client Tick applying Flow / damage.
Host hygiene first (P0):
- Persist ADDON (+ SKG) in
Lyra_5p8.uproject. - Point Experience / DefaultPawnData at TF hero (
DA_HeroPawnData/BP_Hero_TerraFirma) — stop living onDefaultPawnData_EmptyPawnfor Demo maps. - Register
IMC_TFA_Default(TFAInput plugin, built) viaGameFeatureAction_AddInputContextMapping— not the oldIMC_Default_TerraFirma, which duplicated Lyra’sIMC_Defaultand is deleted. - Grant parkour AbilitySet on that pawn (assets already under ADDON).
Until 1–4 are done, “movement in ADDON” is mostly inert — see 02b §8.
4. Movement: Lyra vs custom (Demo)
Section titled “4. Movement: Lyra vs custom (Demo)”| Verb | Owner | How to program |
|---|---|---|
| Crouch | Lyra | Use stock path; do not reimplement |
| Move / Look / Jump baseline | Lyra | Stock |
| Roll / Slide / WallRun (current assets) | ADDON GAs (temporary host) | Wire grant + IMC; server-sim custom modes (FS-MOV-005) |
| Wall Run completeness (Vault WILL NOT USE) | Demo card demo-movement-input |
Still GFP / ADDON — never LyraGame/*.cpp |
| Camera director / stance / vitality | TFACombat spine (remake) | ADDON stays SKG glue |
| Lasting Melee Drive | TFAMelee (Plugify remake) | Message-coupled to Singularity |
| Flow + Singularity | TFASingularity (Plugify remake) | Subscribes to kill/Flow credit messages |
Pattern: new input → new IA in TF content → map in TF IMC → bind via Ability or TF input component on ATerraFirmaCharacter / Hero inject — not a LyraHeroComponent edit.
5. Demo program order (practical)
Section titled “5. Demo program order (practical)”Kanban: Demo board · Gantt: Demo Gantt.
| Phase | Do this | Exit |
|---|---|---|
| A Host | uproject persist; Experience; TF default pawn; map /ADDON/Maps/L_TestMap loads clean |
Two machines / listen server boots |
| B Glue | ADDON character + SKG register; parkour GAs playable | Roll/Slide/WallRun on TF pawn |
| C Remake Core | TFACore tags/messages Boot Active | Combat can depend |
| D Camera | UTFACameraDirector in TFACombat spine — leave pure FPS (demo-hybrid-camera). Same skeletal mesh: dual components + TPP OwnerNoSee + local TrueFPP bone-hide head/torso/legs/feet (arms+gun only) — no arms-only asset (FS-CAM-002) |
Gun TrueFPP · melee WideTPP · Shift-Out; remotes always full TPP |
| E Melee + Singularity | Remake TFAMelee + TFASingularity (message-coupled; Plugify) | Melee Drive foundation → Flow → Singularity |
| F Weapons | Remake TFAWeapons; one-weapon kits; Firehand; Demo Mod O | Mag → OmniVisor ammo; cadence RO |
| G HUD | TFAOmniVisor placeholders (OV locks) | Visor seats match GDD |
| H Ladder | Match flow / results stubs per Demo cards | Ladder match completes Mod OFF |
| I Strip | bDemoModEnabled false external |
O does nothing |
Motion Matching (Demo + Full): full tutorial tutorials/motion-matching-demo-and-full.md — Pose Search on lower body only; keep Lyra upper/lower Linked Layers; Full adds strike choosers. Kanban Demo demo-motion-matching · Full combat / melee. (Stub: demo-motion-matching-lyra.md.) Wall Run MM: L/R cycle mid-stint; MM enter/exit edges only — 2026-11-07-wall-run-motion-matching-design.md · tutorial §11.3.
Melee Drive / Singularity implementer path (self-contained Bible tutorial — tag gates → GAS · Motion Warp · Counter · gun matrix · Singularity bridge): tutorials/melee-drive-guns-singularity.md. Status deferred until Melee Drive foundation; design lock 2026-10-26-singularity-one-flow-two-verbs-design.md.
6. Demo Mod & promote (team only)
Section titled “6. Demo Mod & promote (team only)”- Implement
W_TFA_DemoModagainst FS-GUN-012 + Lab dials (mock:tfa_gdd_html/figures/demo_mod_mock.html). - Export split JSON (
tfa-demo-mod/v1) — demo-mod-export.md. python promote_demo_mod.py <exports>→ cooked DT/CSV underdata/promoted/.- Never ship live Mod RPCs as balance truth.
Kanban: demo-modkit · demo-mod-export-promote.
7. Day-to-day Demo workflow
Section titled “7. Day-to-day Demo workflow”- Pull Demo kanban card — check Blocked reason (
[art],[feat], …). - Confirm dependency GFP Exit gate (Core before Combat before Weapons).
- Implement in GFP, not LyraGame.
- Run Demo AC from FS §23 acceptance pack that apply to the slice.
- External build: Mod gated OFF; Ladder still plays.
8. Demo anti-patterns
Section titled “8. Demo anti-patterns”| Anti-pattern | Fix |
|---|---|
| “Demo is temporary → edit LyraHeroComponent” | Additive IMC / TF character instead |
| Grow ADDON into full combat + HUD | Remake TFACombat / TFAOmniVisor |
| Copy old test-project TFAWeapons as Done | Remake on this host |
| Modular gun mesh work for Demo exit | One-weapon kits only |
| Melee Drive Counter before Melee Drive | Keep deferred kanban card |
| Full-body Pose Search wiping Lyra Linked upper/lower | Lower-body MM only — motion-matching-demo-and-full.md |
9. After Demo
Section titled “9. After Demo”Promote patterns into Full game enable list (25): same GFPs, more Experiences, MonetaryPlatform, trees, Vision, World, Pose Search / Motion Matching (loco + Melee Drive choosers — motion-matching-full). Demo code should already live in the right plugins so Full game is enable + content + MM DBs, not a rewrite.
10. Pointers
Section titled “10. Pointers”| Doc | Use |
|---|---|
| 22-demo.md | Product lock |
| 02b-plugin-dependencies.md | Deps / hierarchy / conflicts MASTER |
| 08-camera-input-movement.md | Camera / move Needs |
| 20-critical-path.md | Shared plugin A–E |
| Demo kanban / gantt | Living board |