Files
snow_trail/.pi/skills/panopticon/changelog.md
2026-04-05 09:29:49 +02:00

83 lines
5.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog
*Last updated: Friday, April 3, 2026*
## Active Areas
| Area | Changes (30d) | Status |
|------|---|---|
| Main loop & systems | 9 churn | Active — intent-based architecture solidifying |
| Dialog system | 10 churn | Active — projectiles, camera, rendering |
| Render core | 15 churn | Active — text pipeline, font atlas, globals |
| World state | 8 churn | Active — intent storage, component management |
| Player mechanics | 6 churn | Stable — character bundle, player states |
| Shader system | 4 churn | Active — gizmo lines, dissolve, snow light |
## Recent Changes
### Intent-Based Architecture
- **Completed major refactor** (3 weeks ago): Systems now communicate through one-frame `Storage<T>` intents instead of direct function calls.
- **Intent types**: `FollowPlayerIntent`, `StopFollowingIntent`, `CameraTransitionIntent`, `SpawnParticleIntent`
- **Consumer pattern**: Systems read intents from world storage, act on them, then remove them. Producers don't import consumer modules.
- **Documented pattern** in `docs/intent-based-architecture.md` with full execution order contract.
### Dialog System Suite
- **Dialog state machine**: Ink-based story progression with display timer, projectile phases, parry mechanics.
- **Projectile system**: Spawns physics-driven projectiles with parry windows; detects hits vs. evasion vs. parries (I/J/L buttons).
- **Dialog camera**: Auto-frames all dialog participants; transitions smoothly between follow-cam and dialog-cam via intent; computes centroid + spread.
- **Bubble rendering**: Billboard-based text with word-wrap, dynamic sizing (tail height → body dimensions), border/fill colors, RGBA text atlas.
### Text & Font Rendering
- **Font atlas pipeline**: Pre-rasterized glyphs (16×8 grid, 124px cells) from Departure Mono font.
- **Text measurement**: Character-width aware layout with line wrapping against max bubble width.
- **Vertex-based text**: Custom `TextVertex` (position, UV) fed into dedicated text pipeline with view-proj uniform.
### Particle System
- **Intent-driven spawning**: `SpawnParticleIntent` queues particle emissions; `particle_intent_system` transfers into persistent `ParticleBuffers`.
- **Configurable emitters**: Burst count, lifetime range, speed range, directional spread (cone), gravity, size range, color gradient.
- **Snow particle integration**: Spawned continuously at camera position for screen-fill effect.
### Render Pipeline
- **Global renderer via thread-local**: `render::global` module centralizes `Device`/`Queue` access for loaders and systems; long-term goal is explicit `RenderContext` params.
- **Gizmo shader**: Fragment shader outputs world-normal as axis color (X=red, Y=green, Z=blue) for entity transform editing.
- **Snow light accumulation**: Persistent texture tracking deformation; blue-noise dithering maps snow brightness into tile pattern (brightness > threshold → dither step).
- **Dissolve shader**: Blue-noise masked alpha cutoff; controlled by `enable_dissolve` uniform.
### Tree Occlusion & Instances
- **Tree dissolve system**: Per-instance dissolve amounts lerp toward targets at configurable speed.
- **Occlusion detection**: Instances between camera and player dissolve based on perpendicular distance to camera-to-player ray.
- **Instance buffer sync**: Tree instances updated into GPU buffer after dissolve state changes.
### Trigger & Event Flow
- **Sphere-based triggers**: Continuous state tracking (Idle ↔ Inside); fires `TriggerEvent` with `Entered`/`Exited` kinds.
- **Activation filtering**: `TriggerFilter::Player` specifies which entity types can activate.
- **Event queue**: Events collected in `world.trigger_events` and consumed by dialog system to spawn bubbles.
### Player State Machine
- **State hierarchy**: Idle, Walking, Jumping, Falling, Leaping (dash), Rolling.
- **Transition logic**: Grounded checks, input presence, airtime duration.
- **Physics per-state**: Damping on enter (Idle), horizontal input application (Walking), vertical velocity control (Jumping).
### Editor & Inspector
- **Dear ImGui integration**: Inspector window with player state display, entity transform gizmos.
- **Entity selection**: Right-click picking; gizmo renders for selected entity when editor active.
- **UI mode gating**: Systems check `editor.wants_keyboard()`/`wants_mouse()` to suppress game input during inspector focus.
## Stability
| Area | Last Changed | Status |
|---|---|---|
| Physics manager | 80+ days | Stable |
| Camera follow | 30 days | Stable — intent system reduced coupling |
| Movement component | 30+ days | Stable |
| Mesh loader | 30+ days | Stable |
| Spotlight sync | 30 days | Stable |
| State machine physics | 30 days | Stable — core transitions unchanged |
| Debug colliders | 30+ days | Stable |
## Open Threads
- **Global renderer thread-local**: Marked for gradual migration to explicit `RenderContext` parameters on systems/loaders. Current implementation works; refactor is low-priority.
- **Text rendering completeness**: Font atlas + text pipeline in place; scaling and color support functional. No known issues.
- **Dialog parry mechanics**: Projectile system complete; integration with Ink outcomes working. Gameplay tuning (PARRY_WINDOW_RADIUS, HIT_RADIUS) ongoing.
- **Tree occlusion performance**: Occlusion system runs every frame; no visibility culling yet. Scalability unknown for >100 trees.