The game
A Chain of Pain is a story-driven first-person horror game in development in Unreal Engine 5 and C++. The player explores a manor and the hospital behind it, mostly in darkness and with a flashlight, while a Hunter moves through the building and reacts to what it sees and hears.
The current playable build connects exploration, stealth, environmental interaction, enemy AI, positional audio, an adaptive original soundtrack, pursuit and capture into one continuous loop. The systems feed each other: how the player moves, where the light points and which doors open change what the Hunter knows, and the Hunter's state changes the music.
Gameplay showcase
A continuous sequence from the current playable build demonstrating exploration, environmental interaction, stealth, positional audio, flashlight-driven enemy response, adaptive music, pursuit and capture.
The sound is part of the evidence: the wind outside, the player's and the Hunter's footsteps and the soundtrack's shift into the chase are all in the recording. Headphones are recommended.
In the sequence
- Approaching the manor outside, with wind ambience.
- Entering the manor and moving through it toward the hospital.
- Automatic sliding doors and manually opened doors.
- Exploring the hospital by flashlight; player and Hunter footsteps.
- Hearing something nearby and responding to it.
- Switching the flashlight off and waiting out of sight behind a doorway.
- Deliberately provoking the Hunter with the flashlight.
- Detection, chase and the soundtrack's change into pursuit.
- An escape attempt that ends in a dead end, and capture.
Story and lore
The narrative foundation and wider lore of A Chain of Pain are already substantially developed, and the game's environments and encounters are built within that world.
The public portfolio intentionally remains spoiler-free: it shows how the game plays and how it is built, not what the story reveals.
Why the gameplay came first
Before layering the full narrative presentation on top, development set out to answer one question early: is the game actually frightening, responsive and enjoyable to play?
The current playable build therefore concentrates on the systems that create tension and make the experience convincing: movement, stealth, enemy behaviour and perception, darkness and the flashlight, player vulnerability, environmental interaction, sound, reactive music, encounters, pursuit and capture. The story sets the direction; the playable build is where the horror is tested and tuned.
Gameplay systems
The player moves in first person with distinct stealth gaits: sneaking, crouching, walking and running. Each changes how loud the footsteps are and how quickly the Hunter can see the player. A limited panic sprint gives a short burst for escape and recharges according to posture.
Darkness is a gameplay resource. The flashlight is often the only way to read a room, but its beam widens the Hunter's sight and speeds up detection, and a beam in the Hunter's face, or a lit spot it notices, gives it a location to investigate.
A look-at interaction system drives the doors. Hinged doors are opened by the player, automatic sliding doors operate on their own, and locked doors show a lock prompt, so blocked routes are communicated in the world. The same door class serves the player, the Hunter and scripted encounters.
Being caught has consequences. Hunter attacks cause wounds that recover in stages, with a critical state when they stack up. Capture locks input, turns the camera toward the Hunter and fades to a death screen before the level restarts for another attempt.
Connected gameplay systems
- MovementSneak, crouch, walk and run set footstep loudness and visibility. A limited panic sprint supports escape.
- FlashlightReveals the space but widens the Hunter's sight, speeds up detection and can create a clue.
- Interaction / doorsA reusable look-at interface; one door class for hinged, sliding and locked doors, the player, the AI and encounters.
- Wounds / captureWounds recover in stages, with a critical state. Capture leads to a death screen and retry.
- Reactive audioFootsteps and doors report noise to the Hunter; music follows its distance and behaviour.

World and level design
The playable world is one large map containing a manor and two hospital buildings, composed from licensed environment kits. I compose the layout, traversal routes, lighting and encounter spaces using licensed third-party modular environment assets; the source assets are not my original modelling work. World history and environmental storytelling guide the design of the spaces. Lighting keeps most spaces dark enough that the flashlight decides what the player can read.
The manor was extended from a licensed building into a three-wing structure: seams removed, wings joined by new doorways, roofs and floors unified. The route leads from the grounds through the manor into the hospital, so the space changes from a house to an institution as the player goes deeper.
The hospital is the Hunter's territory: a multi-floor building with NavMesh navigation, patrol and search points, barriers that shape the playable routes, locked doors, and pack doors converted to the project's interactive door class. A scripted encounter can hand control back to the normal systemic Hunter behaviour.


The Hunter
The Hunter is a custom C++ enemy that patrols the hospital and acts only on what it has actually perceived. It hears footsteps and doors, notices the flashlight and becomes suspicious before it is certain.
A faint sound makes it stop and listen; a clear one sends it to investigate. Once it confirms the player, it charges briefly and gives chase, following fresh noise when line of sight breaks. When it loses the player, it searches from where it last perceived them, not from where they really are, and stays alert before returning to patrol. It opens unlocked doors on its way, respects locked ones and does not pursue beyond its territory.
For the player, the rules are readable: stay quiet and out of the light, and the Hunter has to work with incomplete information. The technical sections below show how this is built.



