Files
zombie-fps/docs/OFFICE-ATMOSPHERE.md
T

2.4 KiB
Raw Blame History

Office horror atmosphere

scripts/office_atmosphere.gd adds two desks, three chairs and a metal fire barrel. Props use low-poly primitives with simple static collisions on world layer 1. Positions avoid the four cardinal entry corridors and the central combat space. The zombies still use their existing direct pursuit, not a new pathfinding system; props can obstruct arbitrary paths when the player hides behind them.

The central ceiling OmniLight was removed. Ambient energy is 0.12 with a cool blue color, preserving silhouette readability rather than total darkness. Two warm desk lamps use short-range unshadowed OmniLights. The barrel is the only persistent shadow-casting light (range10, energy1.9–2.8), with smooth bounded sine-based flicker. The existing muzzle flash is unchanged: four omni lights total.

Fire uses 28 CPUParticles3D and small unshaded additive billboard quads. A generated 64x96 alpha flame mask is in assets/effects/flame.png. No glow, volumetric fog, GI, GPU particles or Forward+-only effects are required. No fire damage was added. The flame mesh does not cast shadows. The barrel and furniture do.

References consulted (Perplexity unavailable; official docs via Exa):

Compatibility defaults to eight omni lights per mesh. Shadows are expensive and can change light brightness because Compatibility uses a different shadowed-light rendering path; visual checks were therefore done with gl_compatibility.

Verification (installed Godot4.7.1):

"$G" --headless --path . --script res://tools/test_office_atmosphere.gd
"$G" --display-driver x11 --rendering-method gl_compatibility --path . \
  --script res://tools/test_office_atmosphere.gd -- --screenshot

Checks: prop counts/collisions, bounded flicker, CPU emitter, light count, absent ceiling light, low ambient, free cardinal ray corridors and desk collision. Three screenshots /tmp/zombie-office-{0,1,2}.png inspected, including the barrel. All seven prior suites pass: health/sky, music, grenade, waves, death, damage, touch. Existing resource-in-use warnings at test shutdown remain. Actual smartphone performance has not been measured; this is a small light/particle budget, not an FPS guarantee. Keep testing arbitrary zombie routes around the new obstacles.