Architecture & Challenge
Atmospheric horror depends on reliable AI navigation and zero-stutter scripted sequences. We engineered a multi-state stalker AI using Roblox PathfindingService with waypoint caching, line-of-sight aggro cones, and synchronized server-to-client camera cutscenes.
Multi-State AI
The stalker switches between patrol, investigate, and chase states based on noise events. Footsteps, locker doors, and generator rumble all feed into a shared hearing model. Waypoint caching keeps path recomputation under 4ms even during chase sequences.
Engineering Highlights
- Stalker AI dynamically investigates player footsteps, locker doors, and generator noise.
- Synchronized 4-player lobby-to-chapter TeleportService pipeline with private party codes.
- Custom volumetric fog and lighting zones triggered cleanly per room.
Luau Implementation Excerpt
ServerScriptService/AI/StalkerBrain.luau
Luau
local StalkerBrain = {}
if ok and path.Status == Enum.PathStatus.Success then
end
return {}
end
return StalkerBrain
Environment Gallery
Need a Custom Luau Engineering Scope?
Combine scripting, DataStore migration, and UI design into a single milestone sprint tailored to your release date.