src/projects/horror-game/page.tsx
workspace/projects/horror-game

Asymmetric Psychological Horror Architecture

Architecture
Role

Gameplay Architect & Technical Lead

Timeline

Jul 2024 - Oct 2024

-- Source Code

ParanoiaManager.luau1 of many files
luau
1local Players = game:GetService("Players")
2local ReplicatedStorage = game:GetService("ReplicatedStorage")
3local RunService = game:GetService("RunService")
4
5local Knit = require(ReplicatedStorage.Packages.Knit)
6local GameConfig = require(ReplicatedStorage:WaitForChild("GameConfig"))
7
8local ParanoiaManager = Knit.CreateService {
9 Name = "ParanoiaManager",
10 Client = {
11 TriggerGlitch = Knit.CreateSignal(),
12 },
13}
14
15local PARANOIA_MAX = 100
16local PARANOIA_MIN = 0
17local ISOLATION_DISTANCE = 100
18local INCREASE_RATE = 2
19local DECREASE_RATE = 5
20

-- Description

Designed and implemented a production-grade, highly modular systems architecture for an asymmetric psychological horror game using the Luau language. Using Rojo for environment management and Wally for package dependencies, the business logic was completely isolated from visual components. Client-server communications are managed via Knit RPC services, minimizing transmission payload overhead. Data persistence is managed via ProfileService, integrating session-locking and Promise-based exception handlers to eliminate race conditions. The user interface was built using the Fusion library, yielding declarative, reactive HUD components that avoid manual tree mutations. Built a multi-threaded player proximity profiling engine running on the Heartbeat cycle. The dynamic isolation indices are calculated in real-time to drive sensory payloads on client devices. Implemented an artificial latency simulation (fake lag) system through busy-waiting locks in the RenderStepped loop, as well as an algorithmic spatial audio deconstruction filter utilizing non-linear TweenService interpolation. Developed a real-time text obfuscation parser that uses stochastic variables to emulate typoglycemia and typing latency, injecting modified packets directly into the client's TextChatService.

-- Technologies

LuauRojoWallyKnitProfileServiceFusion (Reactive UI)TweenService

Challenges

Preventing data duplication and session conflicts during high-concurrency client drops, structuring reactive UI layouts without DOM mutation overhead, and simulating psychological dread components (typoglycemia/audio degradation) without blocking the client thread.

Solutions

Created a strict state controller utilizing ProfileService session-locks, utilized Fusion's reactive state graphs for HUD rendering, and executed audio/text obfuscation pipelines asynchronously in isolated worker loops.

-- Snippet

horror-game.luau
local p = workspace:FindFirstChild("AsymmetricHorror")

// EOF - Built with Next.js, Tailwind CSS & Framer Motion