AI
Modern Medicine features a variety of unique AI agents, each with distinct behaviors and gameplay roles. The overview below highlights what each monster does.
SYSTEMS
All AI agents in Modern Medicine share a set of core systems, enabling modular, reusable, and scalable behavior across the game’s diverse monster roster.
Navigation: Monsters navigating procedurally generated hallways use a shared A* pathfinding module, while agents confined to rooms leverage a simplified node-based navigation system. Node paths are dynamically stitched at runtime to accommodate procedural layouts.
Animation: All 3D monsters utilize a centralized animation module that synchronizes animations between the client and server, ensuring smooth, responsive movement in multiplayer scenarios.
Behavior Trees: For complex behaviors, monsters rely on behavior trees, implemented with BTreesV5. This allows each agent to maintain unique AI patterns while reusing core systems, supporting both straightforward and intricate behaviors.
Region System & Dynamic Spawning: AI decision-making and agent spawning are tightly integrated with a region system that tracks player location at multiple levels of granularity. The system stores metadata for each node, room, and hallway biome, broadcasting events whenever a player moves between nodes, rooms, or biomes. AI can react to specific changes, such as a player entering or exiting a room, moving to a new biome, or traversing the halls node by node, while also being able to poll the system for real-time location data. This allows:
Adaptive AI behavior (e.g., enabling or disabling agents based on player position)
Context-sensitive effects (e.g., “get out” warnings for Hunters)
Optimized performance by limiting unnecessary AI updates in inactive regions
These shared systems provide a flexible and performant foundation, supporting dynamic procedural layouts, event-driven AI, and immersive multiplayer gameplay. Together, they allow the monsters of Modern Medicine to remain challenging, responsive, and engaging while maintaining a modular, maintainable architecture.

MONSTERS
LARRY
Larry is the flagship monster and the face of Modern Medicine. He appears after players complete the puzzle at each cycle, relentlessly chasing them back to the ICU, the game’s central hub. With each subsequent appearance, Larry increases in speed, making encounters progressively more intense. A single hit from Larry instantly defeats the player, heightening the stakes of every chase.
Larry’s behavior is powered by the player region system and A* pathfinding combined with the level node graph, allowing him to efficiently locate and pursue his target through the procedurally generated hallways.
Key gameplay and design elements include:
- Auditory cues: Larry’s heavy footsteps reverberate through the hallways, giving players their first warning.
- Screen shake: The closer Larry gets, the more his footsteps shake the player’s view, adding tension and immersion.
- Visual cues: Each step generates a ring of fire around Larry, signaling his attack radius while amplifying the spectacle.
- Terrifying presence: Larry emits an escalating sound as he nears the player, reinforcing the chase experience.

JOHNNY
Johnny is a radiation-based monster spawned from the hospital’s additional inhumane experiments. He inhabits the medicine wing, which consists of a series of patient rooms connected by hallways, creating a stealth-focused gameplay segment. Players must hide in rooms as Johnny navigates the hallways, collecting items and avoiding detection to progress.
Johnny’s movement is procedurally randomized: at the start of each cycle, he selects a hallway endpoint and travels to another end, sometimes along the same hallway. As he passes, doors to nearby patient rooms swing open, enhancing tension and immersion while reinforcing player stealth mechanics. Johnny also emits a Geiger counter noise and intense screen shake when players are nearby, signaling his presence and heightening suspense.

Because Johnny does not actively chase players, A* pathfinding is unnecessary. Instead, navigational nodes are placed at each hallway endpoint, defining paths from out-of-bounds start points to the main hallway. Each hallway branch is procedurally generated, and the node paths are stitched together at runtime, allowing Johnny to navigate dynamically through a constantly changing environment while maintaining controlled, predictable movement.

DR. THOMPSON
Dr. Thompson is the hospital’s main antagonist, encountered only in the Operating Room. Players see his projected form looming over their immobilized avatar on the operating table, creating an intense POV experience that players consistently enjoy. If the player looks at him for too long, his head suddenly animates to stare directly at them, heightening tension. Dr. Thompson only attacks after this trigger has occurred and line of sight is broken, delivering a dramatic and precise gameplay moment.

