Skip to content

Repository files navigation

🎮 UE5 GAS Multiplayer Framework

Modular Gameplay Ability System Template for Networked Characters | Unreal Engine 5.3+ | C++

UE5 C++ GAS License

A clean, extensible foundation for building networked character abilities in Unreal Engine 5 using the Gameplay Ability System (GAS). Designed for AAA-style modularity, replication safety, and rapid prototyping.


✨ Features

  • 🔁 Modular Ability Architecture: Decoupled UGA_ classes with clear input/output contracts
  • 🌐 Replication-Ready: Server-authoritative ability execution with client prediction hooks
  • 🎯 Attribute & Effect System: Integrated UAttributeSet with gameplay effect stacking & duration handling
  • 🧪 Testable Design: Pure C++ logic separated from UE4/5 dependencies for unit testing
  • 📦 Blueprint-Friendly: Exposed key functions for designers to prototype without code
  • 🗂️ Documented Patterns: Inline comments + architecture notes for onboarding & extension

🏗️ Technical Architecture

Source/
├── GASFramework/
│   ├── Abilities/          # UGA_ classes (FireProjectile, Dash, Heal)
│   ├── Attributes/         # UAttributeSet subclasses (Health, Stamina, Mana)
│   ├── Effects/            # UGameplayEffect definitions + stacking rules
│   ├── Components/         # UGASComponent for character integration
│   └── Utils/              # RPC helpers, prediction utilities, logging
├── Characters/
│   ├── AGASCharacter.cpp   # Base character with GAS integration
│   └── AGASPlayerController.cpp # Input binding + ability activation
└── Tests/
    └── AbilityTests.cpp    # Example unit tests for ability logic

Key Patterns Implemented

  • Server-Only Execution: Critical ability logic runs on authority to prevent cheating
  • Client Prediction: Local ability activation with server reconciliation hooks
  • Event-Driven Effects: Gameplay cues triggered via FGameplayTag for VFX/SFX decoupling
  • Data-Driven Tuning: Ability costs, cooldowns, and effects configured via DataAssets

🚀 Getting Started

Requirements

  • Unreal Engine 5.3+
  • Visual Studio 2022 / Rider for Unreal
  • Basic familiarity with GAS concepts (Abilities, Effects, Attributes)

Setup

  1. Clone this repo into your Projects/ directory
  2. Open GASFramework.uproject in Unreal Editor
  3. Generate project files (Right-click .uproject → Generate Visual Studio project files)
  4. Build in your IDE and launch the editor

Quick Test

  1. Open Maps/Main_TestMap
  2. Play as BP_GASCharacter
  3. Press Q / E / R to activate sample abilities (Dash, Projectile, Heal)
  4. Observe replication in networked play (File → Play → New Editor Window)

💡 Example: Creating a New Ability

// MyNewAbility.h
UCLASS()
class GASFRAMEWORK_API UGA_MyNewAbility : public UGameplayAbility
{
    GENERATED_BODY()

protected:
    virtual void ActivateAbility(const FGameplayAbilitySpecHandle Handle,
        const FGameplayAbilityActorInfo* ActorInfo,
        const FGameplayAbilityActivationInfo ActivationInfo,
        const FGameplayEventData* TriggerEventData) override;

    UPROPERTY(EditDefaultsOnly, Category = "Tuning")
    float DamageAmount;

    UPROPERTY(EditDefaultsOnly, Category = "Tuning")
    FGameplayTag ApplicationTag;
};
// MyNewAbility.cpp
void UGA_MyNewAbility::ActivateAbility(...)
{
    if (!CommitAbility(Handle, ActorInfo, ActivationInfo)) return;

    // Server-authoritative damage application
    if (HasAuthorityOrPredictionKey(ActorInfo, &ActivationInfo))
    {
        ApplyDamage(Target, DamageAmount, ApplicationTag);
    }

    // Trigger VFX/SFX via gameplay cue (replicated)
    UGameplayAbility::SendGameplayEventToActor(
        ActorInfo->AvatarActor.Get(),
        FGameplayTag::RequestGameplayTag(FName("Event.Ability.MyNewAbility.Cast")),
        FGameplayEventData());
}

🙏 Acknowledgements

This project was built with guidance from excellent community resources. Special thanks to:

  • Ali El Zoheiry — for comprehensive, production-focused Unreal Engine 5 and GAS tutorials that clarified complex replication patterns, ability design, and attribute management. His content was instrumental in shaping the architectural decisions in this framework.

Note: This implementation is original code authored by Nicholas Wilson Kurniawan. Concepts and patterns were learned from public educational resources; no code was copied directly from tutorials.


🤝 Contributing

This is a learning/reference project. Feel free to:

  • 🍴 Fork and experiment with your own ability designs
  • 🐛 Report issues or suggest improvements via GitHub Issues
  • 💬 Discuss GAS patterns in the Discussions tab

For production use, always validate replication behavior and security assumptions in your own testing environment.


📬 Connect & Explore More

Portfolio LinkedIn Discord

📧 nwkemail@gmail.com | 🎓 B.Eng. Computer Science, HKU | 🎮 Gameplay Engineer (UE5/Unity)


💡 Note: This project is for educational and prototyping purposes. For production AAA development, always follow your studio's coding standards, security reviews, and replication guidelines.

Built with clean C++, player-first design, and a passion for scalable gameplay systems. 🎮✨

About

UE5 C++ template for multiplayer gameplay abilities. Modular architecture, client prediction, AAA-style replication patterns.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages