Skip to content

Commit 30a791c

Browse files
authored
Add public documentation exemple of EndlessJournjey
1 parent 6d8e705 commit 30a791c

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Simplified Explanation of the Gameplay Ability System (GAS)
2+
3+
The **Gameplay Ability System (GAS)** is a framework in Unreal Engine that helps you create and manage abilities, attributes, and interactions for characters or objects in your game. It’s highly customizable and integrates well with animations, visual effects, and sounds.
4+
5+
## Key Features of GAS
6+
7+
### 1. **Gameplay Abilities**
8+
- Abilities represent actions or skills characters can perform, like casting spells, attacking, or using special moves.
9+
- **Active Abilities**: Triggered by player input (e.g., pressing a button).
10+
- **Passive Abilities**: Automatically activate under specific conditions (e.g., health regeneration).
11+
- Abilities can be linked to:
12+
- **Animations** (e.g., sword slash)
13+
- **Visual Effects** (e.g., particle systems for magic)
14+
- **Sounds** (e.g., ability sound cues)
15+
- **Other Gameplay Logic** (e.g., cooldown timers or stamina checks).
16+
17+
---
18+
19+
### 2. **Attributes and Attribute Sets**
20+
- **Attributes** are values like health, stamina, or damage that define a character’s stats.
21+
- **Attribute Sets** group related attributes for easier organization (e.g., one set for combat stats and another for resource management).
22+
- Attributes can:
23+
- Be dynamically modified during gameplay.
24+
- Interact with other attributes (e.g., increasing strength boosts attack damage).
25+
26+
---
27+
28+
### 3. **Gameplay Effects**
29+
- **Gameplay Effects** are used to change attributes, such as:
30+
- **Dealing Damage**: Reduce health when hit.
31+
- **Healing**: Restore health over time or instantly.
32+
- **Buffs/Debuffs**: Temporarily boost or reduce stats (e.g., speed up movement, lower defense).
33+
- Effects can be simple or complex:
34+
- **Simple**: Fixed value (e.g., reduce health by 50).
35+
- **Complex**: Scale based on attributes (e.g., damage based on the caster’s strength).
36+
37+
---
38+
39+
### 4. **Ability Tasks**
40+
- **Ability Tasks** are specialized tasks used within abilities for asynchronous or time-dependent actions, like:
41+
- Waiting for an event (e.g., cooldown to finish).
42+
- Performing a multi-step combo (e.g., a sequence of punches).
43+
- Adding delays or timers to abilities.
44+
- Custom tasks can be created to implement unique mechanics for your game.
45+
- They can be written in:
46+
- **C++**: For complex logic or performance-heavy features.
47+
- **Blueprints**: For quick prototyping and visual scripting.
48+
49+
---
50+
51+
### 5. **Multiplayer Support**
52+
- GAS is **multiplayer-friendly** and designed to work with Unreal’s networking model.
53+
- **Server-Client Interaction**:
54+
- **Server Authority**: The server validates and executes abilities to prevent cheating.
55+
- **Client Prediction**: Clients can predict ability outcomes for smooth gameplay (e.g., instant feedback for attacks).
56+
- **Replication**:
57+
- Attributes, effects, and ability states are replicated across the network so all players see consistent results.
58+
- Examples in multiplayer:
59+
- A healer casts an area-of-effect (AoE) ability that heals teammates. Each player’s health attribute is updated on both client and server.
60+
- A player uses a dash ability, and the movement is predicted on the client to avoid lag, while the server confirms the action.
61+
62+
---
63+
64+
## Why Use GAS?
65+
66+
- **Scalability**: Start with simple abilities and expand to more advanced ones as your project grows.
67+
- **Flexibility**: Easily link abilities to other game elements like animations or sounds.
68+
- **Multiplayer Support**: Robust tools for syncing abilities and attributes across clients and servers.
69+
- **Efficiency**: Built-in systems for managing complex gameplay interactions without reinventing the wheel.
70+
- **Quality**: Made by Epic Games and used in AAA titles like *Paragon* and *Fortnite*, ensuring high performance and reliability.

0 commit comments

Comments
 (0)