CURRENCY SYSTEM
UNREAL ENGINE 5
SYSTEMS PROJECT

MODULAR CURRENCY SYSTEM UNREAL ENGINE 5

Universal, reusable in-game economy framework built in C++ and Blueprints. Supports multiple currencies via Gameplay Tags, real-time UI updates, passive income orchestration, and persistent save/load — designed for clean modular integration across projects.

0
Core Components
0
Interfaces
0
Showcase Shots
Currency System Overview
SYSTEM OVERVIEW

Universal, Tag-Driven Economy

Multi-currency, passive income, and save/load — portable across projects

Core Features

The Currency Component tracks balances with TMap<FGameplayTag, int32> and exposes AddCurrency() and ApplyTransaction() for atomic, multi-resource operations. UI widgets subscribe via multicast delegates for real-time feedback.

Costable actors define purchasable/bankable entities through IICostable and maintain CostBundles. Passive income sources implement IPassiveIncomeSource and are orchestrated by the Economy Manager to apply timed deposits or drains, either to the player or to a bank actor.

The system persists player balances, bank states, and passive configuration via UE SaveGame, with clean serialization managed by the Economy Manager.

TECHNICAL IMPLEMENTATION

Interfaces • Delegates • Components

Clean architecture, tag-driven data, and robust serialization

Gameplay Tags

Currency types keyed via FGameplayTag. Flexible, project-agnostic currency definitions and bundles.

Delegates & UI

Multicast delegates broadcast balance changes to widgets for responsive, real-time UI feedback.

Component Design

Currency, Economy Manager, and Passive Cost components provide clear separation of concerns.

SaveGame

UE SaveGame stores balances, bank states, and passive configuration. Simple SaveEconomy/LoadEconomy API.

Interfaces

IICostable & IPassiveIncomeSource ensure consistent contracts for purchases, banks, and income sources.

ARCHITECTURE

Economy System Composition

High cohesion, low coupling — designed for portability

Currency Component

Maintains TMap<FGameplayTag, int32> balances and applies atomic transactions with validation and delegate updates.

Costable Actor

Implements IICostable with CostBundle, vanishable/emptiable states, and world-space cost widget.

Passive Income

UPassiveCostComponent + IPassiveIncomeSource managed by Economy Manager for timed income/drain per tag.

Save & Load

UE SaveGame class persists player, banks, and passive sources. Manager handles serialization lifecycle.

IMPLEMENTATION

Key Data Structures

Representative snippets for core types

Balances & Bundles

// Currency balances per tag
TMap CurrencyBalances;

// Transaction bundle
TMap CostBundle; // positive = deposit, negative = withdraw

Atomic Transactions

bool ApplyTransaction(const TMap& Bundle)
{
    // 1) Validate affordability for all negative entries
    // 2) Apply all changes atomically
    // 3) Broadcast updates via delegates for UI
    return true;
}

Passive Source Contract

// IPassiveIncomeSource
virtual void GetYieldPerTag(TMap& OutYield) const = 0;
virtual float GetIntervalFor(const FGameplayTag& Tag) const = 0;
DEVELOPMENT JOURNAL

Milestones

Focused, iterative systems development

2025-09-12

Core Currency API

Added AddCurrency() and SpendCurrency(). Implemented ICostable and overlap-based purchases.

2025-09-15

UI Feedback

Built WBP_HUD and WBP_CurrencyUI with delegate-driven, real-time updates.

2025-09-16

Gameplay Tags

Switched balances to TMap<FGameplayTag, int32> with multi-resource logic.

2025-09-18

Transaction Bundles

Introduced atomic multi-currency transaction bundles.

2025-09-21 → 2025-09-29

Passive Income

Built UPassiveCostComponent, Economy Manager, and IPassiveIncomeSource with timer logic and bug fixes.

2025-10-03 → 2025-10-06

Save & Bank Support

Added bank deposits, multi-currency support, and save/load with stability improvements.

Explore the Economy Framework

Review architecture and media, or return to the portfolio.