docs: panopticon auto-update for snow_trail
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
# Changelog
|
||||
|
||||
*Last updated: Friday, April 3, 2026*
|
||||
*Last updated: Tuesday, April 7, 2026*
|
||||
|
||||
## Active Areas
|
||||
|
||||
| Area | Changes (30d) | Status |
|
||||
|------|---|---|
|
||||
| Main loop & systems | 9 churn | Active — intent-based architecture solidifying |
|
||||
| Main loop & systems | 9 churn | Active — explicit storage parameters |
|
||||
| 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 |
|
||||
| Content pipeline | 1 churn | New — Blender export addon |
|
||||
|
||||
## Recent Changes
|
||||
|
||||
### System Signature Refactor (Major)
|
||||
- **Completed**: All 16 systems refactored to take explicit `Storage<T>` parameters instead of `&World`/`&mut World`.
|
||||
- **Pattern**: Functions receive only storages they need (e.g., `camera_follow_system` takes `&Storage<FollowComponent>`, `&Storage<CameraComponent>`, `&mut Storage<Transform>`).
|
||||
- **Benefit**: Explicit data dependencies improve borrow checker clarity and code readability.
|
||||
- **Main loop** (`src/main.rs`): Updated to pass individual storage fields at call sites rather than whole `World` reference.
|
||||
- **Affected systems**: `camera_input_system`, `camera_intent_system`, `camera_follow_system`, `camera_noclip_system`, `camera_ground_clamp_system`, `dialog_camera_transition_system`, `dialog_camera_system`, `player_input_system`, `physics_sync_system`, `render_system`, `particle_intent_system`, `particle_update_system`, `trigger_system`, `dialog_system`, `dialog_projectile_system`, all state machines.
|
||||
|
||||
### 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`
|
||||
- **Completed major refactor** (3 weeks ago): Systems 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.
|
||||
@@ -33,51 +40,58 @@
|
||||
- **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`.
|
||||
- **Intent-driven spawning**: `particle_intent_system` reads `spawn_particle_intents` Vec, transfers configs 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.
|
||||
- **Snow particle integration**: Spawned continuously at camera position for screen-fill effect; `spawn_snow_particles` adds particles to `ParticleBuffers`.
|
||||
|
||||
### 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).
|
||||
- **Global renderer via thread-local**: `render::global` module centralizes `Device`/`Queue` access for loaders and systems.
|
||||
- **Draw call generation**: `render_system` reads `entities`, `transforms`, `meshes`, `dissolves` storages; generates `DrawCall` per visible entity.
|
||||
- **Gizmo shader**: Fragment shader outputs world-normal as axis color (X=red, Y=green, Z=blue).
|
||||
- **Snow light accumulation**: Persistent texture tracking deformation; blue-noise dithering maps snow brightness into tile pattern.
|
||||
- **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.
|
||||
- **Tree dissolve system**: Per-instance dissolve amounts lerp toward targets; updated via `tree_occlusion_system` which reads player transforms and cameras.
|
||||
- **Instance buffer sync**: `tree_instance_buffer_update_system` syncs dissolve state changes to GPU buffer after state updates.
|
||||
|
||||
### Trigger & Event Flow
|
||||
- **Sphere-based triggers**: Continuous state tracking (Idle ↔ Inside); fires `TriggerEvent` with `Entered`/`Exited` kinds.
|
||||
- **Sphere-based triggers**: `trigger_system` runs each fixed step; reads `triggers`, `transforms`, `player_tags` storages; 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.
|
||||
- **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.
|
||||
- **Physics per-state**: `state_machine_physics_system` applies damping on enter (Idle), horizontal input application (Walking), vertical velocity control (Jumping).
|
||||
- **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.
|
||||
- **Entity selection**: Right-click picking calls `picking::pick_entity` with ray; 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.
|
||||
|
||||
### Blender Export Addon
|
||||
- **Plugin**: `blender/addons/snow_trail_export.py` provides one-click glTF + EXR export from Blender 5.0.
|
||||
- **glTF operator** (`SNOWTRAIL_OT_export_gltf`): Exports selected mesh objects to `assets/meshes/{blend_filename}.gltf` with configurable modifiers, vertex colors, materials.
|
||||
- **Heightmap bake operator** (`SNOWTRAIL_OT_export_heightmap`): Calls `generate_heightmap.py` to bake terrain Z-position as 32-bit EXR to `assets/textures/terrain_heightmap.exr` (1024px default).
|
||||
- **UI panel**: "Snow Trail" category in 3D viewport; auto-discovers project root by walking directory tree until `assets/` and `blender/` found.
|
||||
|
||||
## Stability
|
||||
|
||||
| Area | Last Changed | Status |
|
||||
|---|---|---|
|
||||
| Physics manager | 80+ days | Stable |
|
||||
| Camera follow | 30 days | Stable — intent system reduced coupling |
|
||||
| Camera follow | 30 days | Stable — now takes explicit storage params |
|
||||
| Movement component | 30+ days | Stable |
|
||||
| Mesh loader | 30+ days | Stable |
|
||||
| Spotlight sync | 30 days | Stable |
|
||||
| State machine physics | 30 days | Stable — core transitions unchanged |
|
||||
| Spotlight sync | 30 days | Stable — explicit storage params applied |
|
||||
| State machine physics | 30 days | Stable |
|
||||
| Debug colliders | 30+ days | Stable |
|
||||
| System signatures | New | Stable — refactor complete, no behavioral changes |
|
||||
|
||||
## 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.
|
||||
- **Global renderer thread-local**: Marked for gradual migration to explicit `RenderContext` parameters on systems/loaders.
|
||||
- **Dialog parry mechanics**: 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.
|
||||
- **Heightmap bake normalization**: Exported EXR uses raw Z-coordinate; game may need per-level scale application.
|
||||
Reference in New Issue
Block a user