Skip to content

Core Architecture

Summary: Project Eternal is an Unreal Engine 5.8 multiplayer ARPG built with C++. The architecture follows a modular, system-based design with interface-driven communication and server-authoritative gameplay.

Table of Contents


Why This Architecture

Project Eternal's architecture is designed around three core principles:

+------------------+     +------------------+     +------------------+
|    MODULARITY    |     |   LOOSE COUPLING |     | SERVER AUTHORITY |
+------------------+     +------------------+     +------------------+
        |                        |                        |
        v                        v                        v
  Systems can be          Systems talk via         All gameplay-critical
  developed, tested,      interfaces, not          logic validated on
  and maintained          direct references        server before execution
  independently

Design Goals

Goal How It's Achieved
Multiplayer-first Server-authoritative design, replicated components
Extensibility Interface-driven communication, component composition
Performance Async asset loading, optimized replication
Maintainability Clear folder structure, consistent naming

Project Structure

High-Level Organization

Source/ProjectEternal/
+-- Public/                    Header files (API surface)
|   +-- [System folders]       Each system has its own folder
|   +-- Interface/             Cross-system interfaces
|   +-- Types/                 Shared type definitions
|
+-- Private/                   Implementation files
    +-- [Mirrors Public/]      Same folder structure

System Folder Pattern

Each major system follows this internal structure:

SystemName/
+-- Components/      Actor components for the system
+-- Data/            DataAssets for configuration
+-- Interfaces/      Interface classes (if system-specific)
+-- Types/           Structs and enums
+-- SubSystems/      USubsystem implementations
+-- Utils/           Helper libraries

Major Systems Overview

Folder Purpose Key Classes
Abilities/ Gameplay ability implementations UEternalAbility
AbilitySystem/ GAS components, attribute sets UEternalAbilitySystemComponent, UEternalAttributeSet
Balance/ Enemy stat scaling UBalanceSubsystem
Character/ Character classes AEternalCharacter, AEternalPlayer
Combat/ Combat mechanics UCombatComponent, UPoiseSystemComponent
Dungeon/ Procedural dungeon generation UDungeonSubsystem, UDungeonModifierComponent
Environment/ Environment and lighting UEnvironmentSubsystem
GameMode/ Game framework AEternalGameMode, UEternalGameInstance
Glyph/ Glyph socketing system UPlayerGlyphComponent
Input/ Enhanced Input routing UEternalInputSubsystem
Inventory/ Item container system UItemObject, UItemContainerComponent
UI/ MVVM UI framework Controllers, ViewModels, Widgets
WorldMap/ World map navigation, domains UWorldMapSubsystem
API/ Backend communication UEternalApiSubsystem, UBaseApiService
Persistence/ Save/load system UPersistenceComponent, IPersistenceProvider

Naming Philosophy

The "Eternal" Prefix

The Eternal prefix is reserved for core framework classes only - the foundational classes that other systems build upon.

                    ETERNAL PREFIX USAGE
+------------------------------------------------------------+
|                                                            |
|   Use "Eternal" for:              Avoid "Eternal" for:     |
|   - Base character classes        - Feature components     |
|   - Core GAS classes              - System-specific logic  |
|   - Engine subsystems             - Data assets            |
|   - Game framework classes        - Utility classes        |
|                                                            |
+------------------------------------------------------------+
Category Uses Eternal Examples
Characters Yes AEternalCharacter, AEternalPlayer
GAS Core Yes UEternalAbilitySystemComponent, UEternalAttributeSet
Subsystems Yes UEternalInputSubsystem, UEternalUISubsystem
Game Framework Yes AEternalGameMode, UEternalGameInstance
Combat No UCombatComponent, UPoiseSystemComponent
Inventory No UInventoryComponent, UItemObject
Equipment No UEquipmentComponent

Standard UE Prefixes

Prefix Type When to Use
A Actor Classes spawned in world
U UObject Components, objects, subsystems
F Struct Data structures, delegates
E Enum Enumerated types
I Interface Cross-system contracts

Pointer Conventions

Pattern When to Use
TObjectPtr<T> UPROPERTY UObject pointers
ensure(Ptr) Expected-valid pointers (soft assertion)
check(Ptr) Critical pointers (hard assertion, crashes in dev)

Core Singletons

EternalGameplayTags

Central registry for all gameplay tags used across systems. Tags are organized by category for type-safe access.

FEternalGameplayTags::Get()
+-- Stats
|   +-- Hard (Ferocity, Grace, Insight, Clarity, Feral, Dread)
|   +-- Soft (Resolve, Presence)
|   +-- Resources (Health, Stamina, Resonance, Adrenaline)
+-- Combat (MovementSpeed, Poise)
+-- DamageTypes (Physical, Fire, Nature, Cold, Dark, Electric, Holy)
+-- Input (LMB, RMB, 1-4, G, E, R, Space)
+-- Effects (HitReact, Staggered, Broken)
+-- Abilities (Specific ability tags)
Method Purpose
Get() Returns singleton instance
InitializeNativeGameplayTags() Called at startup to register tags
DamageTypeToResistance Maps damage types to corresponding resistance tags

EternalAssetManager

Custom asset manager for Primary Asset discovery and async loading.

Responsibility How
Primary Asset Types Manages CraftingRecipe, ModifierPool, ItemManifest
Async Loading Provides async load handles for runtime asset loading
Discovery Automatically finds assets by type at startup

Module Dependencies

Dependency Philosophy

                    PUBLIC vs PRIVATE DEPENDENCIES
+------------------------------------------------------------+
|                                                            |
|   PUBLIC: Exposed to other modules     PRIVATE: Internal   |
|   - Types in headers                   - Implementation    |
|   - Base classes                       - Online services   |
|   - Required for linking               - Plugin specifics  |
|                                                            |
+------------------------------------------------------------+

Key Public Dependencies

Module Purpose
GameplayAbilities Gameplay Ability System (GAS)
EnhancedInput UE5 input system
CommonUI Cross-platform UI framework
MotionWarping Movement warping for abilities
DlgSystem Dialogue system
ObjectReplication Network replication helpers

Key Private Dependencies

Module Purpose
ModelViewViewModel MVVM UI pattern
OnlineSubsystemRedpointEOS Epic Online Services
GenericMovementSystem Movement plugin
GenericEffectsSystem Effects plugin

Source Reference

Topic File Line
Gameplay Tags Definition Source/ProjectEternal/Public/EternalGameplayTags.h 1-200
Asset Manager Source/ProjectEternal/Public/EternalAssetManager.h 1-30
Module Definition Source/ProjectEternal/ProjectEternal.Build.cs 1-80
Log Categories Source/ProjectEternal/Public/ProjectEternal.h 1-20
Persistence Types Source/ProjectEternal/Public/Persistence/Types/PersistenceTypes.h 1-329
API Types Source/ProjectEternal/Public/API/Types/ApiTypes.h 1-143


Recent Changes

Date Change Impact
- Initial documentation -