Linked Souls is a cooperative multiplayer game where two players are spiritually linked across dimensions. One player exists in the physical world (Body), while the other inhabits the spirit world (Soul). Together, they must cooperate to solve puzzles, defeat AI-driven enemies, and maintain their spiritual connection.
Core tech: Gameplay Ability System (GAS), dual-world traversal, shared Soul Energy, co-op synergy, and Behavior Tree enemy AI with sight perception.
ALinkedSoulsAIControllerwith sight perception (800cm / lose 1000cm)- Runtime Behavior Tree graph: Patrol → Chase → Attack
- Blackboard keys:
TargetActor,HomeLocation,bCanSeeTarget,bIsAttacking, … - Assets:
/Game/AI/BB_LinkedSoulsEnemy,/Game/AI/BT_LinkedSoulsEnemy - NavMesh bounds on
RealWorld_Prototype - Enemy attacks Soul (+Corruption) and Body (−Health) via
PerformAttack - Floating enemy health bar (
UEnemyHealthBarWidget+UWidgetComponent)
- Camera-relative WASD (IMC double-swizzle fixed — no more sideways W)
- Manny mesh yaw −90° so character faces movement direction
- Soul: low gravity
0.3, jump150, air control0.8
WBP_LinkedSoulsHUDbound toULinkedSoulsUserWidget- Health / Soul Energy / Corruption bars update from GAS + SoulEnergyComponent
- Labels & synergy/world indicators optional / collapsed by default
| Setting | Old | New |
|---|---|---|
| Corruption per enemy hit | +15 | +8 |
| Soul Energy base regen | 2/s | 5/s |
| Spirit Attack cost | 20 | 15 |
| Soul Pulse cost | 30 | 20 |
| Enemy attack cadence | 2s timer | BT attack ~1.5s cooldown |
IMC_Defaultkeyboard WASD cleared (avoids stacking with Body/Soul IMCs)- Body/Soul IMCs at priority 2; correct Swizzle YXZ / Negate layout
- Dual-World Gameplay — Real (Body) and Spirit (Soul) dimensions
- Co-op Multiplayer — Listen Server, 2 players, partners linked on spawn
- GAS Combat — 7+ custom GameplayEffects, attribute death hooks
- Shared Soul Energy — one pool on GameState, regen/drain/ability costs
- Co-op Synergy — Body hits apply
Linked.Synergy.Activebuff to Soul (no re-apply spam) - Corruption — Soul accumulates corruption; death at max
- Enemy AI — Perception + BT patrol/chase/attack (not a fixed timer)
- World Portal — dimension transition interactions
- Pure C++ first — UMG widgets + BB/BT assets where needed
| Action | Input | Description |
|---|---|---|
| Move | WASD | Camera-relative |
| Look | Mouse | Yaw / pitch |
| Jump | Space | Jump |
| Melee | F | Sphere sweep, physical damage, synergy on Soul |
| World Shift | E | Enter Spirit World (energy cost + drain) |
| Action | Input | Description |
|---|---|---|
| Move | WASD | Camera-relative, low gravity |
| Look | Mouse | Yaw / pitch |
| Jump | Space | Jump (reduced Z velocity) |
| Spirit Attack | LMB | Line trace, costs 15 energy |
| Soul Pulse | Q | AoE sphere, costs 20 energy |
| Manifest | E | Enter Real World (energy cost + drain) |
| Effect | Amount | Notes |
|---|---|---|
| GE_BodyMeleeDamage | −25 Health | Body melee |
| GE_SpiritAttackDamage | −30 Health | Soul LMB |
| GE_SpiritAttackSynergyDamage | −45 Health | With synergy tag |
| GE_SoulPulseDamage | −20 Health | AoE |
| GE_CorruptionDamage | +8 Corruption | Enemy → Soul |
| GE_CorruptionDecay | −5 Corruption | Soul self, every 2s |
| GE_BodySynergyBuff | 10s | Tag Linked.Synergy.Active |
- Pool on
ALinkedSoulsGameState/USoulEnergyComponent - Start 50 / max 100
- Regen 5/s base, higher when partners close
- Continuous drain during World Shift / Manifest
Perception (sight)
↓
Blackboard TargetActor / bCanSeeTarget
↓
Behavior Tree (runtime graph if asset root empty)
├── Service: UpdateTarget (0.5s, clear after 3s lost sight)
├── Sequence: ChaseTarget → AttackTarget
└── PatrolMove (random reachable / direct fallback)
- Chase acceptance ~150cm; pathfinding with direct-move fallback
- Attack range ~200cm, cooldown ~1.5s →
ABaseEnemy::PerformAttack - AI class:
ALinkedSoulsAIController(AutoPossessAI on BaseEnemy)
Source/LinkedSouls/
├── AI/ # AIController, BT tasks/service, BB keys
├── Abilities/ # GAS GameplayEffects
├── Animation/ # LinkedSoulsAnimInstance
├── DualWorld/ # Dual world manager
├── Elements/ # ElementComponent
├── Enemies/ # BaseEnemy, TreeHeartBoss
├── GameState/ # LinkedSoulsGameState
├── HUD/ # LinkedSoulsHUD + UserWidget
├── Player/ # Body, Soul, AttributeSet, base character
├── SoulEnergy/ # Shared energy component
├── UI/ # EnemyHealthBarWidget
└── WorldPortal/ # Portal system
Content/
├── AI/ # BB_LinkedSoulsEnemy, BT_LinkedSoulsEnemy
├── Blueprints/ # WBP_LinkedSoulsHUD, GameMode/GameState BPs
├── Input/ # IMC_Body, IMC_Soul, IMC_Default, IA_*
└── Maps/ # RealWorld_Prototype (+ NavMesh)
| Class | Role |
|---|---|
ALinkedSoulsGameMode |
Spawn Body/Soul, link partners |
ALinkedSoulsGameState |
Owns SoulEnergyComponent |
ABodyCharacter / ASoulCharacter |
Player pawns |
ALinkedSoulsPlayerCharacter |
Shared GAS, camera, movement |
ULinkedSoulsAttributeSet |
Health / SoulEnergy / Corruption |
ABaseEnemy |
Dual HP, PerformAttack, BT asset, health bar |
ALinkedSoulsAIController |
Perception + RunBehaviorTree |
UBTTask_PatrolMove / ChaseTarget / AttackTarget |
Combat AI tasks |
UBTService_UpdateTarget |
Clear target after lose-sight delay |
ALinkedSoulsHUD / ULinkedSoulsUserWidget |
Player HUD |
UEnemyHealthBarWidget |
World/screen enemy bar |
- Unreal Engine 5.8
- Visual Studio 2022 (C++)
- Git + Git LFS
git clone https://github.com/MatsoDev/LinkedSouls.git
cd LinkedSouls
git lfs install
git lfs pullGenerate VS project files from LinkedSouls.uproject, open solution, Rebuild LinkedSoulsEditor.
Prefer full rebuild over Live Coding when constructors / new classes change.
Edit → Project Settings → Maps & Modes
Number of Players = 2, Net Mode = Play As Listen Server → Play.
Expected logs when AI is healthy:
LinkedSoulsAI: Built runtime BT graph ...
LinkedSoulsAI: RunBehaviorTree OK
LinkedSouls AI: Target acquired [...]
BaseEnemy: Attacked [...]
Priority candidates (not started unless requested):
- Dual-world polish — Real vs Spirit visibility, shift/manifest feel, portal co-op flow
- Boss AI —
TreeHeartBossphases, dual Physical/Spirit HP in BT - Combat juice — attack anims, hit reacts, VFX, feedback
- Enemy variety — spawners, more archetypes, difficulty curves
- Co-op puzzles — Body+Soul required interactions
- Replication pass — listen-server / client edge cases
Built with Unreal Engine 5.8 · C++ · GAS · Enhanced Input · AIModule / Behavior Trees