Gameplay Systems from Scratch
Intermediate 30 minWire up core gameplay: Blueprint logic, player input, ability system, save/load, and branching dialogue for an interactive experience.
Prerequisites
This lesson uses 5 skills from the Gameplay Systems cluster. You should have a project with a playable character (Third Person template works well).
What You'll Build
A playable character that can move with modern input handling, use a dash ability with a cooldown, talk to an NPC with branching dialogue choices, and save/load their progress. These are the foundational systems that almost every game needs, and this lesson shows you how to build them by combining skills rather than coding everything from scratch.
Step-by-Step Workflow
Step 1: Set up the character Blueprint
/skill blueprint-basics Tell Claude:
"Create a Character Blueprint called BP_PlayerCharacter. Add a SpringArm and Camera component for third-person view. Add a Health variable (float, default 100) and an IsInDialogue boolean. Set up BeginPlay to print the character's name." What to expect: Claude creates a Blueprint with the correct parent class, adds components in the right hierarchy (Camera attached to SpringArm attached to root), and defines the variables you need. The event graph has a simple BeginPlay setup.
Connection to next step: The character exists but cannot move yet. Enhanced Input will handle that.
Step 2: Wire up player input
/skill enhanced-input Tell Claude:
"Create an Input Mapping Context for the player with actions for Move (2D axis), Look (2D axis), Jump (digital), Interact (digital), and Dash (digital with a hold trigger at 0.2 seconds). Bind these to keyboard/mouse and gamepad." What to expect: Claude creates Input Action assets, a Mapping Context with keyboard/mouse and gamepad bindings, and wires them into the character Blueprint. The Dash action uses a Hold trigger so players must press and hold briefly before it activates. This prevents accidental dashes.
Step 3: Add an ability with GAS
/skill gameplay-abilities Tell Claude:
"Set up GAS on the player character. Create a Dash ability that launches the character forward 500 units over 0.3 seconds. Add a Stamina attribute (max 100) and make Dash cost 25 stamina with a 2-second cooldown. Stamina regenerates at 10 per second." What to expect: Claude adds an AbilitySystemComponent to your character, creates a GameplayAbility for Dash with the movement logic, defines a Stamina attribute set, and creates GameplayEffects for the cost (instant -25 stamina) and cooldown (2-second duration tag). A separate regeneration effect ticks stamina back up.
Step 4: Create NPC dialogue
/skill dialogue-system Tell Claude:
"Create an NPC Blueprint with a dialogue interaction. When the player presses Interact near the NPC, start a conversation. The NPC greets the player, then offers two choices: 'Tell me about the village' (leads to lore text) or 'I need supplies' (leads to a shop reference). Track which branches the player has visited." What to expect: Claude creates a dialogue tree data structure, an NPC Blueprint with an interaction trigger volume, and a simple dialogue UI widget. The conversation flows through nodes with player choice branching, and visited branches are tracked with gameplay tags so the NPC can react differently on repeat visits.
Step 5: Implement save/load
/skill save-system Tell Claude:
"Create a save system that persists: player position and rotation, health and stamina values, which dialogue branches have been visited, and a timestamp. Save to slot 'SaveSlot_0'. Add auto-save every 5 minutes. Load on game start if a save exists." What to expect: Claude creates a SaveGame object with properties for all the data you listed, a GameInstance function for save/load logic, a timer-based auto-save, and BeginPlay logic that checks for existing saves. Player progress persists between sessions.
Tips & Best Practices
- Use Enhanced Input, not the legacy system. Input Actions with Mapping Contexts are the UE5 standard. They handle gamepad, keyboard, and touch cleanly. The old BindAction/BindAxis approach is deprecated.
- Start GAS simple. One ability with one attribute is enough to learn the pattern. Add complexity (tags, stacking effects, prediction) after the basics work.
- Save data, not references. Store values (position, health, flags) in your SaveGame object. Never store UObject pointers. References break between sessions.
- Test dialogue early. Branching conversations have edge cases (what if the player walks away mid-conversation?). Test the flow before adding more branches.
- Keep Blueprints organized. Use comment boxes to group related nodes. Collapse complex logic into functions. Future-you will thank present-you.
- Explore related skills. Once gameplay basics work, add physics-based interactions with collision-setup or NPC behavior with ai-navigation for patrol routes and environmental awareness.
Next Steps
Procedural World Building
Intermediate: Build the environment your gameplay systems live in
Performance Tuning & Shipping
Advanced: Optimize and package your game for distribution
Skills used in this lesson
Cluster: Gameplay Systems