← Back to games
I CAN'T CRY — NARRATIVE

Narrative System

A data-driven framework that lets designers build quests, conversations and story beats straight from the editor.

NARRATIVE SYSTEM
GAMEPLAY.MP4

Overview

The narrative system is the backbone of I Can't Cry: it connects NPCs, dialogue, quests, collectibles and world events into one pipeline. My goal was to keep every story beat in data rather than code, so designers can write a new quest, chain it to an NPC and decide what happens in the world when it ends, all from the editor.

The main challenge was keeping it flexible without letting it turn into spaghetti. Everything talks through a small set of shared building blocks, so adding a new kind of story moment means writing one small class, not rewiring the whole system.

SYSTEMS BREAKDOWN

How it works

ARCHITECTURE

Plug-in gameplay events

At the core is UGameplayEvent, an abstract, instanced class that designers drop directly into dialogue lines, dialogue endings or quest rewards. Each event is a self-contained action: start a dialogue, start or complete a quest, give experience or health, drop an item in front of an NPC, change level, or make an NPC appear, disappear or spawn from scratch.

Because events are data rather than hard-coded calls, the same piece of logic can fire from any point in the story. A reward, a line of dialogue and a trigger all speak the same language, and a new event type slots in by overriding a single function.

QUESTS

Quest manager

Quests are data assets identified by Gameplay Tags, each with its own objectives, required counts and completion rewards. A Game Instance Subsystem tracks their progress, so quest state survives level changes and is reachable from anywhere in the game.

Quests can complete automatically as soon as the objectives are met, or wait for the player to return to an NPC. The UI never polls for changes: the manager broadcasts a delegate on every update, and the quest log refreshes itself, split into main and side quests.

DIALOGUE

Branching dialogue

Conversations are data assets made of lines, each with its own emotion tag and optional events. NPC and player profiles map emotions to portraits, so the face on screen changes with the tone of each line, and the player can speak too. Text is revealed with a skippable typewriter effect, and every dialogue can override font and colour.

At the end of a conversation the player can pick a reply that branches into a new dialogue, accept or decline an optional quest, or hand over items for a delivery quest directly from the dialogue window, with progress checked live against the inventory.

NPCS

State-aware NPCs

Each NPC holds an ordered quest chain. When the player talks to them, the system finds the first quest not yet completed and picks the right dialogue for its state: offering the quest, reminding the player while it's in progress, or closing it when every objective is done. Once the chain is finished, the NPC falls back to a default line.

This lets a single character carry a whole storyline across the game without any scripting: designers just line up quests and dialogues in the order they should happen.

INTERACTION

Scanner and interaction prompts

A single interaction component covers every interactable in the world: NPCs, notes that unlock Bestiary entries, collectible items and inspectable objects that stay in the scene. The player scans the area with a sphere overlap, keeps only targets inside a view cone, checks line of sight with a raycast and chooses whichever sits closest to the centre of the screen.

Feedback comes in two stages: a subtle circle when something is in range, then the action prompt once the player is close and has been looking at it briefly, which stops the UI from flickering. The key icon is read from Enhanced Input, so it stays correct after remapping or when switching to a gamepad.

WORLD

Cinematic transitions and narrative triggers

A cinematic manager handles NPCs entering and leaving the story: it fades to black, locks player input, then hides, moves or spawns characters at points found by tag. Since events live in data assets and can't reference level actors directly, tags bridge the gap between data and world.

Narrative trigger boxes guard locked areas. While a door is still locked they deliver a short bark or a full dialogue, and once the player completes the required quest or picks up the right key they switch themselves off for good, optionally with an unlock line.