6.9 KiB
6.9 KiB
Changelog
Last updated: Tuesday, April 7, 2026
Active Areas
| Area | Changes (30d) | Status |
|---|---|---|
| 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_systemtakes&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 wholeWorldreference. - 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 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.
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:
particle_intent_systemreadsspawn_particle_intentsVec, transfers configs into persistentParticleBuffers. - 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;
spawn_snow_particlesadds particles toParticleBuffers.
Render Pipeline
- Global renderer via thread-local:
render::globalmodule centralizesDevice/Queueaccess for loaders and systems. - Draw call generation:
render_systemreadsentities,transforms,meshes,dissolvesstorages; generatesDrawCallper 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_dissolveuniform.
Tree Occlusion & Instances
- Tree dissolve system: Per-instance dissolve amounts lerp toward targets; updated via
tree_occlusion_systemwhich reads player transforms and cameras. - Instance buffer sync:
tree_instance_buffer_update_systemsyncs dissolve state changes to GPU buffer after state updates.
Trigger & Event Flow
- Sphere-based triggers:
trigger_systemruns each fixed step; readstriggers,transforms,player_tagsstorages; firesTriggerEventwithEntered/Exitedkinds. - Activation filtering:
TriggerFilter::Playerspecifies which entity types can activate. - Event queue: Events collected in
world.trigger_eventsand consumed bydialog_systemto spawn bubbles.
Player State Machine
- State hierarchy: Idle, Walking, Jumping, Falling, Leaping (dash), Rolling.
- Physics per-state:
state_machine_physics_systemapplies damping on enter (Idle), horizontal input application (Walking), vertical velocity control (Jumping). - Transition logic: Grounded checks, input presence, airtime duration.
Editor & Inspector
- Dear ImGui integration: Inspector window with player state display, entity transform gizmos.
- Entity selection: Right-click picking calls
picking::pick_entitywith 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.pyprovides one-click glTF + EXR export from Blender 5.0. - glTF operator (
SNOWTRAIL_OT_export_gltf): Exports selected mesh objects toassets/meshes/{blend_filename}.gltfwith configurable modifiers, vertex colors, materials. - Heightmap bake operator (
SNOWTRAIL_OT_export_heightmap): Callsgenerate_heightmap.pyto bake terrain Z-position as 32-bit EXR toassets/textures/terrain_heightmap.exr(1024px default). - UI panel: "Snow Trail" category in 3D viewport; auto-discovers project root by walking directory tree until
assets/andblender/found.
Stability
| Area | Last Changed | Status |
|---|---|---|
| Physics manager | 80+ days | Stable |
| 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 — 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
RenderContextparameters 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.