In our previous developer logs forAs Duty Demands, we pulled back the curtain on the 1992 Del Bono Naval Retirement Home files—from Admiral Del Bono’s dishonorable discharge to the aborted NCIS raid. Today, inDevlog #5, we switch from narrative lore toGodot 4 engineering: how we built the game’s unsettling psychological tension using asymmetric corridor light haunting, spatialized 3D audio buses, procedural volumetric fog, and diegetic CCTV camera transitions.
⚓ Follow & Wishlist As Duty Demands on Steam
Experience Coral’s night-shift descent inside the Del Bono Naval Retirement Home. Check out theOfficial As Duty Demands Game PageandWishlist As Duty Demands on Steamto support our indie Godot 4 development!
1. Asymmetric Corridor Light Haunting (Why Bulbs Snap On and Die Slowly)
Standard horror games often toggle a light’s visibility on and off at fixed intervals, which quickly reads as a predictable metronome to the player. InAs Duty Demands, our corridor lighting controller (lights_manager.gd) treats every hallway sconce as an aging, overburdened electrical fixture connected to real 3D geometry and localized audio.
During scene initialization, the manager iterates through every lamp node in the corridor and callsduplicate()on each mesh’s surface material. By assigning unique material overrides per segment, every fixture can surge or fade independently without corrupting neighboring lamps.
The secret to making the flicker feel electrical rather than artificial isasymmetric interpolation speedscombined with real-time emission noise:
- Fast Surge vs. Slow Filament Decay:Power restoration runs at
VELOCITA_ACCENSIONE = 45.0(an instant voltage snap), while power loss decays atVELOCITA_SPEGNIMENTO = 6.0so tungsten filaments visibly cool down over several frames. - Unstable Active State:Even when a corridor lamp stays lit, we inject a +/- 10% random jitter onto its
emission_energy_multiplierevery frame and synchronize the physicalLight3Denergy ratio directly from the filament’s brightness curve. - Probabilistic Blackouts & Chain Shutdown:Inside the haunting coroutine (
light_corridor_goes_crazy()), cycles randomize every0.06s–0.18s, with a 4% chance per cycle to plunge every segment into sudden blackness for0.3s–0.8s. Later,kill_lights_chain_reaction()trips each segment sequentially down the corridor every0.05s–0.2s, leaving only a ghostlyMIN_EMISSION_RESIDUAL = 0.15ember glowing in the ceiling.
var speed = VELOCITA_ACCENSIONE if target > current else VELOCITA_SPEGNIMENTO
current = move_toward(current, target, speed * (max_val * 2.0) * delta)
if target > 0.5:
var flicker = randf_range(-(max_val * 0.1), (max_val * 0.1))
mesh_materials[i].emission_energy_multiplier = clamp(current + flicker, 0, max_val + 1.0)
else:
mesh_materials[i].emission_energy_multiplier = current
_sync_lights_in_segment(i, current / max_val if max_val > 0 else 0)2. Weather, Volumetric Fog & Spotlights That Don’t Follow a Clock
Outside the reception windows and along the upstairs hallway, three smaller environmental scripts work together so the Del Bono estate never feels static—even when no scripted scare is active:
- Procedural 3D Volumetric Fog (
fog_volume.gd):Rather than moving a static fog box, we extract theFastNoiseLiteresource nested inside ourFogMaterial’sNoiseTexture3Ddensity map and continuously shift its Z-offset with a sinusoidal gust wave (scroll_speed_z + sin(time) * random_intensity). The mist literally breathes through the building. - Distance-Scaled Thunder & Multi-Strike Lightning (
stanza_coral_light_fulmine.gd):Instead of a single flash, each lightning storm triggers2 to 5sub-strikes where flash duration scales inversely with peak HDR energy. The parallel thunder coroutine calculates aproximity_scalefrom the random0.2s–1.5saudio delay: closer strikes play brighter, louder (up to+6.0 dB), and slightly higher-pitched. - Burst-Based Red Warning Lights (
spot_light_red_tremolante.gd):Emergency and corridor accent spotlights alternate between chaotic bursts of3 to 6rapid voltage drops (0.03s–0.08s) and long, deceptive pauses lasting1.5s–5.0s—just enough time for the player to relax before the next surge hits.
3. Spatialized Audio Buses: Separating Dry Dread from Corridor Reverb
In first-person psychological horror, sound placement tells the brain whether a threat is inside the room or inside your own head. In our custom Godot 4default_bus_layout.tres, we split game audio across three distinct buses:Sfx,Sounds, andMusic.
Critically, theSfxbus carries an activeAudioEffectReverbfilter, whileSoundsremains dry and immediate:
- Per-Segment 3D Flicker Emitters:During setup,
lights_manager.gdspawns anAudioStreamPlayer3D(unit_size = 5.0,max_distance = 15.0) inside each hallway segment routed toSfx. Whenever a dead fixture sparks back to life, it plays with a randomized pitch (0.8–1.2); during the blackout cascade, every dying bulb drops topitch_scale = 0.5as the hall goes dark behind Coral. - Foreground vs. Distant Dread:Heavy mechanical events—the generator cutting out after the Del Bono recruitment VHS finishes, phantom knocks on the corridor doors, and the final exit door squeak—route through the reverberant
Sfxbus. Meanwhile, Coral’s footsteps, air-conditioning hum, thunder, and sudden tinnitus ring (ear_ring) bypass reverb onSoundsso vertigo feels intensely physical. - Logarithmic Music Fades:Emotional cues like our sorrowful piano theme (
SAD_SORROWFUL_PIANO_MUSIC) are brought down via sine-curved tweens to-80.0 dBover 1.5 seconds before stopping, ensuring tension collapses into sudden silence instead of abrupt audio cuts.
4. Diegetic CCTV Cameras, FastNoiseLite Shake & Vertigo Optics
BecauseAs Duty Demandsblends grounded nursing-shift realism with dissociative nightmares, our camera architecture swaps fluidly between Coral’s subjective eyesight and cold surveillance optics:
| Camera Rig / Script | Technical Implementation | Dramatic Role in Gameplay |
|---|---|---|
Camera3D_SecCamera( reception_dialogs.gd) | Playscamera_security_zoomonto the desk console, cuts to the wall CCTV rig withVHS_CanvasLayerscanlines for 2.0s, then enters dialogue | Establishes that Terry is watching Coral from behind glass and monitors before they even speak |
| Handheld Noise Rigs ( camera_phonecall.gd) | SamplesFastNoiseLite.get_noise_2d()at offset seeds (1.0,100.0,200.0) for subtle pitch/yaw drift, breathing Y-bob & 9s FOV zoom loops | Turns ominous phone calls into claustrophobic, documentary-style cinematic beats |
| Haunted Montage ( old_lady_cameras.gd&old_lady.gd) | Dolly-zoomscam1from FOV50° → 90°in 1s, then fires randomized0.8s–1.5scuts across 3 angles while an overheadSpotLight3Dswings and the entity’s animation rewinds at-2.0xspeed | Delivers a disorienting, nightmarish corridor confrontation without relying on cheap scripted UI pop-ups |
| Vertigo & Tinnitus DOF ( player.gd) | TweensCameraAttributesPracticalnear/far DOF blur (10.0/50.0) and pushesexposure_multiplier = 8.0synced withear_ring | Blurs reality and washes the screen in white light as Coral snaps back from corridor hallucinations |
Notice how none of these systems operate in isolation: when the corridor phantom appears at the end of the hall, the overhead spotlight begins swinging on sine and cosine waves (old_lady.gd), the 3D raycast range extends from3mto15m(allunga_raggio(true)) so merely spotting her triggers the possession camera cuts, and exiting the hallway hits Coral with simultaneous tinnitus audio, overexposure, and Depth-of-Field disorientation before snapping him back to Terry’s typing keyboard.
5. What’s Next in Devlog #6 & More Horror Series
In our upcomingAs Duty Demands Devlog #6, we will open up our custom dialogue & character performance pipeline—showing how procedural blend-shape blinking,0.08seye saccades, 3D newspaper uncrumpling, and 13-language localization bring Terry and Coral’s tense reception scenes to life.
Missed earlier chapters or want to play something while waiting for release? Explore the rest of the Rabbit Bay Games universe:
- Series Overview:As Duty Demands Devlog: Crafting Psychological Horror Inside the Del Bono Home
- 1992 Backstory Files:Start atLore Devlog #1: The Rise and Fall of the “Iron Anchor”or readLore Devlog #4: Decoding the 12 Wall Inscriptions.
- Play Free Browser Games:TryThe Experiment,Shadows of the Forest, andMad Death Arenadirectly in your browser on theRabbit Bay WebGL Arcade.
🚢 Help Us Bring the Del Bono Files to Steam
AddAs Duty Demandsto your Steam Wishlist today and follow development through every Godot 4 milestone.
Wishlist As Duty Demands on Steam →Subscribe to the Newsletter!

