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.
- 🔁 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
UAttributeSetwith 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
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
- 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
FGameplayTagfor VFX/SFX decoupling - Data-Driven Tuning: Ability costs, cooldowns, and effects configured via DataAssets
- Unreal Engine 5.3+
- Visual Studio 2022 / Rider for Unreal
- Basic familiarity with GAS concepts (Abilities, Effects, Attributes)
- Clone this repo into your
Projects/directory - Open
GASFramework.uprojectin Unreal Editor - Generate project files (
Right-click .uproject → Generate Visual Studio project files) - Build in your IDE and launch the editor
- Open
Maps/Main_TestMap - Play as
BP_GASCharacter - Press
Q/E/Rto activate sample abilities (Dash, Projectile, Heal) - Observe replication in networked play (File → Play → New Editor Window)
// 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());
}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.
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.
📧 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. 🎮✨