Cleanup
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
---
|
||||
date: 2026-06-03
|
||||
type: session
|
||||
tags: [session, cleanup, housekeeping, netcode, perf, vault, packages]
|
||||
---
|
||||
|
||||
# Session 2026-06-03 — Pre-M6 cleanup (loose ends before Build/Placement)
|
||||
|
||||
## Goal
|
||||
|
||||
Clean up remaining/deferred loose ends before starting **M6 — Build/Placement**: a healthy, honest baseline (no stale docs, no Unity-template cruft, no orphaned assets, an explained console) and close the genuinely-cheap follow-ups. Driven via `/dots-dev`; full discovery swarm first, then a four-bucket pass (operator approved all four + a serena check).
|
||||
|
||||
Inventory finding up front: the **code layer was already clean** — no open decision records, no `TODO`/`FIXME` defects, no disabled/stubbed systems, no ignored tests. Loose ends were concentrated in docs, template cruft, orphaned materials, one wired-but-unused stat, and an unclean console.
|
||||
|
||||
## Done
|
||||
|
||||
- **Bucket 0 — serena check:** serena MCP was **not connected** this session (no `mcp__serena__*` tools), so "confirm on first use" could not be positively verified. `Glob`/`Grep` fallback used throughout and worked — consistent with the `CLAUDE.md` caveat. No durable change.
|
||||
- **Bucket 1 — vault roadmap reconcile:** [[Backlog]] + [[Milestones]] + [[Home]] were stale (last touched 2026-06-01, didn't reflect the 2026-06-03 art/Synty/aim sessions). Checked off **mouse-cursor aim** (delivered by [[DR-012_Aim_Controls_Cursor_Gamepad]]) and **rate-limited turning** + **orphaned-material prune** (this session); added a "2026-06-03 Visual & Controls Polish follow-ups" block (decor LOD, character models, VFX-Graph URP, ghost-prop reskin, auto-target tuning, rebindable controls, mixed-theme zones, ORM fidelity); added two non-milestone rows to [[Milestones]]; fixed Home's stale "latest session" + decisions pointer (DR-001 … DR-012). Bumped all `updated:` dates.
|
||||
- **Bucket 3 — rate-limited turning** (`PlayerAimSystem.cs`): the always-computed `EffectiveCharacterStats.TurnRateRadiansPerSec` (authored 720°/s in `CharacterStatsDefinition`, baked via `math.radians` in `AbilityDatabaseAuthoring`) was unused — facing snapped instantly. Now rotates `PlayerFacing` toward the aim target by at most `TurnRateRadiansPerSec * dt` per predicted tick (pure planar `sincos` math, signed via the 2D cross product; uninitialized-facing snap guard; `dt` = fixed predicted-step `SystemAPI.Time.DeltaTime`). Stays `[BurstCompile]` in `PredictedSimulationSystemGroup` `.WithAll<Simulate>()` — deterministic, replays on rollback.
|
||||
- **Bucket 2 — delete cruft:** removed `com.unity.visualscripting` (1.9.11) via `manage_packages` (manifest + `packages-lock.json` clean), deleted `Assets/TutorialInfo/` + `Assets/Readme.asset` (with their `.meta`s). **Orphaned-material prune:** GUID-swept all 22 `Materials/Env/*.mat` against every `*.{unity,prefab,asset,mat}` → **deleted 17 zero-reference orphans**, **kept 5 referenced**: `M_Env_Floor` (SampleScene), `M_Env_Wall` (Gameplay subscene ×3), `M_Env_PickupGlow` (UpgradePickup.prefab), `M_Env_Storage` (Storage.prefab), `M_Env_Fallback` (the `EnvArtTools` converter's path constant). No narrative-based deletes — GUID sweep was authoritative.
|
||||
- **Bucket 4 — console / runtime health gate** (focused Play, auto-host, fired into the Husk waves): see below.
|
||||
|
||||
## Console / runtime health gate (Bucket 4 detail)
|
||||
|
||||
- **Snapshot `IndexOutOfRangeException` ("snapshot buffer at index 1, has 1 slots") did NOT reproduce.** Drove the full fire→predicted-projectile→`ProjectileClassificationSystem`→swept-hit→damage path live (Husks 4→2 from real kills); 18 console entries, **0** snapshot/index signatures. It was a **transient** from the prior corrupt-Burst-cache session, cleared by this session's domain reloads. `AbilityFireSystem.GetDataAtTick` + `ProjectileClassificationSystem.TryGetComponentDataFromSnapshotHistory` ran clean — no code change made (and none warranted without a live repro).
|
||||
- **Burst is healthy** — `filter_text="entry point"` → **0** "not a known Burst entry point" managed-fallback messages, and play-enter was fast (~3s, not the 30–40s corrupt-cache symptom). So **no editor restart was needed** (the plan had hypothesized a corrupt cache; the evidence says otherwise).
|
||||
- **Server Tick Batching remains** (~1.25–1.75 ticks/frame) — but it's **genuine in-editor multi-world perf** (one process running ServerWorld + ClientWorld + physics + prediction + Husk waves), **not** Burst corruption and **not** a regression from this session. This is the existing backlog item *"server perf under wave load — validate in a real build."* Left as a tracked finding, not chased (out of cleanup scope).
|
||||
- **Rate-limited turning validated live:** facing tracked the injected aim and was **identical on ServerWorld and ClientWorld** at every sample (e.g. both `(-0.981, 0.196)` then both `(0.000, 1.000)`) — determinism / server==client preserved, zero runtime errors. At 720°/s a turn completes in ~0.1–0.25s (within MCP round-trip), so the *visible sweep cadence* is best eyeballed by the operator in the Game view; correctness is covered by the green suite + the server==client consistency.
|
||||
|
||||
## Validation
|
||||
|
||||
- Compile/Burst clean after every change; the only console warnings are the **pre-existing** vendor CS0618 obsolete-API warnings in `GabrielAguiarProductions/.../SaveParticleSystemScript.cs` (third-party pack, editor-only, not ours).
|
||||
- **EditMode 86/86** green after the turning change + all deletions (`ProjectM.Tests.EditMode`).
|
||||
- `packages-lock.json` no longer references visualscripting; `Materials/Env/` contains exactly the 5 kept materials; `TutorialInfo/` + `Readme.asset` gone.
|
||||
|
||||
## Decisions
|
||||
|
||||
- None (no firm netcode/architecture decision — the snapshot error didn't reproduce, so no DR). Pure housekeeping + one small deterministic tweak.
|
||||
|
||||
## Open / deferred
|
||||
|
||||
- **Server tick-batching under wave load** — validate server perf in a **real standalone build** (in-editor multi-world cost is the likely dominant factor; Burst confirmed healthy). Existing backlog item.
|
||||
- **Visible turn-sweep cadence** — operator eyeball in a focused Game view; tune `CharacterStatsDefinition.TurnRateDegreesPerSec` (720°/s) to taste.
|
||||
- The large tracked-deferred set (subscene streaming, real assets/character models, multi-client two-build tests, ranged/boss enemies, gravity/PvP, M3 UI/timed-modifier follow-ups, production-replication decision, Unity Relay) stays deferred — recorded in [[Backlog]]; all are genuine M6+ features, not cleanup.
|
||||
|
||||
## Next
|
||||
|
||||
- Start **M6 — Build/Placement** (server-authoritative grid placement via RPC) on the locked `BaseGridMath` coordinate space ([[DR-008_M5_HomeBase_BaseLayer_Storage]]).
|
||||
Reference in New Issue
Block a user