
From this lecture you will know what software we gonna be using, how to get it and install. You will also familiarize yourself with will two ways of getting and installing the Unreal Engine, and will be able to choose which one works best for you. You can find the mentioned links in the attached external resources.
In this lecture we will setup the project. I will show you how to do it with the launcher or with the source code.
Why use Ability System at all? In this lecture we will discuss difficulties you can face while working on multiplayer gameplay and what Ability System can offer to handle them.
AbilitySystemComponent is the main component that you gonna use to work with abilities. In this lecture we will dive into it and explore how it works and what can be used for.
*Updates*
AbilitySystemComponent is not directly derived from Actor Component, I just meant that it's not a Scene Component, so we should not care about it’s transform etc.
Gameplay Ability is the base class for every ability. In your game, things like Jump, Sprint, Shoot - all could be independent abilities. In this lecture we will investigate it's code and see how it works and how to work with it.
Using our AbilitySystemComponent we can run ability tasks. What are they, how they work, how to create them and how we can use them - we will discuss in this lecture.
Gameplay Tags is a great feature, that can work independently even without AbilitySystemComponent or Abilities, but can be used by them too. In this lecture we will talk about their nature and main use cases.
Gameplay attributes can be used for health or movement speed, they are replicated and can be modified by gameplay effects. We'll talk about them in this lecture.
Gameplay Effects are a useful feature that works with tags, attributes and abilities in general. We will talk about them in this lecture.
In this lecture we'll see why gameplay cues are great to execute replicated visual effects, will investigate how they work and how we can use them.
In this lecture we will see what gameplay events really are, how they work with abilities and how we can use them.
In this lecture we will add the very basic code required for the Ability System to work.
*Updates*
! InitializeAttribes won't be needed OnRep_PlayerState
! ApplyStartupEffects should have just an authority check
In this lecture we will initialize the default character attributes and I will show you one of the ways how you can debug the Ability System.
It's always better to organize the work in a good way, and in this lecture we will use a simple approach: we will start moving from properties to data assets for character initialization. We will also setup it in a way that it will work correctly for multiplayer.
In this lecture we will setup the custom movement component and I will show you how to create a gameplay attribute-based movement.
For our purposes we gonna need a so called "strafe movement blendspace", which we gonna setup in this lecture.
P.S. While the forward-side approach is the most straightforward one, you can sometimes meet an angle-speed approach in blendspaces, which is often used.
In real game you might need different animations for different characters and circumstances. In this lecture we will setup our own anim instance and will switch to a data driven approach in selecting the animations to play.
This time, we will use a non trivial approach to work with surfaces. It gonna be useful for us later in this section and when implementing combat.
Its a good idea to have a dedicated footsteps component because in your game there can be a lot of cases where you might need to handle the feet state, which can influence character movement. For example: which sound to play when stepping on current floor? Are you in water? How loud should be the sound? In this lecture we will implement a custom footsteps component and using the previously created smart physical materials will finally hear every character footstep, with sound variation for different surfaces.
Enhanced input is a relatively new solution to implement advanced, context dependent input handling. In this lecture we will setup all the required basic code to use it and will re-configure our existing logic to it.
Jumping is one of the things that is handled by the movement component out-of-the-box. But should we turn it into an ability? In this lecture we will discuss and perform this, but also I will show you the advanced way of handling the Jump Ability in general. We will also see how to activate an ability by sending a gameplay event.
Because we gonna create many abilities, it might be a good idea to create some powerful base ability with helpful functionality. In this lecture we will create an extended ability base class and will use it for the already created Jump.
*Hint*
To see the ability log output, add this to the DefaultEngine.ini:
[Core.Log]
VLogAbilitySystem=Log
LogAbilitySystem=Log
Update 5.1
Include AbilitySystemLog.h inside AG_GameplayAbility.cpp
Crouching is another thing that like Jumping is handled and replicated out-of-the-box for us, but still, we will wrap it inside an ability and I will share with you some nuances about correct crouch state handling. We will also see how to activate an ability by tag.
Topics covered:
Crouch Ability
Crouch Animation Support
Correct crouching state representation with tags
In this lecture we will implement sprinting with speed attributes, abilities and effects.
Vaulting is not the most trivial thing, as well as the motion warping. In this theoretical lecture we will talk about:
Potential Vault Ability Implementation
How motion warping works under the hood
In this lecture we will finally implement the vault with motion warping.
Topics covered:
Montage Playing Ability Task with C++
Motion Warping
Vault Over Ability
*Update*
In this implementation I've used collision disabling inside the ability, but in this case it won't be locally disabled for Simulated Proxies. I recommend instead trying an effect with a collision disabling tag plus code support for it in the character class.
We will implement such a future, but for a ragdoll in the lecture about death.
In this non-trivial lecture we will implement our own wall run ability using a custom ability task.
Topics covered:
Wall Run Ability
Custom Wall Run Task
Custom Motion Warping Component
I've been taking about ability relations since the theoretical section and today let's dedicate time exactly to them.
Before proceeding to the implementation let's first discuss the potential inventory architecture.
We will start implementing inventory with a static data base class.
Topics covered:
Item Static Data
Blueprint Function Library
Class Default Object
When using some items or weapon, you might need to have a different animations for them, for example for locomotion. Here we will add a basic support for this feature.
In this lecture we will add weapon specific classes to our inventory.
*While we are using OnRep here, there is an alternative approach with spawning actor deferred and initialization on BeginPlay, but it will only work for info that should be initialized on startup. We will be using it with Projectiles (Lecture 44)
In this lecture we will implement a single shot ability which we will use with a Pistol. For this case, I've decided to show you the montage approach, that is commonly used across different abilities. We will also implement an animation notify to send a gameplay event, that you can use in many other cases.
In this lecture we will implement a feature for equipped items to apply effects to their owner. We will also use this feature for strafe movement, using the tag-based approach.
We already have a single shot ability with a montage, time to implement an automatic weapon shooting ability.
Unreal has a function on actors to take damage. But with abilities, when we say damage, we expect a gameplay effect that will affect the gameplay attributes.
Speaking of it's magnitude, to hardcode it inside an effect can be possible, but then you might need a separate effect for each weapon. To avoid this, we will re-use one damage effect, but will every time programmably set it's magnitude.
When using a weapon we expect it to play some sounds or VFX, like muzzle flash. In this lecture I will show you how to create such functionality using RPC. This is a common way of handling RPC, so please pay attention to how we will do it.
We already have shooting, now let's add the aiming ability. I will also show you how to implement the server-side targeting.
Our characters can receive damage, now let's teach them how to die! I will show you here an interesting approach, when even the death - is an ability!
Rockets, grenades, magical spells - all those are projectiles. To have a replicated projectile with an ability-based radial damage, is a very important part of implementing gameplay mechanics.
Topics covered:
Replicated projectile
Gameplay-Effect based radial damage
Ability System can be used not only for a character, combat or inventory, we can effectively use it for environments too! In this lecture, we will implement a volume that will allow us to do a lot of ability-based environmental things.
In the last lecture we've implemented an environmental feature, now let's use it to implement a camp fire.
In this lecture I will also show you how to work with gameplay cues, we will implement a camp fire first with an actor-based cue, then with the static cue.
In this lecture we gonna implement the ammunition items for pistol and rifle.
Our solution will include inventory tags, which we gonna use for total ammo count and managing, item staking, to have many bullets per item instance like a "pack" and some simple algorithms to support advanced adding/removal of such items.
Why taking this course?
Do you want to learn multiplayer gameplay programming with Unreal Engine 5? This course can save you months or even years of searching though infinite documentations, tutorials, and attempts to implement a stable framework for you projects.
No need to reinvent the wheel - I will guide you through the proven industry standard approaches and frameworks that will allow you to feel confident with multiplayer gameplay programming and be prepared for the real life challenges.
The course covers not only practice but also the theory of Ability System, which we will start with.
My goal is to give you not only a set of examples, but an understanding of how different multiplayer tasks can be approached, with nuances that could take you a lot of time to find out by yourself from trial and error.
You will also be able to request an access to a complete GitHub repository with all lectures implemented.
How to approach this course?
I highly recommend to follow lecture by lecture to not miss anything, but if you're here for a specific thing, you can always watch some specific lecture or better at least a section.
This course covers:
- Ability System (Theory & Practice)
- Locomotion
- Movement Abilities (incl. Motion Warping)
- Replicated Inventory Basics
- Combat Abilities
- Environmental features using Ability System