
We get the FPS assets for this course and create our Unreal Engine project.
Please note that you must use Unreal Engine 5.7 or ABOVE to use these assets. The FPS assets project can be opened with 5.7 or above.
We fill in the essential components for our Shooter Character
We create the Game Mode class for this project and assign the Default Pawn
We create the Input Mapping Context and Input Actions needed for basic locomotion
We add our Mapping Context and bind our Input Actions in the Player Controller
We create an Actor Component for handling combat functionality
We create Input Actions specifically for combat-related capabilities
We create the callbacks for combat Input Actions
We create the Weapon class
We create native C++ Gameplay Tags to categorize weapon types, then give our Weapon class its own WeaponType Gameplay Tag
We create a Data Asset that categorizes weapon Grip Point socket names and set up the infrastructure to store more data later
We create the core Interface that will be used in this project to easily access combat-specific entities from any Actor that inherits the Player Interface
We create the utility to spawn Weapons.
We add the ability to attach Weapons to grip points
We create our Weapon Inventory in the Combat Component
We create a replicated Current Weapon variable in our Combat Component
We create a struct to package animation data for first and third person meshes, for both weapon types. We add this to our WeaponData Data Asset
We create the Animation Blueprints for both the First Person Mesh and the Third Person Mesh
We handle blending between aim and non-aim poses in the Animation Blueprint
We implement a zoom in by changing the field of view with a Timeline while aiming
We implement aim offsets for aim and non-aim poses and see how it works in multiplayer
We fix the base aim rotation, which is compressed before replication, reversing the compression by mapping the pitch to reasonable values
We implement Forward And Backward Reaching Inverse Kinematics for our left hand so it always sticks to the weapon.
We pseudo-code the algorithm for calculating and interping the Yaw Offset for turning in place.
We implement the actual algorithm for calculating turn-in-place and strafing values that will drive our Animation Blueprint
We implement a Ground Standing state machine
We implement a Ground Crouching state machine
We implement Orientation Warping for turning in place
We implement jumping, completing our overall locomotion for the third-person mesh
We create a struct for storing our montages, then add maps to our data asset to map WeaponType to the correct set of montages
We create the RPC infrastructure for making weapon firing work in multiplayer
We implement the trace functionality for weapons
We create the infrastructure for Fire Effects to be invoked in response to weapon firing
We implement weapon fire cosmetic effects
We implement weapon impact cosmetic effects
We implement weapon decal cosmetic effects
We implement weapon sounds and weapon animation montages for firing
We implement full-auto, baby!
We discuss problems with naive approaches to server-side authority and replicated variables for Ammo. Then we discuss the client-side prediction model for replicating variables.
We implement Ammo on the Weapon, following the client-side prediction model.
We create an Overlay Widget to show the UI for the player
We create a Shooter Reticle Widget class that will handle updating reticle changes and ammo count changes
We add the ability for Weapons to lazily-create Dynamic Material Instances
We use Dynamic Material Instances to change properties on the reticle and ammo counter widgets at runtime
We update the ammo counter to display the current Weapon's ammo and mag capacity
We update the ammo counter in our Widget when firing the weapon and using ammo
We create a data structure to store parameters for the dynamically-changing reticle
We add factors that can be changed dynamically which contribute to the parameters on the reticle
We add the ability to detect when a player is targeting another player
We add a factor to our reticle that will change its color to red when targeting another player
We add a reserve ammo map for ammo carried on the player
We create a new Widget class to display the weapon's ammo as a numerical value along with the reserve ammo for that weapon
We create the Widget Blueprint for the Reserve Ammo Widget
We add a Weapon Icon that can change our UI depending on which Weapon we currently have equipped
We implement the Initiate_CycleWeapon function, putting the multiplayer infrastructure in place
We play the Equip Montage for the next weapon when attempting to Cycle Weapons
We create callbacks to respond to the Equip montage, both at a specified point in the middle, as well as when the Montage blends out
We actually perform the Weapon swap while cycling to a new Weapon
We update the UI when cycling to a new Weapon
We prevent the ability to spam the Weapon to bypass the Weapon's FireTime
We play Reload Montages and ensure that they work in multiplayer
We implement a notify callback for when reloading, actually transferring Ammo from the reserve into the Weapon
We implement automatic Reload capability for when we fire our last round and when we swap to a new, but empty, weapon
We create a function that we can call to add more Ammo, which can be used by Ammo Pickups
We create an Ammo Pickup class
We add functionality to the Ammo Pickup so it can add ammo and reset itself
We create the interface function for doing damage
We choose a montage to play in response to getting hit
We create a Health Component to manage health for our Character
We get a working Health Bar into our UI and make sure it can respond to damage
We implement player death
We implement death cosmetic effects
We spawn death cubes when a player dies
We add some effects for when a player's Character spawns into the level
We implement respawning when a player dies
We create our own custom Player Start Actors
We make sure the Character starts in a cool looking pose before all pertinent anim data is initialized
We implement the Shooter Player State, where important match-related stats will be stored.
We create an Elimination Component to handle keeping track of special and regular player eliminations
We broadcast important information when a round is fired, including whether it was a hit, a head shot, a lethal shot, etc.
We create the backbone for an algorithm for processing whether an elimination is one of the many special elim types
We pseudo-code our algorithm for processing special eliminations
We learn how to use an enum as a bitmask in which each bit can be set as a flag for a special elim type
We learn how to flip individual bits in an enum bitmask
We process sequential eliminations, keeping track of how long it has been since each previous elim
We implement elim streaks, keeping track of how many elims a player scores before they are defeated
We create our Game State class and store info there, such as whether or not first blood has been had.
We keep track of the leader in our match, or multiple leaders if there is currently a tie.
We update the leader status for the match in our Game State
We inform the client of important elim-related info, such as when an elim occurs and whether or not it's a special elim type
We create the special elim widget, designed to pop up, animate, fade away, and destroy itself
We create the Blueprint for our special elim widget and give it its fancy animation
We create the data asset for storing special elim data. This way we can access the correct icon and message for a special elim based on its type.
We implement functionality for eliminating a player who was in the lead.
We decode our enum bitmask with the bitwise AND, &.
We implement the full-on functionality of special eliminations, including enqueueing special elim info into a queue data structure and processing them in first-in-first-out (FIFO) order.
We create the Score widget for displaying and updating player score.
We create the Score's Widget Blueprint and make sure it updates when we score eliminations
In this course, you will learn how to program a multiplayer First-Person Shooter from scratch using industry best practices. This project scales to AAA quality competitive games, but also works for small indie games and single-player shooters.
With our data driven approach, we will create a scalable shooter game project designed to be extended with new capabilities and weapon types by changing adding assets and data, but not needing to alter existing code. Data assets store animations and montages, icons and UI messages, and our code references them efficiently with Gameplay Tags.
An asset pack is provided for this course, including all meshes, animations, weapons, sounds, Niagara system FX, and icons we will be using throughout the course. No need to find free assets or retarget animations.
In this course, you will learn:
How to set up first and third-person meshes for first-person shooters in multiplayer
Setting up Enhanced Input for handling locomotion as well as shooter-specific inputs like firing, reloading, cycling, and aiming
Creating a weapon inventory with weapon cycling, designed for any number of weapons. Rifle and Pistol meshes are provided
Creating Data Assets for efficiently organizing animations and montages that our character Animation Blueprints reference to easily blend to the correct pose based on the current weapon
Creating a full-fledged Animation Blueprint for both first and third person meshes, with aim offsets, hand IK, strafing, jumping, crouching, and turn-in-place with orientation warping. All animations are provided.
Implementing Client-Side Prediction for Ammo, retaining server-side authority while keeping the client-side experience responsive and instantaneous
Implementing weapon aiming, with aim animations and field-of-view zooming and look-sensitivity adjustment
Weapon firing in multiplayer for both automatic and semi-auto fire
Weapon fire effects, including muzzle flashes, impact particles, weapon trails, bullet hole decals, and dynamically-changing effects based on the physical surface hit (concrete, glass, character). Weapon fire sounds and weapon animations and shell-eject particles.
UI displaying health, ammo, reserve ammo, and player score.
Dynamically-changing reticles that switch per weapon, animated with dynamic material instance parameters. Reticles expand, shrink and morph, and change color with weapon fire, aiming, and targeting other players
Reloading weapons, adding ammo with ammo pickups, automatic reload when emptying the weapon, picking up ammo with an empty weapon, and swapping to an empty weapon
Causing damage, detecting head shots, implementing player elimination and respawning
Collecting player stats and displaying UI messages in response to special elims, including:
Gaining and losing the lead, and tying the leader.
First blood (getting the first elimination)
Showstopper (ending someone's spree)
Elim streak
Spree
Dethrone (eliminating the leader)
Revenge (eliminating the last person who defeated you)
Sequential (double elim, triple elim, etc)
Headshot elim
Collecting stats such as hits and missed shots, elims, and defeats
The project we create in this course works on:
Dedicated Servers
Listen Servers
Single-player, standalone mode
and we test all three modes in the PIE (play-in editor)
This course is the culmination of over a decade of heavy Unreal Engine C++ multiplayer experience. It is programmed according to the SOLID software design principles and architected for modularity and scalability.
This course assumes you already understand C++ and have created C++ projects in Unreal Engine. Knowledge of Unreal Engine multiplayer concepts is a plus, but not required. If you've taken my Multiplayer C++ CRASH COURSE, you are prepared for this course.
You will have access to the Druid Mechanics Discord Community, where students are already showing off their progress with this course, and some are using their own custom assets for their shooter games!
I hope you're excited to create a First-Person Shooter!
See you soon,
Stephen