Skip to content

05 — Snapshots, Authority, Time

Goal:
Teach the meta-features of the status system: saving/restoring, multiplayer authority, and time control.


🎓 What This Scene Teaches

  • Snapshots: capture and restore active effects (ID, duration, remaining).
  • Authority seam: tick only when authoritative (e.g. server-side in multiplayer), otherwise pause safely.
  • Time modes: Scaled, Unscaled, Paused, Custom.
  • Custom time source: freeze or scale time arbitrarily.

⚠️ Authority Note
This scene runs with Require Authority disabled by default.
Status mutations are allowed locally for demonstration purposes.

Enabling an authority binder alone will not block status mutations unless
Require Authority is enabled on the StatusEffectController — this is intentional.

Authority is opt-in on StatusEffectController.
https://revandrab.github.io/RevFramework/authority/#status-effects-opt-in-authority-gameplay-modifiers


🧩 How to Use

  1. Apply sample statuses (Poison, Haste, etc.).
  2. Click Capture Snapshot — see the list of active effects.
  3. Click Clear All, then Restore Snapshot — effects return with the same remaining times.
  4. Toggle Is Authoritative — timers freeze/unfreeze live.
  5. Switch Time Mode:
  6. Scaled: respects Time.timeScale.
  7. Unscaled: ignores slow-motion.
  8. Paused: freezes all ticking.
  9. Custom: use the slider to scale delta manually.

Example Uses

  • Tactical pause systems where buffs, DOTs, and cooldowns must freeze while UI remains active.
  • Cinematic “death blow” or finisher moments where camera, animation, and VFX play without status timers expiring.
  • Turn-based overlays on real-time games (pause status ticking during decision phases, resume on commit).
  • Photo mode or inspection views that must not advance gameplay state.
  • Debug tooling to capture and restore live combat state during editor-time testing.

💡 Key Takeaway

This is the infrastructure demo showing: - Save/load integration via snapshots. - Multiplayer correctness via authority gating. - Game-flow control via time modes.

This approach avoids relying on Time.timeScale = 0, which commonly causes DOTs, buffs, and cooldowns to desync during pauses or cutscenes.


Panel: StatusSnapshotsAuthorityTimePanel
Scene Path: Assets/RevFramework/Runtime/Systems/StatusEffects/Samples/Scenes/05_SnapshotsAuthorityTime/