Audio and original soundtrack
Audio is part of the stealth loop. Player footsteps vary by surface and gait and report noise to the Hunter's hearing. The Hunter's footsteps are triggered by its foot plants, so the player can follow its position by ear, and doors make sound as they move. Environmental ambience establishes each space, including the wind outside the manor.
A music system follows the gameplay state: exploration, danger when the Hunter is near, chase while it pursues or captures the player, and death, with crossfades between them.
I composed the game’s original soundtrack. Sound effects use licensed sound libraries.
Audio system design / original composition
- Audio system designSurface- and gait-aware footsteps, Hunter foot-plant footsteps, door sounds and ambience, connected to the Hunter's hearing.
- Adaptive musicExploration, danger, chase and death states driven by the Hunter's distance and behaviour, with crossfades.
- Original soundtrackOriginal music I composed for the game.
Characters and implementation
The player character extends Unreal's first-person template with stealth movement, Enhanced Input actions, the panic sprint, wounds, the flashlight and the capture sequence. The flashlight component started from a public tutorial and was extended to feed the Hunter's perception.
AI-assisted character prototyping and development for Hunter 1. The Hunter is split into brain and body: an AI controller owns perception and decisions; the character handles movement styles, facing, the charge, capture and its visible body, which is driven through animation retargeting. The character is a work in progress.
Ownership: I direct the game design, architecture and implementation decisions, level composition, lighting, gameplay and AI design, integration, playtesting and acceptance, and I composed the soundtrack. Coding agents assist with implementation and review under that direction. Environment art, character meshes, animations and sound effects come from licensed or engine-provided assets and are not presented as original art.
Inside the Hunter
The Hunter is built on Unreal AI Perception and StateTree. A dedicated knowledge component processes perception, detection, memory and search information; behaviour tasks read that component rather than hidden live player state.
Custom C++ tasks and conditions form a StateTree generated and compiled from code. This keeps the behaviour graph reproducible and separates information gathering from decisions and world interaction.
Hunter architecture
- PerceptionSight, sound and flashlight clues; sight is rechecked each frame.
- Knowledge / memoryDetection meter, verified positions, alert level and search evidence.
- State selectionStateTree picks the highest-priority eligible behaviour.
- BehaviourCustom C++ tasks investigate, pursue, search and patrol.
- World interactionNavigation, unlocked doors, capture and gameplay events.
Hearing the route, not just the radius
Sound is evaluated using the length of a complete, navigable NavMesh path. Loudness changes the accepted range. A nearby source across a wall or on another floor can therefore be quiet to the Hunter if the route is long. This is a gameplay hearing filter based on route geometry, rather than a physical acoustic simulation.
A faint noise makes the Hunter stop, face the sound and listen. A clear noise, or a second faint noise that confirms the first within a short window, creates an investigation location. Player gait changes footstep loudness, and doors report their own noise.
Gradual visual detection
Detection accumulates in a meter instead of treating visibility as a simple on/off switch. Its fill rate responds to distance, view angle, gait or posture, movement and flashlight use. It decays out of sight, with immediate detection at very close range. Suspicion can start an investigation before a confirmed target triggers pursuit.
The flashlight affects sight range and detection, and a visible beam or illuminated spot can become a clue. The debug overlay exposes the sight factors so the response can be inspected and tuned.
Memory without wall-hacking
When sight fails, the last verified position and movement direction are retained. Fresh sound can sustain a chase or replace older search evidence; losing the target starts search from the last perceived location.
The initial search is biased toward the player's recent heading. Its radius expands, visited locations are avoided, and candidate paths must stay within the territory. After search, AlertRoam patrols the loss area until alertness decays. A short, bounded charge on a new engagement has a cooldown, and capture requires reach, verified line of sight and a short navigable path.
Behaviour selected by priority
The StateTree selects the first eligible state in this priority order. It reselects when knowledge changes or a task completes; these are competing behaviours, not sequential gameplay steps. Capture also has an event-driven override. Alert level is a separate knowledge value.
StateTree / highest eligible priority first
- CaptureCapture is active. It holds until the death flow reloads the level.
- ChaseA confirmed target exists; fresh perceived noise can guide pursuit out of sight.
- InvestigateA suspicious sight, clear or confirmed noise, or flashlight clue has a location.
- SearchThe target was lost; search uses retained evidence.
- ListenA faint sound has a location but is not yet confirmed.
- AlertRoamThe Hunter remains alerted without a target.
- RoamFallback patrol when no higher-priority condition is eligible.
Engineering and iteration
Milestone development uses Git, Git LFS and One File Per Actor. Reusable components separate perception, character actions, interaction, wounds and audio. AI tuning lives in a data asset read during play, so values can be adjusted without scattering constants through behaviour code.
- Console test commands, visual markers and overlays expose detection, hearing decisions, remembered locations and search destinations.
- Python tooling supports scripted PIE regression checks and exports level geometry into scaled floor plans.
- Documented fairness rules, acceptance criteria and small milestones define what the Hunter may know and keep implementation and review focused.
Gameplay, AI debug views and deeper technical implementation details are available on request.
Verification record
- The gameplay showcase and screenshots are captures from the current playable build.
- Recorded development runs include a 12/12 scripted AI regression pass on 17 September 2026. This is saved project evidence, not a new Unreal test run during this portfolio update.
- Scripted PIE checks exercise perception, pursuit, memory and capture. Console commands, overlays and world markers support focused playtesting and diagnosis.
Source material
This presentation is grounded in the following project material.
- Project C++ systems, milestone history and recorded in-editor regression evidence (reviewed 3 October 2026); gameplay captures from the current playable build.


