Docs: DR-023 enemy animation + Synty asset inventory; trim CLAUDE.md
DR-023 decision record (client-derived enemy animation, monster-mash roster, EnemyRigTools, WaveSystem scale-fix, GUID-preserving rebuild) + session log + Synty_Asset_Inventory (enemy-grade table + future-dev catalog for the 14 new packs). CLAUDE.md: add the enemy-animation gotchas bullet and condense several build-gotcha bullets back below pre-session size. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
---
|
||||
date: 2026-06-06
|
||||
type: session
|
||||
tags: [session, animation, rukhanka, synty, enemies, netcode, presentation, dots, slice, inventory]
|
||||
---
|
||||
|
||||
# Session 2026-06-06 — Enemy animation (Rukhanka, client-derived), Slice 2 + Synty inventory
|
||||
|
||||
## Goal
|
||||
|
||||
Operator (via `/dots-dev`, ultracode): *"Extend the animation system to encompass enemies. I've added a ton more Synty assets — inventory them and pick the enemies to use. Note other assets for future goals and development."*
|
||||
|
||||
## Process
|
||||
|
||||
- **Research/inventory Workflow (≈22 read-only agents):** one agent per Synty character pack + batched env/FX/UI packs (→ structured inventory), 3 agents mapping the enemy + animation code surface, 2 context7/source agents confirming the Rukhanka enemy extension, 1 synthesis. Key finding: a Husk = an ownerless interpolated ghost = structurally a **remote player**, which DR-022's `RemoteDriveJob` already animates from `LocalTransform` deltas → the enemy drive is that path generalized; **no new netcode surface**.
|
||||
- **Clarifying gate (AskUserQuestion):** roster = **monster-mash** (Werewolf=Grunt, Werewolf-Undead=Swarmer, Kaiju=Brute); scope = **locomotion + attack telegraph** (death-anim deferred).
|
||||
- **Plan → approval → execution**, serialized through the one live editor (research fanned out in parallel; all Unity mutations done inline, validating each).
|
||||
|
||||
## Done
|
||||
|
||||
- **Inventory + picks** → [[Synty_Asset_Inventory]] (enemy-grade table + future-dev catalog: env/FX/UI/build). All enemy picks confirmed Generic + Optimize-OFF (drop-in for the DR-022 recipe).
|
||||
- **Reusable `EnemyRigTools` editor tool** (`ProjectM/Animation` menu) — 3 idempotent steps building the materials, `AC_EnemyTopDown` + `EnemyAttackWindup.anim`, and the 3 rigged prefabs via real `PrefabUtility` C# (mirrors the DR-022 player recipe; `RigDefinitionAuthoring` via reflection). **GUID-preserving** in-place rebuild so re-runs never orphan the subscene refs.
|
||||
- **`EnemyAnimationDriveSystem`** (client-only, mirrors the remote-player path): `[WithAll(EnemyTag)]`, velocity from `LocalTransform` delta (prevPos cache + per-frame prune, NOT `[RequireMatchingQueriesForUpdate]` so the prune always runs — Husks die often), facing from `LocalTransform.Rotation`, maxSpeed from baked `EnemyStats`, `IsAttacking = AttackWindup != 0`. Reuses `AnimParamMath.LocomotionParams`; added `AnimParamMath.PlanarForward` (+4 EditMode tests). No new `[GhostField]`, no server change, no asmdef change.
|
||||
- **3 animated prefabs**: `EnemyWerewolf` (Grunt 0.8), `EnemyWerewolfUndead` (Swarmer 0.6, green-tinted undead skin), `EnemyKaiju` (Brute 1.3). Wired into the gameplay subscene `WaveDirector.EnemyPrefabs[]`. Capsule prefabs kept as pristine ghost templates.
|
||||
- **`WaveSystem` Scale-clobber fix**: spawner used `LocalTransform.FromPosition` (resets Scale→1, a replicated `[GhostField]`) → now `baked.WithPosition(pos)` preserves the variant scale.
|
||||
|
||||
## Validation (runtime, focused editor, real Server+Client)
|
||||
|
||||
- EditMode **204 → 208** (+4 PlanarForward). Clean compile; console clear; **no "does not support skinning"**.
|
||||
- Spawned one of each variant (debug-RPC `SpawnWave`, then direct server instantiate from the prefab pool). All 3 replicate to the client with the **Rukhanka rig + 5-param buffer** and **correct baked scales** (0.80/0.60/1.30 — scale-fix works through replication).
|
||||
- **Drive proven via live param sampling:** moving Husk `MoveZ≈Speed≈0.95` (forward run); stopped-at-player `Speed=0`; winding-up `IsAttacking=true` — locomotion + telegraph both correct.
|
||||
- **Feet-on-ground (`WorldRenderBounds`):** werewolves feetY ≈ −0.05/−0.04 ✓; Kaiju measured −0.32 sunk → Root-Y −0.77 → **−0.52** (GUID-preserving re-run kept the subscene refs). Kaiju eyeball on next Play.
|
||||
|
||||
## Gotchas captured
|
||||
|
||||
- `WaveSystem.FromPosition` Scale-clobber (above). `DeleteAsset+CopyAsset` mints new GUIDs → orphans subscene refs (→ GUID-preserving in-place rebuild). `execute_code`: no `using`/aliases; `GetComponentData`/`GetBuffer` ambiguous via reflection (use concrete generics); `Rukhanka.ParameterValue` is a union (read `floatValue`/`boolValue`). → folded into [[DR-023_Enemy_Animation_MonsterMash]] + CLAUDE.md.
|
||||
|
||||
## Next-session intent
|
||||
|
||||
- Eyeball the Kaiju feet/scale in a natural Play; per-SMR eye-glow material.
|
||||
- **Death animation** (deliberate netcode change: `Dead` enableable from replicated Health + delayed despawn) so a death clip plays before despawn.
|
||||
- **Cyberpunk enemy faction** (PolygonSciFiCity) as new wave variants on this exact pipeline — one material + `EnemyRigTools` variant rows.
|
||||
- Wire **PolygonParticleFX** (blood/gore/explosion) into `VFXConfig` for richer Husk-death VFX.
|
||||
|
||||
See [[DR-023_Enemy_Animation_MonsterMash]].
|
||||
Reference in New Issue
Block a user