Unreal Engine 4 Mastery: Create Multiplayer Games with C++
Approved by Epic Games and taught by former Epic Games engineer, Tom Looman, this course teaches you how to use C++ to build your own games including artificial intelligence in Unreal Engine 4.
If you have a bit of programming know-how from other coding languages but are new to C++ game development, then this course is for you! Unreal Engine 4 Mastery is also a great fit for current developers who have previous experience with Unity3D or other game engines. Unleash the full power of the Unreal Engine by taking this step-by-step guide.
In this course, you will:
Create two multiplayer-ready games in C++
Create multiple types of AI enemies
Expose C++ code to Blueprint to unlock the full power of the engine
Discover the fundamental classes required to build games
Code many common gameplay mechanics like weapons, power-ups, characters, guards, and more
Challenge yourself with fun activities that further test your programming knowledge
Discover many tricks and features in C++ to get the most out of Unreal Engine
Master the fundamentals to build your own dream game
You’ll go hands-on immediately and dive straight into completing over 14 challenges and two game projects. You’ll start by creating a first-person stealth game, where you’ll learn the basics of C++, AI, and networking. Then you’ll build a third-person cooperative shooter game, in the likes of Gears of War or Fortnite. In this project, you’ll expand your learning of C++, make the game fully multiplayer-ready, and create fun artificial intelligence to play against with friends.
This course is also packed with challenges where you’ll build a grenade launcher, a black hole that sucks in the fabric of space, and a launch pad that bounces players and objects around–just to name a few! Through these activities, you’ll explore the engine’s code, improve your problem-solving capabilities, and take your games to the next level.
By the end of the course, you can use your knowledge of C++ and Blueprints to build your own dream games. You can use the games built during this course for your personal projects moving forward, as you add more advanced features. Even if you thought C++ was difficult or intimidating before taking this course, you will learn how easy it is to code C++ within Unreal Engine 4 once you go through these lectures. Even if you are are only interested in single-player type games, this course will be a great fit as it teaches many other concepts besides programming for multiplayer games.
Why Learn From Me
In this course you will learn more than just programming in Unreal Engine 4. You will actually follow the ‘Unreal Way’ of making games in this Epic Games-approved course. Start off on the right foot and write effective C++ code using methods the engine creators have used themselves! I have been working with Unreal Engine 4 and creating game development tutorials since day one. Through this partnership with Epic Games, you will gain the skills to create stunning new projects and advance your professional aspirations in game development.
Join me in this course and start building awesome games in C++ today!
Note: Now includes FULL Chinese subtitles for all 140+ Lectures!
Introduction & Set Up
Thank you for purchasing my Udemy Course on C++ in Unreal Engine 4!
Before we start programming, we have a few things to set up.
Installing Visual Studio 2017
Visual Assist is a Visual Studio plugin to help navigation and coding in C++.
Get the most out of this course, by knowing the difference between Activities and Challenges. Also, the source code for both projects is available via GitHub.
Walk-through of potential issues, compile errors and other problems you may run into and how to avoid them.
Quick and fun exercise where we add explosion particles to projectile bounce events in C++.
Stealth Game 1: Project Basics
Walkthrough the C++ FPS template project. Resource available in the lecture "Resources". Bare-bones project without Section 1 specific content is on GitHub.
Learn to create a C++ Class. What are Header files and cpp files, and the BeginPlay and Tick functions in Actors.
Learn to add ActorComponents to Actors in C++, expose variables to Blueprint and how to use #include to use other classes.
Learn how to setup collision channels on ActorComponents and how to react to overlap events in your Actor.
Learn how to 'Cast' C++ classes to different types and how to changes variables of one Actor in a different Actor.
Learn to add UMG widget via HUD class for UI text display. Create GameMode to setup default game framework classes.
Challenge! Build your own Actor that sucks up nearby simulated actors into itself like a black hole.
Stealth Game 2: GameMode Rules
Learn to bind overlap events in C++ with OnComponentBeginOverlap and logging using UE_LOG macro.
Learn to use DecalComponent to mark the extraction zone with imported content assets available in the Lecture Downloads.
Learn to disable input on Pawns and using GameMode to create a game over state that can be extended in Blueprint using the BlueprintImplementableEvent keyword.
Add UI feedback using Unreal's UMG to show the mission complete message.
Introducing TSubclassOf for class assignment in C++ and Blueprint.
Use your newly learned skills and concepts to build a launch pad that fires away players and other Actors on the map!
Stealth Game 3: AI Guards
We build the core of our AI agent with PawnSensingComponent to setup senses like sight and hearing.
Learn how to setup sight in the pawn sensing component for your AI Guard.
Learn how to setup hearing sense in the pawn sensing component for your AI Guard.
With PawnSensing and MakeNoise we distract the guard when a projectile bounces.
With UMG (Unreal Motion Graphics) we add feedback on the AI's current state to the player.
Challenge! Move the guard around using the available MoveTo logic and have AI patrol between two locations.
Stealth Game 4: Multiplayer Support
Play the game and see the current state of the game in multiplayer. Expect lots of things to not work yet!
Learn how to network the project with Unreal's replication system.
Continuing making the game multiplayer ready by replicating which player is carrying the objective,
Create a GameState class to send information from server to all clients on game changes, for example when mission ends we can DisableInput on all clients.
Create PlayerController class to handle UI events (like showing the 'mission complete' text). Also making sure all clients set the post-mission camera location after the mission ends.
Activity to play with a friend to test our your newly created multiplayer game!
Coop Game 1: Introduction & Player Setup
Create Blank C++ Project via Epic Games Launcher.
Create new C++ class to act as our player.
Bind keyboard input to a function, and set up input bindings via Project Settings. Create and add Player Blueprint to the level with Auto Possess.
Bind mouse input to a function, set up input binding via Project Settings.
Forward declaring classes, add header include, add Camera to the player, expose C++ components to Blueprint.
Run console commands (~ Tilde) to visualize collision. Use SpringArmComponent for third person camera collision and movement.
Import animation content from Marketplace and set up skeletal mesh in Blueprint.
Add crouching to player and key bindings using built-in Crouch code.
Use Marketplace 'Animation Starter Pack' to setup player animations. Customize pack's Animation Blueprint for our specific needs.
Challenge video! Use Unreal's Jump logic to make your character jump, as a bonus you can try to link this with the animation blueprint.
Coop Game 2: Weapon Basics
Create C++ Weapon class to be equipped by characters.
Import weapon SkeletalMesh, and assign in Blueprint
Setup line-tracing when weapon Fire function is triggered and checking our results for an Actor to damage.
Update line trace to use camera view point instead of default pawn eye height.
Use of the fire logic, to apply damage to other actors.
Creating a target dummy actor that responds to damage to test our code.
Add Muzzleflash and impact particle effects to the weapon and using sockets to attach the effects to a mesh.
Create a smoke beam particle effect to visualize the bullet trail.
Using UMG to draw a simple crosshair on screen.
Challenge Lecture! You will put your knowledge on spawning actors, using ProjectileMovementComponent, and inheritance to use to create your own projectile weapon.
Coop Game 3: Weapon Extras
Activity to brainstorm your own extra weapon feature such as bullet spread or weapon charge-up mechanic. Take some time to experiment and try to code it on your own.
Coop Game 4: Hitpoints and Death
Learn how to create your own ActorComponent in C++.
Learn how to bind to delegates and events in C++. And logging debug output to track how and when code is running.
Learn how to declare a custom C++ delegate (aka event) using a macro and implement it in the health component.
Learn to play animation in Animation Blueprint based on C++ variables when a character dies from damage.
Learn how to create materials to use in UMG Widgets and how to set parameters in materials from C++ to change the look of the material at runtime.
Challenge video! Create the classic red explosive barrel in Unreal Engine. We will use this challenge result in the next section to make it work in multiplayer too!
Coop Game 5: Game Networking
Learn about "Role" and how to use ROLE_Authority to run pieces of code only on the server or client.
Learn how to make 'Server'-functions that run code on the host if called by a connected client. (Other Keywords: Reliable, WithValidation)
Create a struct to replicate multiple variables to clients with rep notify (aka ReplicatedUsing). Learn how to use DOREPLIFETIME_CONDITION to optimise networking by sending variables only to specified clients.
Playing particle and sound effects on the clients and server using ReplicatedUsing (aka "RepNotify"). Learn about Unreal's adaptive net update frequency using NetUpdateFrequency and MinNetUpdateFrequency.
Replicating ActorComponent with GetOwnerRole() to limit where code is running, for example only on the authoritative server to handle damage.
Challenge video! Use the results from the previous section where we built an explosive barrel and make it simulate on both client and server.