Back to projects
Architecture

Psychological Horror Gameplay Systems

Role: Gameplay Programmer
Timeline: Jul 2024 - Oct 2024

Code Preview

ParanoiaManager.luaufile preview
luau
1local Players = game:GetService("Players")
2local ReplicatedStorage = game:GetService("ReplicatedStorage")
3local RunService = game:GetService("RunService")
4
5local ParanoiaManager = {}
6local triggerGlitchRemote = ReplicatedStorage:WaitForChild("TriggerGlitch") :: RemoteEvent
7
8local PARANOIA_MAX = 100
9local PARANOIA_MIN = 0
10local ISOLATION_DISTANCE = 100
11local INCREASE_RATE = 2
12local DECREASE_RATE = 5
13
14local paranoiaLevels: { [Player]: number } = {}
15local nextGlitchTimes: { [Player]: number } = {}
16local GLITCH_TYPES = { "FakeLag", "AudioCut" }
17
18function ParanoiaManager.getParanoiaLevel(player: Player): number
19 return paranoiaLevels[player] or 0
20end

Overview

Built the underlying gameplay framework for an asymmetric multiplayer horror game. Designed mechanics for dynamic audio isolation, sanity-based sensory effects, and clean multiplayer synchronization. Managed with Rojo and Wally, using ProfileService session locking for reliable player data persistence.

Stack

LuauRojoWallyProfileServiceState ArchitectureTweenService

The Hard Part

Handling perceptual audio effects and UI distortions locally without desyncing player state across the network.

How It Was Handled

Separated local visual and audio distortion logic from server-authoritative state, queued critical network requests, and used ProfileService session locks to prevent data loss.