For responsiveness and immersion, Dr. Thompson’s vision system is client-sided. Three conditions must be satisfied for him to engage the player:
- The player is within the proper distance.
- Dr. Thompson is visible within the player’s viewport.
- A raycast from the monster’s head hits the player, with collision groups configured to allow raycasts through transparent objects.
Once all checks pass, Dr. Thompson begins the activation sequence. After a brief but randomized delay, he stares down the player, and the moment the line of sight is broken, the attack is executed, creating a high-tension, cinematic gameplay experience.
ROACHES
Roaches are minor yet dynamic AI agents that wander the hospital hallways. When hungry, they will fly onto the player’s face and attack until swatted away, creating tense and unpredictable moments.
Their movement is driven by node-based A* pathfinding, enhanced with additional navigational points within each node to introduce variation and make their paths less predictable. Once a player is detected, roaches fly directly onto the player’s moving avatar using a custom linear interpolation system, allowing precise interception of dynamic targets—a behavior not achievable with Roblox’s TweenService alone.

WANDERING FACES
Wandering Faces are minor AI agents that drift slowly along the hospital hallways, designed to bring the environment to life and subtly increase tension. Whether they move randomly or attempt to navigate toward the player is determined procedurally, adding unpredictability to hallway traversal.
When a player stares at a Wandering Face, a tunnel vision effect begins to take hold. Prolonged staring causes the monster to draw the player in, dealing damage. While individually minor, their presence can make movement through the hallways more challenging, particularly in later stages when other monsters populate the same space. In these scenarios, Wandering Faces act as natural “obstacles,” forcing players to balance attention and movement to avoid both environmental hazards and more dangerous enemies.
To optimize performance, only a small number of Wandering Faces exist in the world at any time. Once a face moves far from all players, it respawns closer to the action, ensuring hallways remain populated and the environment feels dynamic without overloading resources.
This design also synergizes with the Unseen Ones late in the game: players must look away from Wandering Faces to avoid their effect, while simultaneously needing to look toward Unseen Ones to avoid them, creating tense, layered encounters in the final stages.

HUNTER
The Hunter is a reactive AI designed to maintain pacing and tension in multiplayer lobbies. During playtesting, we discovered that in random lobbies, players often lagged behind, preventing the group from progressing efficiently through the core quest. The Hunter addresses this by encouraging players to keep moving toward objectives while adding intensity to chase sequences.
Each player is assigned a unique Hunter, visible only to them but fully controlled by the server. Hunters begin in a passive state, observing the player at a distance. Their approach is signaled by all direction panels illuminating simultaneously, alerting players to the incoming threat.
Hunters utilize the game’s region system to track player locations. When a player hides in a room, the Hunter triggers a “get out” GUI effect, warning the player and encouraging movement. If the player remains too long, the Hunter attacks within the room, dealing moderate damage and teleporting the player to the quest’s destination. Once the player returns to the hallways, the GUI effect automatically disables, maintaining clear feedback without disrupting gameplay.
Players can temporarily delay the Hunter’s attack by breaking line of sight or moving between rooms, but lingering too long triggers the warning and forces progression. By combining player-specific tracking, line-of-sight detection, teleportation mechanics, and region-based triggers, Hunters both enforce pacing and enhance tension, preventing stalling while intensifying chase encounters.



UNSEEN ONES (ANGELS)
The Unseen Ones are the final and scariest monsters in Modern Medicine, heavily inspired by the Weeping Angels from Doctor Who. Found exclusively in the experimentation wing during the game’s finale, these silent stalkers move incredibly quickly when out of the player’s line of sight, creating intense, nerve-wracking encounters.
When a player turns to look at them, the Unseen Ones continue animating briefly before freezing mid-motion, heightening tension and delivering powerful moments. Their design makes them both terrifying and strategically engaging, as players must carefully manage what they see while navigating the regenerated hallways.
The true challenge emerges when the hallways are populated with multiple monsters near the end of the game. In particular, the Unseen Ones synergize with Wandering Faces: looking away from the Unseen Ones keeps them moving, while staring at Wandering Faces triggers their attacks. This combination forces players to balance attention and movement, creating some of the most stressful and memorable moments in the game.

Unseen Ones’ movement logic is handled server-side for consistency and player synchronization, and relies on two checks:
- Raycasting – ensures there are no obstacles between the player and the monster (other agents are ignored).
- Player gaze detection – calculates the angle between the player’s look vector and the vector to the monster’s head using a dot product:
local dVec = agentHead.Position - viewerHead.Position
-- Positive means the player is looking at the monster; 0 is a right angle; negative means not visible
local inFov = dVec:Dot(viewerHead.CFrame.LookVector) > 0
These mechanics allow Unseen Ones to move silently, freeze when observed, and strike unpredictably, making them the ultimate hallway threat and the centerpiece of the game’s finale.
Back