Story & worldbuilding
A Chain of Pain is a story-driven first-person narrative game in development, built around a broader story and evolving lore. World history, environmental storytelling, encounters and the structure of the game are designed to support that story, including moments without direct dialogue.
The current playable slice focuses on the gameplay and technical systems that will support the narrative experience. Dialogue, player choices, objectives, story triggers, branching endings and full narrative progression are not implemented yet. Game design, engineering, level composition, character development and original music sit within one solo-directed project.
Gameplay systems & the playable slice
First-person exploration and stealth-oriented movement form the current playable loop in the hospital environment. Sneaking, crouching, running and a limited panic sprint offer different ways to move through encounters and escape.
A reusable look-at interaction system connects the player to the environment, including a shared door system used by both player and enemy. The flashlight supports exploration while also affecting enemy perception. Movement and door noise feed the same gameplay loop.
Wounds recover in stages and include a critical state. Capture and death lead into a retry flow. These player systems provide the playable foundation for the broader game; the Hunter is one major system within it.
World & level design
The large environment combines a manor and two hospital buildings in a single One File Per Actor map. I compose the layout, traversal routes 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. The H2 hospital currently connects multi-floor NavMesh, AI territory, barriers, locked routes and doors adapted to the shared interaction system.
One scripted Door-14 ambush temporarily directs the Hunter outside normal StateTree behaviour, then hands control back to the systemic chase. The surrounding world is broader than this tested slice: multi-floor navigation setup is evidenced, but stair chases still need dedicated playtesting.
Character development
AI-assisted character prototyping and development for Hunter 1. The character remains a work in progress, with its presentation and gameplay integration still being developed.
Audio & original soundtrack
I composed the game’s original soundtrack.
I also integrated reactive audio systems that respond to enemy state and gameplay. Music changes between exploration, danger, chase and death, while surface- and gait-aware footsteps and door sounds connect the player’s actions to the enemy’s hearing.
Systemic enemy AI
The H1 Hunter is a custom C++ enemy built on Unreal AI Perception and StateTree. The controller manages the brain, while the character handles movement and physical actions. 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 is a stealth trade-off: it 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
The enemy searches for what it last perceived rather than following the player’s hidden live position. 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.
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 and stun also have event-driven overrides. Alert level is a separate knowledge value.
StateTree / highest eligible priority first
- CaptureCapture is active. It holds until the death flow reloads the level.
- StunnedStun is active; recovery starts a search.Debug-triggered support only; no in-game stun source is established.
- 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.
Player, world and Hunter
The AI is integrated with the playable environment. A short, bounded charge on a new engagement has a cooldown. Capture requires reach, verified line of sight and a short navigable path; the territory and leash bound pursuit. The Hunter opens closed, unlocked doors on its route and respects locks.
Connected gameplay systems
- Player movementSneak, crouch and run affect visibility and noise. A limited panic sprint supports escape.
- Interaction / doorsA reusable look-at interface and shared door class serve the player, AI and encounters.
- Perception inputsSurface- and gait-aware footsteps, door noise and the flashlight feed the Hunter.
- Wounds / retryWounds recover in stages, with a critical state. Capture and death lead to a retry flow.
- Reactive audioMusic changes between exploration, danger, chase and death in response to the Hunter.
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, making iteration possible 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.
- Design rules, acceptance criteria and small milestones keep implementation and review focused.
Prototype work and next steps
A smaller Hunter nail-gun prototype uses physical projectiles, line-of-sight-gated firing, projectile embedding and a live projectile cap. Its aim presentation is placeholder-level, with audiovisual polish still incomplete.
The current playable slice brings player systems, systemic enemy AI, world composition and reactive audio together. The broader story and lore guide the project, while narrative delivery remains future implementation work. Character development and audiovisual polish continue alongside gameplay iteration.
Gameplay, AI debug views and deeper technical implementation details are available on request.
Verification record
- 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.
Documentation status
Forthcoming evidence
- Real gameplay and debug captures are planned; the concept graphic is not a gameplay screenshot.
- A public build or source link has not been supplied.
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.