updating project context and roadmap files

This commit is contained in:
Matt F 2026-06-30 10:52:16 -07:00
parent d53a2a47e2
commit 2fbee5fd99
2 changed files with 26 additions and 16 deletions

View file

@ -4,7 +4,7 @@
A snapshot of **where the project is and how it works** — the authoritative reference for current architecture, implemented systems, conventions, and known debt. It pairs with [`Project_Roadmap.md`](Project_Roadmap.md), which is the forward-looking plan. When the two disagree, this document describes *what exists today*; the roadmap describes *what's planned next*.
Last substantial update: 2026-06-23.
Last substantial update: 2026-06-24.
---
@ -52,8 +52,10 @@ Unity **6.4 (6000.4.4f1)**, URP, IL2CPP, .NET Standard 2.1, Linear color space,
- `MatchState` (NetworkBehaviour scene singleton): phase (`Lobby`/`CountDown`/`Playing`/`Victory`/`Defeat`), current wave, shared lives. `PlayerMatchState` (per-player): slot allocation, race selection, ready state. Authoritative client-id → `PlayerSlot` mapping.
### Combat & towers
- `TowerCombat` (server targeting loop; `OnTargetAcquired`/`OnTargetLost`/`OnFire` events for future animation), `Projectile`, hitscan + projectile paths, Single/Splash/Chain target types, damage types, range indicator. **Air-targeting** done: `GroundedOnly` towers skip flying enemies. Range checks are **3D**.
- `TowerPlacementManager` (server-validated placement queue), `Builder` build queue with staged construction/pause/cancel/refund, `BuildSiteVisual` ghosts, owner tinting, RTS selection.
- `TowerCombat` (server targeting loop; `OnTargetAcquired`/`OnTargetLost`/`OnFire`/`OnAreaFired` events), `Projectile`, hitscan + projectile paths, target types **Single/Splash/Chain/AllInRange**, damage types incl. **Electric**, range indicator. **Air-targeting** done (`GroundedOnly` skips flyers). Range checks are **3D**.
- `TowerPlacementManager` (server-validated placement queue) — `SpawnTower` now **seats towers flush on the ground from their mesh bounds** (`SeatOnGround`), so any pivot works (replaced the old hard-coded y=0.5). `Builder` build queue with staged construction/pause/cancel/refund, RTS selection, owner tinting.
- **Construction-phase build visuals:** `BuildSiteVisual` swaps between an ordered set of phase prefabs as a tower builds — `ConstructionPhaseSet` SO + optional per-tower `TowerDefinition.ConstructionPhases`, with a project-default set and a legacy cube Y-scale fallback. `BuildSiteVisual` resolves its def via `TowerTypeId` (catalog), like `TowerInstance`.
- **Tesla Coil tower:** Electric, `AllInRange` (zaps every enemy in range each 0.5s tick). `TeslaArcVisual` draws arced, crackling, HDR `LineRenderer` bolts that flicker, plus **real point lights** (emitter flash + per-impact lights at struck enemies, capped) so the electricity actually illuminates the scene — emission/bloom alone don't cast light.
### Enemies & pathfinding
- `EnemyHealth` (replicated HP, damage types, `IsFlying`, held state), `EnemyStatus` (lingering effects: slow/DoT), `EnemyMovement` (A* path following, zone-leak attribution, death/sink sequence).
@ -71,7 +73,7 @@ Unity **6.4 (6000.4.4f1)**, URP, IL2CPP, .NET Standard 2.1, Linear color space,
### Roguelike — tower deck & draft (the current focus)
- **`PlayerTowerDeck`** (per-player): the growable set of unlocked `TowerTypeId`s. Starts at the base set (seeded by `WaveManager` from `TowerPlacementManager.startingDeck`); placement is gated server-side (`TowerNotInDeck` rejection); the HUD build grid reads the local deck and rebuilds live on change. **Merged to `main`.**
- **Draft system (Slice 1 — spine + "new tower"):** `DraftOption` (abstract SO) / `NewTowerDraftOption`, `DraftPool` (scene singleton catalog), `PlayerDraft` (per-player offered set + pick/buy-roll RPCs), `DraftService` (server weighted-random generation + offer/auto-resolve). The **prep phase is the draft window** (wave 1's prep = the match-start draft); unpicked drafts auto-resolve at prep end. Gold **"Buy Roll"** purchases an extra roll any time. Non-modal HUD overlay. **On branch `feature/draft-system`, verified working in-engine; pending commit/merge as of session end.**
- Three base towers exist as data: **Basic Arrow** (ground+air single-target), **Siege Cannon** (ground-only splash), **Wall** (2×2, no damage, maze-shaping). *(Coworkers have begun replacing the placeholder cube visuals with cones.)*
- **Draft Slice 1 is merged** (it's in `main`/the active branch line, not just `feature/draft-system`). Tower content available to draft: **Basic Arrow** (ground+air single), **Siege Cannon** (ground-only splash), **Wall** (2×2 maze-marker), **Tesla Coil** (Electric AllInRange). Arrow/Siege have cone meshes; Tesla is a ProBuilder mesh. So the "new tower" draft finally has real content — starting deck vs. draftable pool is a live tuning knob.
### Paint system (PAUSED)
- In-match paint (R/G/B + Reset) recolors owned towers and drives effects (Red=Splash, Green=Poison, Blue=Cold), server-authoritative. **Frozen** pending the roguelike reconciliation decision (it overlaps with systemic damage-type upgrades).
@ -79,6 +81,10 @@ Unity **6.4 (6000.4.4f1)**, URP, IL2CPP, .NET Standard 2.1, Linear color space,
### Level authoring
- In-engine `TD.Levels` authoring volumes (player zones, spawners, leak exits, goals) + `LevelData` + a bake pipeline producing walkability/placement/owner grids.
### Rendering & post-processing
- URP with **6 quality-tier RP assets** in `Assets/_Project/Settings/Render Settings/` (Mobile, PC, URP-Low/Medium/High/Ultra). **HDR** must be on per-asset (Quality section) for bloom/glow.
- **Project-wide post-processing** via the `DefaultVolumeProfile` (Edit→Project Settings→Graphics→Default Profile) — a **grimdark grade** (ACES tonemapping, desaturate/contrast, Split Toning, Bloom, Vignette, Film Grain). It has **no per-property checkboxes** (it's the always-on baseline). **Gotcha:** scene Volumes (e.g. the URP-template `SampleSceneProfile` in `9Player`) override the default — remove/redirect them so the default applies everywhere.
### HUD & dev tools
- `HUDController` (UI Toolkit): gold/wave/lives/leaks, scoreboard, minimap, selection portrait + context panel, build/paint command grid, build progress, match-end overlay, chat, buff menu, and the new **draft overlay**.
- `DevWaveControls`: **F9 / "Force Next Wave"**, **F8 / "Grant Next Tower"** (dev stand-in for deck growth).
@ -89,7 +95,9 @@ Unity **6.4 (6000.4.4f1)**, URP, IL2CPP, .NET Standard 2.1, Linear color space,
- **Visuals are placeholder** throughout (primitive/cone towers, sourced enemy models). See roadmap art TODOs.
- **Enemies lack idle animation support** — needs adding across all enemy prefabs.
- **Tower footprint visuals don't fill their 2×2 space** — the cone/mesh sits centered and reads smaller than the tile area it occupies; should visually reflect the full footprint.
- **Tower footprint visuals don't fill their 2×2 space** — meshes read smaller than the tile area they occupy; should visually reflect the full footprint.
- **Grimdark grade is in, but the scene fights it** — the post-processing reads correctly, yet the bright/flat-lit ice map (`9Player`) undercuts the mood. Grimdark needs a **lighting pass** (low ambient, hard moody key) and ultimately darker level art; post alone can't carry it.
- **URP additional-lights budget** now matters — Tesla flash + per-impact lights stack across towers; watch the URP asset's Additional Lights "Per Object Limit" / Per-Pixel setting.
- **Tower catalog is now a single source of truth:** `TowerPlacementManager.towerDefinitions[]` (by-index, = `TowerTypeId`). `TowerInstance` replicates that index and resolves via `TowerPlacementManager.GetDefinition`. *(The old by-name `TowerRegistry` was removed 2026-06-24 — add new towers only to `towerDefinitions` + `DraftPool`.)*
- **Catalog index 0 is a reserved sentinel** (valid `TowerTypeId`s start at 1) — easy to forget when wiring the catalog in the inspector.
- **Catalog-index identifiers aren't session-stable** — blocks cross-match persistence until a stable ID is added.

View file

@ -4,7 +4,7 @@
The **forward-looking plan**: what's done, what's next, and the sequencing. Current-state architecture and the full list of implemented systems live in [`Project_Context.md`](Project_Context.md) — read that first for "how things work today." This document focuses on direction and remaining work.
Last substantial update: 2026-06-23 (reorganized around the roguelike pivot).
Last substantial update: 2026-06-24.
---
@ -34,13 +34,13 @@ All players start with the **same three towers** — **Basic Arrow** (ground+air
## Status at a glance
**Done & merged:** functional match loop end-to-end (placement, construction, waves, pathfinding, combat, match-end), HUD, lobby + race selection, economy, enemies + A* pathfinding, **flying enemies + air-targeting**, **per-player tower deck** (roguelike keystone #1).
**Done & merged:** functional match loop end-to-end, HUD, lobby + race selection, economy, enemies + A* pathfinding, **flying enemies + air-targeting**, **per-player tower deck** (keystone #1), **draft Slice 1** (spine + "new tower"), **TowerRegistry removal** (towers replicate by `TowerTypeId`), **per-tower construction-phase build visuals**, **ground-seating from mesh bounds**, **Tesla Coil tower** (Electric + AllInRange + arc VFX with real flash/impact lights).
**Done, pending commit/merge:** **draft system Slice 1** (the draft spine + "new tower" choice), verified working in-engine on branch `feature/draft-system`.
**In progress (branch `feature/post-processing`):** project-wide **grimdark post-processing** grade + HDR; Tesla arc lighting polish. *(This branch was fast-forwarded onto the Tesla work; commit the post-processing assets + the `TeslaArcVisual` light additions.)*
**Paused:** in-match Paint system (overlaps with systemic upgrades — reconcile before building further).
**Paused:** in-match Paint system (overlaps with systemic upgrades).
**Next:** draft Slice 2 (systemic upgrades).
**Next:** draft **Slice 2 (systemic upgrades)**; the **grimdark lighting pass** (see Part C); author 2 more new-tower designs.
---
@ -49,8 +49,8 @@ All players start with the **same three towers** — **Basic Arrow** (ground+air
### A1. Per-player tower deck — ✅ DONE (merged)
Towers are unlocked per player, not globally available. See [`Project_Context.md`](Project_Context.md).
### A2. Draft spine + "new tower" (Slice 1) — ✅ DONE (branch `feature/draft-system`)
Server generates 3 weighted options per player each prep phase; players pick via a non-modal HUD overlay; unpicked auto-resolve at prep end; gold "Buy Roll" purchases extra rolls. Only choice type is **New Tower** (grants into `PlayerTowerDeck`). *Commit/merge pending.*
### A2. Draft spine + "new tower" (Slice 1) — ✅ DONE & merged
Server generates 3 weighted options per player each prep phase; players pick via a non-modal HUD overlay; unpicked auto-resolve at prep end; gold "Buy Roll" purchases extra rolls. Only choice type is **New Tower** (grants into `PlayerTowerDeck`).
### A3. Draft Slice 2 — systemic tower upgrades — ⏭ NEXT
- Add an upgrade `DraftOption` subclass applying **systemic** modifiers: "all towers of damage-type X gain Y", "all projectile-type X …", "unlock Lv.2 across deck".
@ -65,8 +65,8 @@ Secondary-objective tracking ("place 50 towers in 5 min", "leak 0 for 3 waves")
### A6. Enemy debuffs (draft choice #3)
Temporary debuffs purchasable in the draft (weaker / slower / **downgrade a tier**). "Downgrade" implies an **ordered enemy progression** the data doesn't model yet — add that first.
### A7. Tower content beyond the starting three
The "new tower" draft is only meaningful once the pool has towers **beyond** the starting set. Author additional tower types (definitions, prefabs, draft options). *(Until then, the new-tower draft has nothing valid to offer because all towers are starting towers.)*
### A7. Tower content beyond the starting set — IN PROGRESS
The "new tower" draft needs towers beyond the starting set to be meaningful. **Tesla Coil is the first** (Electric, AllInRange, ProBuilder mesh, draftable). The user planned **3 new towers** total so Siege + Wall can return to the starting deck — **2 more designs still pending** from the designer. Each new tower = a `TowerDefinition` + prefab + `NewTowerDraftOption`, added to `towerDefinitions` (catalog) + `DraftPool` (+ network prefab list).
### A8. Cross-match persistence / meta-progression
Player profile saving owned content; **win/loss reward pools** drawn server-side at match end; the customization menu. **Requires a session-stable tower/option ID** (catalog indices reset each match — see Context "technical debt").
@ -91,8 +91,10 @@ Player profile saving owned content; **win/loss reward pools** drawn server-side
These are concrete, scheduled-soon visual fixes (placeholders are otherwise point-isolated and swap cleanly):
- **Enemy idle animation support — NEW.** Add idle animation states to **all** enemy prefabs (enemies currently lack an idle; needed for held/spawned and between-waypoint states, and as the foundation for the stepped-animation direction below).
- **Tower footprint visuals fill the full 2×2 — NEW.** Tower meshes (the new cones / placeholder shapes) sit centered and read smaller than the tile area they occupy. Update the visuals so a placed tower clearly fills its entire 2×2 footprint (matters for readability of maze packing and for the Wall especially).
- **Grimdark lighting pass — NEXT.** The post-processing grade is in (ACES/desaturate/contrast/bloom/vignette, project-wide via `DefaultVolumeProfile`), but a brightly-lit ice map undercuts it. Lower the scene **ambient**, add a hard moody **directional key**, raise contrast — post can't carry grimdark without the lighting. (Ultimately the level art needs to go darker/industrial too.)
- **Enemy idle animation support.** Add idle states to **all** enemy prefabs (needed for held/spawned + between-waypoint states; foundation for the stepped-animation direction below).
- **Tower footprint visuals fill the full 2×2.** Meshes read smaller than the tile they occupy; make a placed tower visually fill its footprint (matters for maze readability, esp. the Wall).
- **Done this session:** per-tower **construction-phase build visuals** (`ConstructionPhaseSet`) and **ground-seating** so any-pivot meshes sit flush — both shipped.
---