Visual & Performance Leap
Modern rendering pipeline + web-performance discipline. Ship beauty without sacrificing determinism.
Sprint Theme
- "Physics is truth. Rendering is persuasion."
- "Ship beauty without sacrificing determinism."
- "Measure first. Optimize second. Never guess."
- This sprint upgrades visual fidelity + world scale while adding a performance/quality harness.
- We are a web game. We push modern GPU techniques hard, but we do not crash browsers.
What Was Built
- Quality tier system (LOW/MEDIUM/HIGH/AUTO) with automatic device detection
- AUTO mode adapts based on device signals + live FPS after warmup
- ACES tone mapping + physically correct lights enabled
- Tiered shadow quality (512-2048 shadow maps based on tier)
- Height fog / exponential fog tuned for depth and atmosphere
- Modern PBR materials for all obstacles and props
- Asset pipeline foundation (glTF loader, compression hooks, caching)
- PerformanceHUD showing FPS, draw calls, triangles, quality tier
- QualityTierGuard: auto step down if FPS drops, conservative step up
Camera Polish
- Speed-based FOV ramp (subtle +8 degrees max at high speed)
- Camera occlusion handling via raycast (prevents clipping)
- Micro camera shake on hard landings (HIGH quality only)
- LMB orbit, RMB/C freelook consistent with documented controls
Renderer Error Safety
- WebGL context loss detection and recovery
- On renderer failure, fall back to LOW quality (no white screen)
- Non-blocking error handling for postprocessing failures
- All visual features degrade gracefully
New Regression Test
- /dev/render-smoke: Automated renderer regression harness
- Tests: initialization, quality tier activation, AUTO mode, FPS stability
- Tests: tier fallback on forced step-down, context recovery
- Reports PASS/FAIL with detailed breakdown
Non-Negotiable Invariants (Preserved)
- No import-time side effects introduced
- Only .svelte components own lifecycle hooks
- Single physics world per /play session
- Physics loop is fixed timestep (60 Hz) and deterministic
- Render loop may be variable timestep, but never drives physics
What We Chose NOT to Build
- No multiplayer changes
- No trick detection or scoring
- No full open-world streaming (interfaces only)
- No heavy character animation system
- No massive asset downloads - kept initial payload reasonable
Acceptance Criteria Met
- /play no longer looks like primitive grey dev geometry
- Scene has ACES tone mapping + believable shadows
- Fog/atmosphere creates depth; world feels larger
- /play runs without crashing on typical hardware
- AUTO quality tier works: starts safe, steps down if FPS low
- Renderer failure falls back to LOW gracefully
- No new lifecycle_outside_component errors
- /dev/render-smoke exists and reports test results
- Existing smoke tests still pass
Lessons Learned
- Quality tiers must be designed from the start, not retrofitted.
- AUTO mode needs warmup - first few seconds of FPS are unreliable.
- Fog is a cheap "feels big" multiplier for web games.
- Always have a fallback: LOW tier with no post-processing is your safety net.
- Performance HUD should always be visible in dev - what you can't see you can't fix.