Skip to main content

Crate perturbator_orchestra

Crate perturbator_orchestra 

Source
Expand description

Pure orchestration between a pacing director, adaptive hunt AI, and presentation.

perturbator_orchestra maps perturbator_director::PacingContext into the small perturbator_hunt_ai::HuntPacing contract and combines pacing with sanitized hunt telemetry to produce continuous emotional intent plus sparse dramatic cues. It never queries a world, plays audio, moves a boss, or controls a camera; hosts translate its normalized output into their own presentation stack. The same contract serves 3D and isometric games first, and 2D games as well, because it contains no coordinate, transform, camera, or navigation types.

use perturbator_director::PacingContext;
use perturbator_orchestra::{
    ConductorInput, EmotionalConductor, HuntPacingMapper, HuntStage, HuntTelemetry,
    PlayerAgency,
};

let mut pacing = PacingContext::default();
pacing.tension = 0.7;
let hunt_pacing = HuntPacingMapper::default().map(pacing)?;
let hunt = HuntTelemetry::new(HuntStage::Search, 0.6, 0.5, 0.0, false)?;
let output = EmotionalConductor::default().update(
    1.0 / 60.0,
    ConductorInput {
        pacing,
        hunt_pacing,
        hunt,
        agency: PlayerAgency::InControl,
        reduced_sensory: false,
    },
)?;
assert!(output.intent().dread() > 0.0);

Structs§

AxisSmoothing
One attack/release pair for exponential smoothing.
ConductorConfig
Timing and safety limits for EmotionalConductor.
ConductorInput
Immutable input for one conductor update.
ConductorOutput
Output of one conductor update.
EmotionalConductor
Stateful emotional orchestrator with attack/release smoothing and cue debouncing.
EmotionalIntent
Normalized emotional axes consumable by music, ambience, lighting, or camera adapters.
HuntPacingMapConfig
Designer-authored mapping from macro pacing into the hunt AI’s two-axis input.
HuntPacingMapper
Validated, deterministic bridge from PacingContext to HuntPacing.
HuntTelemetry
Sanitized hunt facts safe for presentation systems.
PacingModifiers
Optional host adjustments applied after the director context is sampled.

Enums§

EmotionalCue
Edge-triggered dramatic punctuation emitted by the conductor.
HuntStage
Player-visible phase of an adaptive hunt.
OrchestraError
Fail-closed error returned for invalid configuration or runtime input.
PlayerAgency
Whether presentation may safely escalate while the player can respond.

Type Aliases§

OrchestraResult
Result alias used by orchestra operations.