Unreal Engine C++ Developer: Learn C++ and Make Video Games
4.6 (43,291 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
219,394 students enrolled

Unreal Engine C++ Developer: Learn C++ and Make Video Games

Created in collaboration with Epic Games. Learn C++ from basics while making your first 4 video games in Unreal
Bestseller
4.6 (43,291 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
219,394 students enrolled
Last updated 7/2020
English
English [Auto], Italian [Auto], 3 more
  • Polish [Auto]
  • Portuguese [Auto]
  • Spanish [Auto]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 52.5 hours on-demand video
  • 18 articles
  • 20 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • C++, the games industry standard language.
  • How to use the Unreal Engine 4 Editor.
  • Git as a version control and backup system.
  • Object Oriented Programming and how to put it into practice.
  • Sound effects and audio to add depth to your games.
  • Game design principles.
  • Programming patterns and best practices.
  • Unreal's Terrain Editor to create epic landscapes.
  • Artificial Intelligence behaviour programming for enemies.
  • Strong and transferable problem solving skills.
  • Modern game development technologies and techniques.
  • A fundamental understanding of computers.
  • Write code that is clean and to understand.
  • Unreal Gameplay Framework to make games easily.
  • Advanced vehicle physics.
  • Blackboard and Behaviour Tree for customizable AI.
  • Animation Blueprint for custom character animation.
  • C++ template programming to reduce repetition.
  • Vector maths for game play and physics calculations.
Course content
Expand all 342 lectures 52:26:10
+ Introduction and Setup
10 lectures 46:50
Where To Find Lecture Resources
00:16

In this video (objectives)…

1. Meet the team.

2. Learn about our community.

3. Engage in at least one community.

4. How to ask good questions.


After watching (learning outcomes)…

You will know where to find help when you need it.

(Unique Video Reference: 1_I2_UC2)

Preview 05:58

In this video (objectives)…

  • Unreal Development Environment overview.

  • Mac users skip or skim rest of video.

  • Already got VS Community 2019? Skip or skim video.

  • We're installing VS Community so we can code in C++.

  • Easiest way to ensure we have all the pre-requisites.

  • Choose package including Epic Games Launcher.

  • We'll ALSO install VS Code later as lightweight option.


After watching (learning outcomes)…

You will have Visual Studio Community 2019 installed if on PC.

(Unique Video Reference: 2_I2_UC2)

Compilers & VS Community
06:07

In this video (objectives)…

  • Remind PC & Linux users to skip.

  • MacOS 10.14 Mojave or later required.

  • Remind we're installing for pre-requisites.

  • Start Xcode downloading.

  • Install Epic Games Installer.

After watching (learning outcomes)…

You'll be ready to download and install Unreal Engine.

(Unique Video Reference: 3_I2_UC2)


Install Prerequisites On MacOS
05:05

In this video (objectives)…

  1. sudo apt install g++ git make -y

  2. git clone --single-branch --branch 4.22 https://github.com/EpicGames/UnrealEngine.git

  3. Create GitHub “Personal Access Token” with “repo” access (or use SSH)

  4. cd UnrealEngine

  5. ./Setup.sh (register Unreal file types when asked)

  6. ./GenerateProjectFiles.sh (much faster)

  7. make will take some time (add -j x to set x jobs). Have 100GB+ free.

  8. cd Engine/Binaries/Linux/ then run ./UE4Editor Celebrate!

  9. Vulkan warning? Update or ./UE4Editor -opengl

  10. Write-down start time & share build-time & specs with community!


After watching (learning outcomes)…

You will be able to build Unreal Engine from source (on Linux at least).


(Unique Video Reference: 4_I2_UC2)

Build Unreal From Source (Linux)
13:56
Antivirus Warnings
00:19

In this video (objectives)…

  1. Get the Epic Games Launcher running.

  2. Install Unreal Engine 4.22.


After watching (learning outcomes)…

Be able to start Unreal Engine (any version) downloading.


(Unique Video Reference: 5_I2_UC2)

Install Unreal Engine 4.22
04:35

In this video (objectives)…

  1. Why we're also using VS Code

  2. Install Visual Studio Code

  3. Extra note on how to open Code on Windows.


After watching (learning outcomes)…

Install VS Code, and open it from the Developer Command Prompt on Windows so that we can compile C++ on the Terminal.


(Unique Video Reference: 6_I2_UC2)

Also Install Visual Studio Code
09:11

Got cold feet about C++ already? Prefer to start with Blueprint visual coding?

Check out the partner to this course, which focuses on different games and Blueprint over C++.

Otherwise, carry-on and enjoy your stay!

Want to Focus on Blueprint?
00:04

In this video (objectives)…

  1. I’m excited that you’re all set-up and ready go

  2. Be using Unreal in section 3 for first time, with Mikey

  3. Why Ben designed the course this way

  4. Why Gavin’s only in Section 2

  5. Remember to use our community forum, Discord, and Facebook group

  6. Thanks for being our student, enjoy the journey.


After watching (learning outcomes)…

You will know where to get support, and be ready for the next section.


(Unique Video Reference: 7_I2_UC2)

Section Wrap-up
01:19
+ Triple X - Write Pure C++
19 lectures 02:04:05

In this video (objectives)…

+ Handing over to Gavin

+ Why a terminal game first

+ Following in VS Community 2019

+ Beware of the trap of CIN etc.

+ Will set you up for Bull Cow in Unreal next

+ Enjoy the section!


After watching (learning outcomes)…

Feel ready to dive into your first C++ program.


(Unique Video Reference: 0_TX_UC2)

Introducing Triple X & Gavin
01:42

In this video (objectives)…

+ Understand the gameplay of Triple X, the game you will be building in this section.
+ Why learn C++
+ Start thinking about a theme for your own version of Triple X

After watching (learning outcomes)…
Understand the gameplay behind Triple X


Unique Video Reference: 1_TX_UC2

Triple X Game Design Doc
05:00

In this video (objectives)…

+ Overview of the code for Triple X

+ Learn about the structure of C++

+ Record the starting point of your C++ journey

After watching (learning outcomes)…

Explain the basic structure of indentation in C++ code. 


Unique Video Reference: 2_TX_UC2

The Structure Of C++ By Example
07:39

In this video (objectives)…

+ Write your first program

+ Learn how to include header files

+ Understand why we start with the main function

After watching (learning outcomes)…

Understand why every C++ program must have a main function


Unique Video Reference: 3_TX_UC2

Your First Program
07:42
Saving Files
00:09
A note about red underlines
00:48

In this video (objectives)…

+ Learn about Preprocesser Directives

+ Learn about namespaces

+ Learn how to output strings to the terminal

After watching (learning outcomes)…

Be able to write code so you can output strings to the terminal


Unique Video Reference: 4_TX_UC2

Hello, World!
08:53

In this video (objectives)…

+ Learn how to store data in C++

+ Learn about declaring and initializing variables

+ Learn how to output the value of variables to the terminal

After watching (learning outcomes)…

Declare variables and initialize variables


Unique Video Reference: 5_TX_UC2

Variables
08:03

In this video (objectives)…

+ Understand what const does

+ Learn how to initialize variables with expressions

+ Assign values to variables

After watching (learning outcomes)…

Learn how to declare your variables as constant


Unique Video Reference: 6_TX_UC2

const & Assigning Values
06:18

In this video (objectives)…

+ Understand the lines of code that are expression statements in your file

+ Understand the lines of code that are declaration statements in your file

+ Commenting code

After watching (learning outcomes)…

Understand how to comment your code

Unique Video Reference: 7_TX_UC2

Statements & Comments
05:27
Triple X Mid-section Quiz
5 questions
MSVC Compilation Warnings [Windows Only]
00:10

In this video (objectives)…

+ Naming

+ How to rename all occurrences in VS Code

+ Self documenting code

After watching (learning outcomes)…

Give your variables good names and self document your code


Unique Video Reference: 8_TX_UC2

Naming & Self Documenting Code
07:14

In this video (objectives)…

+ Allow users to make input with cin

+ Learn how to store what users enter

+ cin rabbit holes

After watching (learning outcomes)…

Learn how to allow user input in your program


Unique Video Reference: 9_TX_UC2

Getting User Input
08:56

In this video (objectives)…

+ Learn how to branch your code with if and else statements

+ Learn about code blocks/compound statements

+ Equal to operator

After watching (learning outcomes)…

Write code that branches with if and else statements


Unique Video Reference: 10_TX_UC2

Using if and else in C++
07:50

In this video (objectives)…

+ Understand what a function is

+ Learn how to write a function

+ Learn how to make a function return no value with void

After watching (learning outcomes)…

Learn how to write a function that returns no value


Unique Video Reference: 11_TX_UC2

Functions
11:01

In this video (objectives)…

+ Booleans

+ Unreal's coding standard for booleans

+ Learn how to make your function return a boolean

After watching (learning outcomes)…

Learn how to write functions that return values


Unique Video Reference: 12_TX_UC2

Returning Data From Functions
08:33
Triple X Mid-section Quiz
5 questions

In this video (objectives)…

+ Function parameters

+ Passing arguments to a function

+ Variable scope

After watching (learning outcomes)…

Create parameters for your functions that allow you to pass arguments


Unique Video Reference: 13_TX_UC2

Function Parameters
08:54

In this video (objectives)…

+ Learn about comparison operators in C++

+ Learn how to write conditions that compare values

+ rand()

After watching (learning outcomes)…

Write conditions that compare values


Unique Video Reference: 14_TX_UC2

Comparing Values
08:09

In this video (objectives)…

+ Learn about the modulus operator

+ Learn how to limit rand() to a range

+ Learn how to seed rand()

After watching (learning outcomes)…

Generate random numbers within a range


Unique Video Reference: 15_TX_UC2

Generating Random Number Ranges
11:36
Triple X End Of Section Quiz
3 questions
+ Bulls & Cows
55 lectures 06:47:32

Hi everyone!

I'm Mike, I'll be taking over in a few lectures time, see you soon...

Hi I'm Mike
01:16

In this video (objectives)…

  • Understand the game we are going to create.

  • It’s a terminal game, but within Unreal.

  • Allows us to use Unreal specific C++.

How Does The Game Work?

  • Word guessing game.

  • Guess the Isogram...

  • Letter in guess and right place is a “Bull”.

  • Letter in guess, but wrong place is a “Cow”.

Mechanics Of The Game

  • Hidden word pulled from a list.

  • Game will let us know the number of lives we have.

  • Player will make a guess.

  • Lose a life if you get it wrong.

  • Display how many bulls and cows.

  • If the correct word is guessed then the game is won.

  • If the lives run out, the game is over.

After watching (learning outcomes)…

You will know what is coming up in this section.

(Unique Video Reference: 1_BC_UC2)

Introduction To Bull Cow Game
04:30
Non-English characters
00:08

In this video (objectives)…

  1. Checking you have UE 4.22 or greater.

  2. Download from assets Udemy resources.

  3. Make sure the project works.

After watching (learning outcomes)…

You will have imported Bull Cow game ready to play with.

Importing Bull Cow Game
08:25
Terminal Actor: Non-English Characters Unsupported
00:06

In this video (objectives)…

  • A brief look at a common issue you might have in Unreal, especially when working on or moving to another machine.

After watching (learning outcomes)…

You will be able to fix this error message

(Unique Video Reference: 3_BC_UC2)

The Game Module X Could Not Be Loaded
01:12

In this video (objectives)…

  1. Know how to give us the Project Log.

After watching (learning outcomes)…

You'll be able to provide us with the project log and with better questions.


(Unique Video Reference: 3b_BC_UC2)

Helping Us Help You
03:32

In this video (objectives)…

  • Play with the interface.

  • Understand how to set it up just right for your setup.

After watching (learning outcomes)…

You will be comfortable setting up the unreal interface to your needs.

(Unique Video Reference: 4_BC_UC2)

A Look Around Unreal
05:35

In this video (objectives)…

  • Create multiple viewports.

  • Use LMB RMB and MMB to navigate.

  • User RMB and WASD, EQ to move around the level and the scroll wheel adjusts the speed.

After watching (learning outcomes)…

You should be comfortable moving around within a level.

(Unique Video Reference: 5_BC_UC2)

Controlling The Viewport
04:01

In this video (objectives)…

  • Any object that can be placed in your level is called an Actor.

  • They all have a transform.

  • There are several different types of Actor.

After watching (learning outcomes)…

You will be able to edit your levels actors.

(Unique Video Reference: 6_BC_UC2)

Editing Actors In Our Level
10:05

In this video (objectives)…

  • Duplication.

  • Content Browser window.

  • Default Actors in the Modes window.

After watching (learning outcomes)…

You will be able to add new actors to the level to make it your own.

(Unique Video Reference: 7_BC_UC2)

Adding Actors To The Level
04:54

In this video (objectives)…

  • Explore the different tools available to modify the landscape.

After watching (learning outcomes)…

You will be able to edit the BullCow Game Landscape.

(Unique Video Reference: 8_BC_UC2)

Editing the Landscape
08:03
Mid-section Quiz
4 questions

In this video (objectives)…

  • Setup UE4 and your IDE.

  • Create VS Code project.

  • Open and check the project.

After watching (learning outcomes)…

You will have you IDE setup and ready to work with Unreal.

(Unique Video Reference: 9_BC_UC2)

Setting Up VS Code In Unreal
04:11

In this video (objectives)…

  1. Sam shows us how to work around the 4.24 VSCode intellisense bug.

4.25 VSCode Intellisense Bug
02:43

In this video (objectives)…

  • An Actor is a container that can have many components.

  • There are many different component types.

  • We have a special component called the “BullCowCartridge”.

After watching (learning outcomes)…

You will have attached the component that will allow your in-game terminal work!

(Unique Video Reference: 10_BC_UC2)

Actors And Components
05:07

In this video (objectives)…

  • Show you how to print to our terminal in game using PrintLine(“”);.

  • Introduce you to ClearScreen();.

After watching (learning outcomes)…

You will have your terminal doing something!

(Unique Video Reference: 11_BC_UC2)

Using The In Game Terminal
08:55

In this video (objectives)…

  • std::cout << “Welcome”;

  • string Word = “Welcome”;

  • For strings we need to use FString instead.

  • Later on instead of int, we will use int32.

After watching (learning outcomes)…

You will start to understand that Unreal uses its own types.

(Unique Video Reference: 12_BC_UC2)

Unreal's Types - FString
03:46

In this video (objectives)…

  • Encodes our FString allowing it to work across multiple platforms.

After watching (learning outcomes)…

You will understand why you need to use the TEXT() macro.

(Unique Video Reference: 13_BC_UC2)

The TEXT Macro
03:11
Mid-section Quiz
4 questions

In this video (objectives)…

  • Process the player will go through.

  • There will usually be many loops with in a larger game.

  • What is our player’s experience from the moment they interact with the terminal.

After watching (learning outcomes)…

You will understand the purpose of creating a visual game loop to check your code against

(Unique Video Reference: 14_BC_UC2)

Bull Cow Basic Game Loop
04:42

In this video (objectives)…

  • Access the player input.

After watching (learning outcomes)…

You will be able to access the player input.

(Unique Video Reference: 15_BC_UC2)

Accessing Player Input
02:53

Medium Section Challenge

Coding The Basic Game Loop
08:58

In this video (objectives)…

  • We will cover classes in more detail later on.

  • HiddenWord needs to be used across multiple functions in the BullCowCartridge Class.

  • BCC” Class creates an instance of “BCC”.

  • HiddenWord can then be used across that instance.


After watching (learning outcomes)…

You will understand why you need to declare instance variables in the header file.


(Unique Video Reference: 17_BC_UC2)

Member Variables
06:13

In this video (objectives)…

  • Sam and Michael go through the step necessary to fix slow compile times.

  • Now your compile times will be quicker when not changing the header file.


After watching (learning outcomes)…

You will know the steps you need to take to fix slower than necessary complaining times in UE4.


(Unique Video Reference: 18_BC_UC2)

Solving Slow Compile Times
04:27

In this video (objectives)…

  • You will flesh out your game loop.

  • Understand the main points of game logic in our simple game.


After watching (learning outcomes)…

You will have a flowchart running through your game logic.


(Unique Video Reference: 19_BC_UC2)

The Full Game Loop
05:16

In this video (objectives)…

  1. You will understand the importance of pseudo coding

  2. Complements the flowchart approach really well.

  3. Allow you to put down ideas, and keep track of progress.

  4. Easier to catch logical errors early.

  5. Detailed, easy to read template for the rest of our code.


After watching (learning outcomes)…

You will be comfortable writing your own pseudo code


(Unique Video Reference: 20_BC_UC2)

Pseudo Code
10:17
Mid-section Quiz
3 questions

In this video (objectives)…

  1. Functions work best when they something specific.

  2. The name of the function tells us what it does.

  3. If you are having trouble naming your functions it might be doing too much.

  4. void UBullCowCartridge::InitGame()


After watching (learning outcomes)…

You will be able to create basic functions in Unreal Engine 4.


(Unique Video Reference: 21_BC_UC2)

Creating Our First Function
09:52

In this video (objectives)…

  1. How to search for code in a single file.

  2. How to replace single words.

  3. How to replace all instances of that search.

  4. Replacing across multiple files


After watching (learning outcomes)…

You will be able to find anything in your code base and modify multiple instances.


(Unique Video Reference: 22_BC_UC2)

Finding And Replacing In VS Code
08:06
The C++ Dot Operator
05:39

In this video (objectives)…

  1. You will understand that in order to format FStrings correctly your will have to call FString::Printf().

  2. You will be able to include data in your FStings.

  3. Printf() is a static function.

After watching (learning outcomes)…

You will be able to include other data withing Fstrings you are using


(Unique Video Reference: 24_BC_UC2)

Formatting FStrings
17:43

In this video (objectives)…

  1. Nothing checking whether the game is won.

  2. Boolean variables in Unreal a prefixed with a “b”.

  3. Example: bool bGameOver.

  4. Actually takes up 1 bit of memory but since memory is only accessed in bytes 1 byte is used.

After watching (learning outcomes)…

You will be able to code and use booleans in Unreal.


(Unique Video Reference: 24 Formatting FStrings)

Booleans
17:49

In this video (objectives)…

  1. You will learn more detail about pre and post increment decrement operators

  2. How they differ from each other.

  3. You will likely use pre increments and decrements.

After watching (learning outcomes)…

You will be able to use pre vs post increments / decrements with ease.


(Unique Video Reference: 26_BC_UC2)

Pre vs Post Increment / Decrement
18:27

In this video (objectives)…

  1. They are often used interchangeably.

  2. Parameters are used when defining a function.

  3. Arguments are the actual values used in the function when called.

After watching (learning outcomes)…

You will know the difference between parameters and arguments and also understand that the term is often used interchangeably


(Unique Video Reference: 27_BC_UC2)

Parameters And Arguments
08:51

In this video (objectives)…

  1. We will learn about early returns.

  2. This will make our code more readable.

After watching (learning outcomes)…

You will understand how to leave a function call early once a condition has been met, making your code cleaner and easier to read.


(Unique Video Reference: 28_BC_UC2)

Early Returns
14:22
Mid-section Quiz
5 questions

In this video (objectives)…

  1. Strings are an array of characters.

  2. E.g. FString HiddenWord = TEXT(“cakes”);

  3. Array length would be [5], you start from[0]! {‘c’,‘a’,‘k’,‘e’,‘s’,‘/0’}

  4. HiddenWord[3] is “e”

  5. HiddenWord[5 or greater] will crash Unreal.

After watching (learning outcomes)…

You will be able to access the characters on an FString


(Unique Video Reference: 29_BC_UC2

Structure Of An FString
21:27

In this video (objectives)…

  1. By using const you protect yourself.

  2. If a function doesn’t change any member variables of the class, make it const.

  3. Makes sure your functions aren’t modifying your classes when you don't intend them too.

  4. Also referred to as a “const function”.

After watching (learning outcomes)…

You will know when to make a function a const member function


(Unique Video Reference: 30_BC_UC2

Const Member Functions
06:17

In this video (objectives)…

  1. You will cover the 3 of 4 of the main types of looping

After watching (learning outcomes)…

You will be able to write basic loops in C++

(Unique Video Reference: 31_BC_UC2)

Looping In C++
15:17

In this video (objectives)…

  1. Compare every other letter of a word against the first one.

After watching (learning outcomes)…

You will be able to check characters of a word against each other


(Unique Video Reference: 32_BC_UC2)

Checking Characters Part 1
09:01

In this video (objectives)…

  1. Dive straight into a challenge.

  2. Nest for loops together.

After watching (learning outcomes)…

You will be able to check for Isograms through nestest loops


(Unique Video Reference: 33_BC_UC2)

Checking Characters Part 2
12:36

In this video (objectives)…

  1. Create an array of FStrings

After watching (learning outcomes)…

You will be able to create an array of types to store data in.


(Unique Video Reference: 34_BC_UC2)

TArray Of Hidden Words
07:49

In this video (objectives)…

  1. We see how the words list can be loaded at runtime.

Loading Words At Runtime
01:09

In this video (objectives)…

  1. You will use multi cursor to edit large blocks of text.

After watching (learning outcomes)…

You will be comfortable editing large chunks of text in VSCode.


(Unique Video Reference: 35_BC_UC2 )

Advanced Cursor Usage In VSCode
05:33

In this video (objectives)…

  1. You will understand how to see the number of elements in an array.

After watching (learning outcomes)…

You will be able to use the .Num() function to see the number of elements in an array.


(Unique Video Reference: 36_BC_UC2)

TArray Functions .Num()
06:14

In this video (objectives)…

  1. NOT

  2. AND

  3. OR

After watching (learning outcomes)…

You will be able to use all 3 logical operators.


(Unique Video Reference: 37_BC_UC2)

Logical Operators
06:41

In this video (objectives)…

  1. Learn additional functions calls for TArrays

After watching (learning outcomes)…

You will be able to add new elements to arrays


(Unique Video Reference: 38_BC_UC2)

TArray Functions Adding And Removing
16:19

In this video (objectives)…

  1. Range-based for loop syntax.

After watching (learning outcomes)…

  1. You will be able to use a range-based for loop.


(Unique Video Reference: 39_BC_UC2)

Range-Based For Loop
05:33
Mid-section Quiz
4 questions

In this video (objectives)…

  1. We will have an overview of how your types are stored in memory

After watching (learning outcomes)…

You will have a basic understanding of how types are stored in memory.


(Unique Video Reference: 40_BC_UC2)

A Quick Look At Memory
05:02

In this video (objectives)…

  1. We will introduce references.

After watching (learning outcomes)…

You will be able to use basic references in UE4


(Unique Video Reference: 41_BC_UC2)

Introduction To References
13:59

In this video (objectives)…

  1. You will pick a random word from ValidWords.

  2. In order to do this, we will be using FMath::RandRange

After watching (learning outcomes)…

You will be able to Random in Unreal.


(Unique Video Reference: 42_BC_UC2)

Random And The UE4 Docs
13:49

In this video (objectives)…

  1. You will notice other non-performant bits of code

After watching (learning outcomes)…

You will have a better more performant code.


(Unique Video Reference: 43_BC_UC2)

Out Of The Frying Pan
03:41

In this video (objectives)…

  1. Dan shows us how to filter the list we are loading with a predicate.

Loading Words With A Predicate
02:28

In this video (objectives)…

  1. You will learn about out parameters.

  2. You will learn how to identify them.

  3. You will learn how to create and use them.

After watching (learning outcomes)…

You will be able to identify, make and use out parameters.


(Unique Video Reference: 44_BC_UC2)

Out Parameters
14:58

In this video (objectives)…

  1. You will learn how to exit a loop using break.

After watching (learning outcomes)…

You will know the difference between break and continue.


(Unique Video Reference: 45_BC_UC2)

Break Out Of A Loop
02:48

In this video (objectives)…

  1. You will learn what a struct is.

  2. How to create a struct.

  3. How to make members private.

  4. How to access members of a struct.

After watching (learning outcomes)…

You will be able to make and use structs.


(Unique Video Reference: 46_BC_UC2)

Structs
11:13

In this video (objectives)…

  1. You will be challenged to add one or more features to the game.

After watching (learning outcomes)…

You will have made the game your own by using all the skills you have learnt so far.


(Unique Video Reference: 47_BC_UC2)

Bull Cow Extra Credit
01:33

In this video (objectives)…

  1. Michael wraps up the Bull Cow section.

After watching (learning outcomes)…

You have completed the Bull Cow Game section well done.


(Unique Video Reference: 48_BC_UC2

Bull Cow Wrap Up
00:48
+ Building Escape
47 lectures 08:44:28


In this video (objectives)…

  1. Michael welcomes you to the section.

After watching (learning outcomes)…

You will be welcomed to the section.


(Unique Video Reference: 02_BE_UC2

Welcome To Building Escape
02:10


In this video (objectives)…

  1. Michael shows you though the level.

  2. Details of what we are going to cover.

After watching (learning outcomes)…

you will know what is coming up in the section ahead.


(Unique Video Reference: 3_BE_UC2

Building Escape End Goal
05:05


In this video (objectives)…

  1. You will have set up a brand new project.

After watching (learning outcomes)…

Your default project will be setup and ready to work in.


(Unique Video Reference: 4_BE_UC2

Setting Up The Building Escape Project
05:51

In this video (objectives)…

  1. When you see/use * next to a type.

  2. Pointers are a memory address.

  3. Like references, they save having to copy/move data in memory.

  4. You can point to any object.

  5. You can lose control of your data.

After watching (learning outcomes)…

You will have an overview of pointers


(Unique Video Reference: 5_BE_UC2)

Pointer Primer
04:45

In this video (objectives)…

  1. You will understand Unreal's class system

  2. You will get an understanding of when you might use a component.

  3. Understand how to create a custom component.

After watching (learning outcomes)…

You will be able to create your own custom components.


(Unique Video Reference: 6_BE_UC2)

Unreal’s Classes and Components
09:18

In this video (objectives)…

  1. Understand why you cannot just delete a class in Unreal.

After watching (learning outcomes)…

You will be able to delete a class from Unreal.


(Unique Video Reference: 7_BE_UC2)

Deleting A Class
03:53

Testing your knowledge of C++ and Unreal up to this point.

Mid-section Quiz
3 questions

In this video (objectives)…

  1. Be able to log messages to the console.

  2. Make logs different colour to distinguish them.


After watching (learning outcomes)…

  1. You will be able to output messages at runtime to the console.


(Unique Video Reference: 8_BE_UC2)

Logging To The Output Log
07:02

In this video (objectives)…

  1. Setup your default starting level.

After watching (learning outcomes)…

You will be able to use the project settings in order to change the default starting level.


(Unique Video Reference: 9_BE_UC2)

Project Settings: Default Startup Level
01:40

In this video (objectives)…

  1. Using pointers.

After watching (learning outcomes)…

You will be able to access the name of the actor a component is part of.


(Unique Video Reference: 10_BE_UC2)

Accessing An Object’s Name
15:14

In this video (objectives)…

  1. Return an actors world location.

After watching (learning outcomes)…

You will be able to return an actors world location.


(Unique Video Reference: 11_BE_UC2)

Getting An Actor’s Transform
13:00

Testing your knowledge of C++ and Unreal up to this point.

Mid-section Quiz
3 questions

In this video (objectives)…

  1. Learn how to import an FBX.

  2. Link a texture to a material.

After watching (learning outcomes)…

You will be able to import custom models into UE4.


(Unique Video Reference: 12_BE_UC2)

Importing Custom Meshes
20:46

In this video (objectives)…

  1. Learn How to use BSP brushes to build a level.

  2. Use the additive and subtractive modes.

After watching (learning outcomes)…

You will have created a room from which to escape.


(Unique Video Reference: 13_BE_UC2)

Using BSP For Basic Building Blocks
22:54

In this video (objectives)…

  1. Challenge to use BSPs.

After watching (learning outcomes)…

You will have created a room from which to escape.


(Unique Video Reference: 14_BE_UC2)

BSP Challenge
12:27

In this video (objectives)…

  1. Learn lighting basics.

  2. Add lights to the scene.

After watching (learning outcomes)…

You will have light in your room.


(Unique Video Reference: 15_be_uc2)

Basic Lighting
09:16

Testing your knowledge of C++ and Unreal up to this point.

Mid-section Quiz
4 questions

In this video (objectives)…

  1. Using materials more effectively.

  2. Learn basic texture transformation.

After watching (learning outcomes)…

You will be able to reuse a texture multiple times with different properties.


(Unique Video Reference: 16_BE_UC2)

Transforming Material Textures
18:17

In this video (objectives)…

  1. Use SetActorRotation.

  2. Learn about floats.

  3. Use FRotator.

After watching (learning outcomes)…

You will be able to rotate an object in code.


(Unique Video Reference: 17_BE_UC2)

Rotating An Actor With Code
15:42

In this video (objectives)…

  1. Learn about colliders.

  2. look at the various ways you can set a custom one up.

After watching (learning outcomes)…

You will be able to create custom colliders for your meshes and understand their requirements.


(Unique Video Reference: 18_BE_UC2)

Object Collision
16:31

In this video (objectives)…

  1. You will understand how to use a Lerp.

After watching (learning outcomes)…

Your door will open smoothly.


(Unique Video Reference: 19_BE_UC2)

Using Linear Interpolation
19:50

Testing your knowledge of C++ and Unreal up to this point.

Mid-section Quiz
4 questions

In this video (objectives)…

  1. You will understand the pitfalls of hardcoding again, and understand why we really need the relative rotation of the door as our starting point.

After watching (learning outcomes)…

You will have a door component that will open any door to 90 Deg.


(Unique Video Reference: 20_BE_UC2)

Relative Vs Absolute
08:59

In this video (objectives)…

  1. You will expose the TargetYaw parameter to the editor window.

After watching (learning outcomes)…

You will be able to expose parameters you wish to edit to the component so you can adjust values in the engine.


(Unique Video Reference: 21_BE_UC2)

Exposing Parameters To The Editor
04:49

In this video (objectives)…

  1. Look at Unreal's naming conventions.

After watching (learning outcomes)…

You will have all of your assets named according to Unreal's naming standards.


(Unique Video Reference: 22_BE_UC2)

Assets Naming Conventions
07:42

In this video (objectives)…

  1. Use DeltaTime to make the doors movement framerate independent.

After watching (learning outcomes)…

You will realise that not using DeltaTime will change the speed of which things move depending on a frame rate!


(Unique Video Reference: 23_BE_UC2)

Framerate Independent Using DeltaTime
06:13

In this video (objectives)…

  1. Learn more about trigger volumes

After watching (learning outcomes)…

Have your trigger volume linked to your door.


(Unique Video Reference: 24 _BE_UC2)

Trigger Volumes
06:30

In this video (objectives)…

  1. Make a link between the collision volume and an actor.

After watching (learning outcomes)…

The player will be able to trigger the door to open.


(Unique Video Reference: 25_BE_UC2)

Using Collision Volumes
10:56

Testing your knowledge of C++ and Unreal up to this point.

Mid-section Quiz
5 questions

In this video (objectives)…

1. Null pointers will crash Unreal without any useful warnings.

After watching (learning outcomes)…

You Will have protected yourself from a potential Unreal crashing nullptr.

(Unique Video Reference: 26_BE_UC2)

Protecting From A Null Pointer
08:37

In this video (objectives)…

1. Set the ActorThatOpens to the DefaultPawn.

After watching (learning outcomes)…

You will be able to open the door by walking into the trigger volume.

(Unique Video Reference: 27_BE_UC2)

Getting The Player To Open The Door
07:31

In this video (objectives)…

1. The door opens but doesn't close again.

After watching (learning outcomes)…

Your door will have open and close conditions.

(Unique Video Reference: 28_BE_UC2)

Getting The Door To Close
04:54

In this video (objectives)…

1. Use GetTimeSeconds to create a timer.

After watching (learning outcomes)…

You will be able to delay to door from shutting by creating a simple timer.

(Unique Video Reference: 29_BE_UC2)

Using GetTimeSeconds()
12:54

In this video (objectives)…

1. Have parameters easily accessible, avoiding "magic" numbers.

After watching (learning outcomes)…

You will have easy access to your OpenDoor component parameters.

(Unique Video Reference: 30_BE_UC2)

Designer Friendly Components
07:58

In this video (objectives)…

1. Overview of what's coming up over the next few lectures.

After watching (learning outcomes)…

You will understand the direction that we are going to go in to create our grabber component.

(Unique Video Reference: 31_BE_CBC)

Grabbing System Overview
07:27

In this video (objectives)…

1. Creating a Blueprint Default Pawn that can have the Grabber component attached to it.

After watching (learning outcomes)…

You will be able to create a Blueprint that inherits from the DefaultPawn.

(Unique Video Reference: https://community.gamedev.tv/tags/32_be_uc2)

Modifying The Default Pawn Actor
10:55

In this video (objectives)…

1. Inherit a new BluiePrint GameMode from the C++ GameMode.

After watching (learning outcomes)…

You will be able to change the GameMode to use the newly created BP version and hence assign the Defaultpawn to our BP version as well.

(Unique Video Reference: 33_BE_UC2)

Inherit Game Mode Blueprint
06:40

In this video (objectives)…

1.  Use a topdown approach to get where the player is looking.

After watching (learning outcomes)…

You will have the Grabber component reporting the player's world location and the direction they are looking in.

(Unique Video Reference: 34_BE_UC)

Getting Player Viewpoint
14:07

In this video (objectives)…

  1. How to add vectors.

  2. Calculating our line trace end point.

  3. Using debug functions for visualisation in Unreal.

  4. Use DrawDebugLine() to visualise the vectors.

After watching (learning outcomes)…

You will have drawn a debug line visualising the players reach in the game.

(Unique Video Reference: 35_BE_UC2)

Using DrawDebugLine
15:14

In this video (objectives)…

  1. Line tracing (AKA ray casting) is a very useful tool.

  2. Imagine we shine a virtual laser into the world.

  3. We can use different view modes to visualise.

  4. Simulating physics sets the object channel.

After watching (learning outcomes)…

You will have set up your scene ready to interact with and have looked through the eyes of the collision engine.

(Unique Video Reference: 36_BE_UC2)

Line Tracing AKA Ray-Casting
12:35
Mid-section Quiz
10 questions

In this video (objectives)…

  1. Build params inc. FCollisionQueryParams.

After watching (learning outcomes)…

You will have a working raycast, detecting any objects that match your criteria.

(Unique Video Reference: 37_BE_UC2)

LineTraceSingleByObjectType()
13:40

In this video (objectives)…

  1. What FindComponentByClass() does.

  2. How to use it to find attached components.

  3. Introducing angle brackets <> for generics.

  4. Use nullptr to initialise your pointers.

  5. Log a useful error if the component isn’t attached.

After watching (learning outcomes)…

You will be able to link from your Grabber class to another component on the same Actor.

(Unique Video Reference: 38_BE_UC2)

Using FindComponentByClass()
11:47

In this video (objectives)…

  1. Settings > Project Settings > Engine > Input.

  2. Action mappings are used for on / off actions.

  3. Axis mappings are used for analog values.

  4. You can give players a way or re-mapping.

  5. Many keys can bind to one action.

  6. How to call a function on a key press or release.

After watching (learning outcomes)…

You will have mapped a key or button on a controller to call a function.

(Unique Video Reference: 39_BE_UC2)

Introducing Input Binding
13:23

In this video (objectives)…

  1. How the arrow, dot and :: accessors work.

  2. Introducing virtual memory.

  3. Introducing permanent storage, stack & heap.

  4. Heap is also known as free store.

  5. How accessor operators relate to memory.

  6. Bind another input action.

After watching (learning outcomes)…

You Will know much more about how memory is allocated and have bound a second function call to when the "Grab" Key is released.

(Unique Video Reference: 40_BE_UC2)

Accessors & Memory Layout
09:26

In this video (objectives)…

  1. A “hot loop” is code that get called often.

  2. TickComponent is a good example, every frame.

  3. Beware of code that you know will be called a lot.

  4. Make it clear what happens every tick.

  5. Refactor our code for speed...

  6. ...and make it ready for for the physics handle.

After watching (learning outcomes)…

You Will know much more about how memory is allocated and have bound a second function call to when the "Grab" Key is released.


(Unique Video Reference: 41_BE_UC2)

Reducing Code in “Hot Loops”
20:30

In this video (objectives)…

  1. Unreal provides a Physics Handle that’s ideal here.

  2. The Physics Handle component docs are scant*.

  3. Find an example of its use in the engine.

  4. Get the physics handle working.

Useful Links

Unreal Engine API Reference - UPhysicsHandleComponent.

After watching (learning outcomes)…

You will be able to pick up objects in your game!

(Unique Video Reference: 42_BE_UC2)



Using Physics Handles
16:20

In this video (objectives)…

  1. Using multiple getters for multiple return values.

  2. Fewer lines of clear code is better (143 at start).

  3. Naming is really important, take the time.

  4. Comment the “why”, don’t assume it’s obvious.

  5. The “what” should be obvious...

  6. … but it can be helpful to add clarification.

After watching (learning outcomes)…

You will have a more streamlined code base.

(Unique Video Reference: 43_BE_UC2)

Refactoring Rules
18:03

In this video (objectives)…

  1. A TArray is Unreal’s go-to container class.

  2. Use to contain many elements of same type.

  3. We’ll use to contain all actors on pressure plate.

  4. Give our Default Pawn an eye-height and mass.

  5. Making our pressure-plate based on total mass.

After watching (learning outcomes)…

You will have a working pressure plate by adding up the masses of actors in the collision volume.

(Unique Video Reference: 44_BE_UC2)

Iteration Through Valid Actors
21:58

In this video (objectives)…

  1. Horrible crashes when we follow a nullptr.

  2. We must always check pointers before use.

  3. When declaring always initialise to nullptr.

  4. Look for * in your .h files to help find pointers.

  5. Also check before every use and handle nullptr.

  6. Sometimes we may chose not to, e.g. Owner.

After watching (learning outcomes)…

You will understand fully the importance of protecting pointers and will have protected and written error logs to protect and inform you of potential issues

(Unique Video Reference: 45_BE_UC2)

Pointer Protection Process?
11:46

In this video (objectives)…

  1. We’re going to trigger a simple sound in Blueprint.

  2. Later in the course we’ll use C++ too.

  3. However we’ll always reference our assets via BP.

  4. How to trigger a 3D sound.

After watching (learning outcomes)…

You will have sound when the door(s) open and close.

(Unique Video Reference: 46_BE_UC2)

SFX & Audio Clips
19:01

In this video (objectives)…

1. Make a level not a techdemo.

After watching (learning outcomes)…

You will have a fun level to play.

(Unique Video Reference: 47_BE_UC2)



Building Escape Final Challenge
09:45

In this video (objectives)…

1. Michael congratulates you for completing this section!

After watching (learning outcomes)…

You will have finished this section!

(Unique Video Reference: 48_BE_UC2)



Building Escape Wrap Up
01:07
+ Toon Tanks
32 lectures 03:28:45

In this video (objectives)…

  1. Overview of the section and what to expect

Preview 00:50

In this video (objectives)…

  1. We look at the basic setup of the provided project to get ready to jump straight into creating our first C++ class.

Project Intro
01:59

In this video (objectives)…

  1. Show how to create, name and set the directory of the PawnBaseClass.

Pawn Class Creation
04:03

In this video (objectives)…

  1. Rob covers how to declare scene components in the header file and then create them in code file.

Creating Components
08:20

In this video (objectives)…

  1. Rob takes us through the steps of creating our two unique Blueprint pawn types derived from the C++ PawnBase class.

Deriving Blueprint Classes
03:56

In this video (objectives)…

  1. Describe the access modifiers and implement them into the components to show results

Access Modifiers
06:54

In this video (objectives)…

  1. We derive PawntTank from PawnBase, and setup our components in the new classes.

Creating Child C++ Classes
07:33

In this video (objectives)…

  1. We revisit how to declare input functions and then use them to implement the projecti specific input bindings functions. We then cover how to reparent blueprint classes to make use of the functionality of the new PawnTank class.

Pawn Movement Input
10:11

In this video (objectives)…

  1. Going back to make improvements to the pawn tank, exposing the movement speeds for easy in editor alterations and also updating the spring arm and camera component to feel better during play testing.

Exposing Variables
06:50

In this video (objectives)…

  1. Set a looping timer to call a function repeatedly

Pawn Turret
07:24

In this video (objectives)…

  1. Range check to player

Find Distance Between
07:02

In this video (objectives)…

  1. Implement protected virtual function

Virtual Functions
06:54

In this video (objectives)…

  1. Call virtual override function

Calling Override Functions
09:10

In this video (objectives)…

  1. We take a look at how to create Actor classes in C++ and the difference between using TSubclassOf and pointers when declaring certain properties.

Creating Actor Classes
08:40

In this video (objectives)…

  1. Rob shows us how to spawn actors into the world at runtime and set a reference to the new actors owner.

Spawning Actors
05:35

In this video (objectives)…

  1. Rob covers how to use Delegates to call functions in a generic, type-safe way, allowing us to call our own function whenever OnComponentHit is triggered.

Using Dynamic Delegates
07:17

In this video (objectives)…

  1. Rob explains what a GameMode class is and what i'ts responsible for in game. We then create and implement a custom GameMode class into the project.

Creating GameMode classes
09:51

In this video (objectives)…

  1. Rob covers the differences between the Actor and Scene components. We then declare the variables and functions in our new health component class.

Creating a Health Component
06:45

In this video (objectives)…

  1. We implement the full functionality to our health component and test its interaction with the projectile class and the apply/receive damage calls.

Adding Health Functionality
09:45

In this video (objectives)…

  1. Rob covers the main functionality required in the GameMode to drive the flow of gameplay. We implement our start game, player died and game over functionality.

GameMode - ActorDied
07:49

In this video (objectives)…

  1. Rob shows us how to create a new create and implement widget blueprint classes. We cover we main aspects of any widget class such as anchor points, element hierarchy and the designer and graph sections.

Creating Widget Blueprints
08:20

In this video (objectives)…

  1. Rob covers how we can easily use our existing Start Widget to quickly create and implement a new GameOver widget.

End Game Widget
04:04

In this video (objectives)…

  1. Rob shows how we can utilise the BlueprintImplementableEvents inside of the Blueprint GameMode derived from the GameMode C++ class.

GameMode Blueprint
07:22

In this video (objectives)…

  1. We look back over the health component class and take the opportunity to look at the approach to debugging through errors that don't cause obvious or fatal errors

Debugging our Health Component
05:22

In this video (objectives)…

  1. Rob describes and shows the use of the PlayerController class inside of Unreal. We implement functionality to Enable/Disable player input during the different stages of gameplay

Player Controllers
09:57

In this video (objectives)…

  1. We return to our PawnTank class and add our HandleDestruction functionality to hide the tank mesh and disable movement input.

PawnTank Destruction
04:34

In this video (objectives)…

  1. Rob shows how to spawn particle systems at runtime on our Pawn and projectile classes.

Spawning Particles
06:19

In this video (objectives)…

  1. Rob covers how we can use Particle System Components on a class to create a projectile trail particle.

Particle Components
02:20

In this video (objectives)…

  1. We cover how to play sound effects at runtime using the PlaySoundAtLocation function.

Playing Sound Effects
03:52

In this video (objectives)…

  1. Rob shows how we can create Camera Shake classes in both Blueprint and C++ and then covers some basic setup of the shake properties

Creating Camera Shake
06:14

In this video (objectives)…

  1. We take a look at implementing the Camera Shake classes we've created and playing them at runtime.

Implementing Camera Shake
02:58

In this video (objectives)…

  1. We make some of the final improvements to the project and cover how to build the project ready to share with others.

Wrap-up And Challenges
10:35
+ Simple Shooter
54 lectures 08:19:45

In this video (objectives)…

  1. Sam shows us the project for this section. We also outline the main topics we will be covering and in what order.

Preview 02:02

In this video (objectives)…

  1. Sam takes you through the setup of our basic project. We then import the assets from another project by "migration".

Project Setup
10:44

In this video (objectives)…

  1. What is a Character? We revise what a Pawn does and how Characters differ.

Pawns vs Characters in C++
12:22

In this video (objectives)…

  1. Unreal provides a lot when it comes to character movement. We learn about the main functions we can use on a Character class to bind movement.

Character Movement Functions
17:22

In this video (objectives)…

  1. You probably want your games to work well on controllers. Well aiming works a bit differently. We look at how use aim rates and DeltaSeconds to make aiming frame rate independent.

Controller Aiming
13:30

In this video (objectives)…

  1. 3rd person games are easy to do with Unreal. This lecture Sam introduces the SpringArm component and how it helps make 3rd person cameras.

Third Person Camera Spring Arm
08:57

In this video (objectives)…

  1. Sam shows us how to browse and play animations. He explains how a Skeleton asset allows animations to be shared between meshes.

Skeletal Animations 101
08:20

In this video (objectives)…

  1. Sam shows us how collision meshes can be edited and we fix a bug in the asset pack.

Editing Collision Meshes
05:09

In this video (objectives)…

  1. Sam introduces Animation Blueprints and the AnimGraph. We see how to use Blend nodes to combine animation assets.

Animation Blueprints 101
13:16

In this video (objectives)…

  1. Sam shows us how to create a Blend Space for character movement (locomotion).

2D Blend Spaces
10:28

In this video (objectives)…

  1. Sam shows us how to connect gameplay to animations via the Animation Blueprint.

Connecting Animation To Gameplay
08:59

In this video (objectives)…

  1. Sam takes a deep dive into the maths of Transforms and Vectors. We learn how to convert vectors from global to local space and turn them into rotations.

Inverse Transforming Vectors
09:38

In this video (objectives)…

  1. Sam shows us how to calculate foot speed. We apply this to prevent foot sliding in our animations

Calculating Animation Speeds
11:54

In this video (objectives)…

  1. Sam explains the architecture most commonly used for guns in shooter games. We create an Actor for our gun with a mesh.

Gun Actors
11:34

In this video (objectives)…

  1. Sam shows us how to spawn actors from other actors at run time. We use this to spawn the gun from the character.

Spawning Actors At Runtime
06:37

In this video (objectives)…

  1. Sam shows us how to attach components to skeletal mesh sockets. We also learn to hide parts of a skeletal mesh.

Attaching To Meshes Via Sockets
10:20

In this video (objectives)…

  1. Sam sets up a PullTrigger function on the Gun actor. We bind the mouse button such that this function get's called.

Shooting Architecture
06:14

In this video (objectives)…

  1. Sam reviews how to spawn particle effect from C++ attached to a component.

Spawning Particle Effects
08:14

In this video (objectives)…

  1. Sam shows us how to see things from the players point of view. We will get the players view point from the controller and display it with a debug helper.

Player View Point
10:52

In this video (objectives)…

  1. Sam shows us how to use LineTraceSingleByChannel. We use this to shoot debug points at the walls!

Line Tracing By Channel
12:28

In this video (objectives)…

  1. Sam guides us through adding an impact effect for the rifle.

Impact Effects
04:37

In this video (objectives)…

  1. Sam takes us through the Actor's TakeDamage function. We also see the difference between Point damage and Radial damage.

Dealing Damage To Actors
08:04

In this video (objectives)…

  1. Sam shows us how virtual methods work and why they aren't the default in C++.

Virtual Methods In C++
10:15

In this video (objectives)…

  1. We see how to use virtual methods to override TakeDamage and track the Health of our Character.

Overriding TakeDamage
09:06

In this video (objectives)…

  1. Sam Introduces the Blend Poses By Bool node. We use it to play a death animation.

Blending Animations By Booleans
04:42

In this video (objectives)…

  1. Sam shows us how to expose a pure node from C++ to blueprint. We use this to update the death state in the Animation Blueprint

Blueprint Pure Nodes
06:28

In this video (objectives)…

  1. We revise how to create an AIController with a Blueprint child.

Create and Setup an AI controller
03:59

In this video (objectives)…

  1. Sam shows us the SetFocus function that we use in combination with UGameplayStatics::GetPlayerPawn to aim the enemy at the player.

AI Aiming
06:13

In this video (objectives)…

  1. Sam shows us what a Nav Mesh is and how to generate it. We use the Nav Mesh to make our AI move towards us.

Nav Mesh And AI Movement
10:48

In this video (objectives)…

  1. Sam shows us how to check line of sight from an enemy. We use this to allow the player to hide.

Checking AI Line Of Sight
07:39

In this video (objectives)…

  1. Sam shows us what the BehaviorTree and Blackboard assets are. We set them up to run from our AIController.

BehaviorTrees And Blackboards
08:06

In this video (objectives)…

  1. Sam show us how to set a blackboard value from C++

Setting Blackboard Keys In C++
05:54

In this video (objectives)…

  1. Sam shows us how to create basic Behavior Trees with Task and Sequences. We make the enemy patrol to the player and back.

Behavior Tree Tasks And Sequences
08:24

In this video (objectives)…

  1. Sam shows us how to make choices in Behavior Trees. He introduces us to the Selector Node and Decorators in order to achieve this.

BT Decorators And Selectors
12:12

In this video (objectives)…

  1. Sam shows us how to create a BTTask in C++ and how to add a pretty name.

Custom BTTasks In C++
07:53

In this video (objectives)…

  1. Sam show us how to execute code from a BTTask in C++.

Executing BTTasks
10:31

In this video (objectives)…

  1. Sam shows us how to create a Shoot node for Behaviour Tree. This teaches us how to access the Pawn from a BTTask.

BTTasks That Use The Pawn
10:48

In this video (objectives)…

  1. Sam show us how to use BTServices and how to create them in C++

BTServices In C++
15:05

In this video (objectives)…

  1. Sam shows us how to to not shoot ourselves in the foot by ignoring actors in a line trace. He also shows us how to clear up control of a pawn when it dies and to disable collision.

Ignoring Actors In Line Traces
06:04

In this video (objectives)…

  1. Sam shows us how to architect our game end logic using a Player Controller and Game Mode.

Ending The Game
10:16

In this video (objectives)…

  1. Sam shows us how to call the PlayerController::GameHasEnded method. We use this to restart the level on a timer.

Setting Timers In C++
10:35

In this video (objectives)…

  1. Sam shows how to spawn a UMG widget from C++. We use this to display a lose screen.

Displaying A Lose Screen
11:19

In this video (objectives)…

  1. Sam shows us how to iterate over all actors in a level. We use this to call GameHasEnded on all controllers.

Iterating Over Actors
10:25

In this video (objectives)…

  1. Sam shows us how to count the living AI in the scene. We use this to display a win screen when all the AI is killed.

Calculating The Win Condition
12:20

In this video (objectives)…

  1. Sam takes us through a quick method extraction refactor for the PullTrigger method.

Refactoring PullTrigger
07:53

In this video (objectives)…

  1. Sam shows us how to play a sound effect attached to a component. We setup sound effects for the player shooting.

Weapon Sound Effects
06:35

In this video (objectives)…

  1. Sam shows us how to create SoundCue assets. We see how to randomize SoundWaves and to further add random modulation.

Randomized Sound Cues
08:35

In this video (objectives)…

  1. Sam shows us how to add attenuation settings to our SoundCues. This allows our sounds to have a sense of 3D space.

Sound Spatialization
06:45

In this video (objectives)…

  1. Sam shows us how to add a HUD and remove it when displaying a win/lose screen.

Crosshairs and HUDs
07:24

In this video (objectives)…

  1. Sam shows us how to use the progress bar component to make a health bar.

Health Bars
07:50

In this video (objectives)…

  1. Sam shows us around a new asset, the AimOffset. We see how to use it additively on top of our existing animations.

AimOffsets
12:04

In this video (objectives)…

  1. Sam shows us how an Animation State Machine works. We use this to add a jumping animation and state.

Animation State Machines
10:07

In this video (objectives)…

  1. Sam shows us how to add automatic transition to state machines to create a sequence of states. We then nest one state machine within another.

Complex State Machines
13:00

In this video (objectives)…

  1. Sam shows us how to add ambient sound to a level. We then see how we could go on to expand on the project ourselves.

Wrap-up And Challenges
08:49
+ Updates and Important Messages
1 lecture 00:32
Coupon For Original Course Content
00:32
+ Battle Tank - A Fun Tank Battle with Mortars (Original Version)
122 lectures 22:13:09
WARNING: Content Soon To Move
00:07
  • Battle Tank is an open world tank fight
  • This will be a head to head battle
  • Other player can be human or simple AI
  • Heavy focus on control systems
  • Also learning terrains, UI, terrain sculpting & more
  • Dive right in and enjoy yourself!

(Unique Video Reference: 1_BT_URC)

Intro, Notes & Section 4 Assets
01:05
  • An overview of the finished Battle Tank project.

(Unique Video Reference: 1b_BT_URC)

Battle Tank Overview
03:42
  • The Concept, Rules and (initial) requirements
  • We’ll iterate around a loop while making this game
  • Constantly asking “what’s least fun”
  • Remember we’re not AAA studios
  • Let’s find the essence of fun of this game.

(Unique Video Reference: 2_BT_URC)

S04 Game Design Document (GDD)
06:09
  • Creating an online repository for your project
  • GitHub provides public hosting for free
  • We will use their default UnrealEngine .gitignore
  • We’ll then “clone” this repository to our machine
  • How to use a readme.md with markdown*

(Unique Video Reference: 3_BT_URC)

Setting Up a GitHub “Repo”
10:40
  • Creating an Unreal project in an existing “repo”
  • What’s good about Landscapes in Unreal Engine
  • How to add a Landscape in Unreal
  • How to delete a Landscape in Unreal.

(Unique Video Reference: 4_BT_URC)

Creating & Deleting Landscapes
10:03
  • You can change position & rotation later
  • Scale will impact terrain size, so set on creation
  • How to choose your “Section Size”
  • The effect of the “Number of Components”
  • Creating a landscape of a specific scale.

(Unique Video Reference: 5_BT_URC)

Landscape Setup & Scaling
12:15
  • Sculpt: hills, valleys & flat areas
  • Smooth, flatten & ramp: create useful features
  • Erosion & noise: make it more organic
  • Paint: use layered materials
  • Details: add details (foliage, trees, etc)

(Unique Video Reference: 6_BT_URC)

A Landscaping Process
10:16
  • Epic games launcher helps manage versions
  • Remember to commit your project first
  • You can then “Convert in-place”
  • Check your project runs OK in new version
  • Close everything and re-commit
  • How to tag a commit in GitHub.

(Unique Video Reference: 7_BT_URC)

Upgrading Engine Version
05:48
  • Create a material for your landscape
  • Set Usage > Used with Landscape
  • LandscapeLayerBlend node & Vector Parameters
  • Add at at least two layers & create LayerInfo
  • Paint the landscape from the Modes tab
  • Screenshot and share with us

(Unique Video Reference: 8_BT_URC)

Using Landscape Layers
12:11
  • Unreal’s tools are setup for photoreal landscapes
  • Once you set the bar high, the rest must match
  • An alternative is to opt for a low-poly look...
  • ...then you can focus on gameplay, story, sound
  • Can be a good choice for smaller teams
  • How to make low-poly, flat-shaded landscapes.

(Unique Video Reference: 9_BT_URC)

Flat Shading Low Poly Landscapes
12:38
  • How to make flat shading optional
  • Importing and exporting landscape heightmaps
  • Reducing the resolution of a landscape
  • Using a texture in a landscape material.

(Unique Video Reference: 10_BT_URC)

More Landscaping Tools
12:10
Mid Section Quiz
9 questions
  • Support keyboard, mouse & gamepad controller
  • Mapping player intentions to control inputs
  • Mapping control inputs to actor actuators
  • Introducing the concept of “fly by wire”.

(Unique Video Reference: 11_BT_URC)

Tank Control System
07:32
  • Import the tank in 4 static mesh parts
  • Assemble the parts using sockets
  • Create our Tank_BP and test.

(Unique Video Reference: 12_BT_URC)

Actors from Multiple Meshes
13:42
Improved Models
00:09
  • Add mass to the tank
  • Fine-tune track position
  • Replace root component in Tank_BP
  • Enable physics and assign a mass
  • Set the tank as the Default Pawn
  • Setup PlayerStart and debug start collisions.

(Unique Video Reference: 13_BT_URC)

Configuring a Tank
09:13
  • Horizontal Coordinate System
  • Setup a Camera Spring Arm
  • Why the Spring Arm alone isn’t enough
  • How rotations don’t “commute”
  • Binding mouse and gamepad to camera control.

(Unique Video Reference: 14_BT_URC)

3rd Person Camera Control
14:16
  • Use a Scene Root as azimuth gimbal
  • Use the Spring Arm for elevation control
  • Adjust the Spring Arm length
  • Set the camera rotation to 0 (down the arm)
  • Decide if you want the camera to roll or not.

(Unique Video Reference: 15_BT_URC)

Fixing 3rd Person Camera Rotation
08:06
  • Create a Widget Blueprint for the aim point
  • Decide the Player Controller with create the UI
  • Create widget and add to viewport in Blueprint
  • Override the Player Controller in the game mode.

(Unique Video Reference: 16_BT_URC)

User Interface (UI) in Unreal
09:18
  • Create a dedicated Scene for the Main Menu
  • Use the Level Blueprint to configure UI
  • Add a background image to get started.

(Unique Video Reference: 17_BT_URC)

Main Menu Screens
09:02
  • Show mouse cursor in Unreal UI
  • Use a Scale Box for background image scaling
  • Add a Start button
  • Customise fonts inside our UI Widget
  • Set anchors so UI scales to different aspect ratios.

(Unique Video Reference: 18_BT_URC)

UI Scale Box, Buttons & Mouse
11:13
  • Bind Start button event to Blueprint
  • Create custom WidgetReady event
  • Make Start menu button focused on play
  • Ensure we can quit from the game
  • Aim towards Steam “Full Controller Support”.

(Unique Video Reference: 19_BT_URC)

Controller Ready Navigation
08:25

Based on where you are in the course, we're going to assume you’re already familiar with the Blueprint tools for UMG (Unreal's UI framework). These are definitely the best way to go about designing your interfaces. Who wants to be doing that in C++!

But there are good reasons to be using C++ for the logic driving your UI: version-ability, performance or just preference. How can we seamlessly bind our clean, performant C++ to the beautiful UI design created by the editor? 

This post outlines the tips and tricks Sam has learnt, including...

  • Basic setup
  • Creating a Blueprint Widget from C++
  • Widget Setup
  • Getting to your Blueprint widgets
  • Binding callbacks
  • More cool UI stuff…

Read the full post: https://blog.gamedev.tv/creating-unreal-engine-ui-with-umg-and-c/

Enjoy!

Ben & Sam

Creating Unreal Engine UI with UMG and C++
00:29
  • Creating a stand-alone game
  • Setting the first level that loads
  • Making sure the input mode works
  • Setting-up for “Full Controller Support”.

(Unique Video Reference: 20_BT_URC)

Trial Packaging Your Game
07:08
Mid Section Quiz
9 questions
  • How delegation can hide information
  • Creating a custom Player Controller class
  • Re-parenting Blueprint classes onto our C++

(Unique Video Reference: 21_BT_URC)

Delegating to Components
11:20
  • A virtual method can be overridden by children
  • The override keyword is a sanity check
  • Use Super:: to include parents’ functionality
  • Use this to add BeginPlay() to PlayerController.

(Unique Video Reference: 22_BT_URC)

Using virtual and override
14:04
  • What is polymorphism?
  • How to overload functions.
  • Using run-time polymorphism.

(Unique Video Reference: 22b_BT_URC)

Overloading and Polymorphism
14:27
  • How methods are called.
  • Why we need the virtual method.
  • How Vtables implement this.
  • See how the assembly changes.

(Unique Video Reference: 22c_BT_URC)

Virtual Functions and Vtables
11:20
  • How to create a AIController based C++ class
  • Assigning an AI Controller to a Pawn
  • Verifying which pawns are possessed
  • Logging possession to the console.

(Unique Video Reference: 23_BT_URC)

Creating an AI Controller Class
10:56
  • Getting the AI to find the player position
  • We won’t implement line-of-sight for simplicity
  • UGameplayStatics::GetPlayerController()
  • Or GetWorld()->GetFirstPlayerController()

(Unique Video Reference: 24_BT_URC)

Get the Player Controller with C++
09:35
  • Revise adding engine methods into new classes
  • Pseudocode our initial aiming logic
  • Learn about Visual Assist for Visual Studio.

(Unique Video Reference: 25_BT_URC)

Add Tick() to PlayerController
11:50
  • Out parameters smell a little but are used a lot
  • Allows you to return a bool and a FVector
  • Alternative architecture would be a struct or class
  • We’ll do it this way to get you more comfortable with creating your own methods using out parameters.

(Unique Video Reference: 26_BT_URC)

Creating an Out Parameter Method
12:09
  • Use FVector2D() to store pixel coordinates
  • This is two floats, pixels can be non-integer
  • Revising UPROPERTY(EditAnywhere) and more.

(Unique Video Reference: 27_BT_URC)

Finding Screen Pixel Coordinates
13:48
  • How to find the camera look direction
  • What the WorldLocation parameter does
  • WorldDirection returned is a unit vector.

(Unique Video Reference: 28_BT_URC)

Using DeprojectScreenToWorld
12:49
  • We want world position of anything visible
  • GetWorld()->LineTraceSingleByChannel()
  • Use the ECC_Visibility channel for what’s seen
  • Remember HitResult is a rich object
  • Use HitResult.Location for Location member.

(Unique Video Reference: 29_BT_URC)

Using LineTraceSingleByChannel()
15:24
  • AI and Player possessed tanks aim the same way
  • Later the tank will delegate aiming
  • But the AI/Player controllers don’t care
  • This provides nice abstraction
  • We also hide implementation details
  • … and make the game more fair.

(Unique Video Reference: 30_BT_URC)

Unify Player & AI Aiming
10:36
Mid Section Quiz
10 questions
  • You can add required components in C++
  • Our Tank Aiming Component is a good candidate
  • We will delegate all AimAt() requests…
  • … regardless of their source (AI or player).

(Unique Video Reference: 31_BT_URC)

Create Default Sub Objects in C++
12:07
  • Why StaticMeshComponet is prefixed with U
  • Creating a setter for the barrel reference
  • How to name parameters in setters
  • Using BlueprintCallable() to call C++ from BP
  • Finding the start position of or projectile.

(Unique Video Reference: 32_BT_URC)

BlueprintCallable()
13:04
  • How speed and velocity relate
  • The high and low projectile arc
  • Setting a launch speed on the tank
  • Introducing SuggestProjectileVelocity()

(Unique Video Reference: 33_BT_URC)

SuggestProjectileVelocity()
11:53
  • Use SuggestProjectileVelocity() in Unreal
  • Work out where a projectile will land.

(Unique Video Reference: 34_BT_URC)

Predict Projectile Landing Point
12:36
  • A FRotaor is a struct
  • It contains Roll, Pitch and Yaw as floats
  • Convert using .Rotation() method
  • Report aim direction as a rotator
  • Log result to the console in Unreal.

(Unique Video Reference: 35_BT_URC)

Using FRotators in Unreal
10:58
  • More about the Unreal Header Tool (UHT)
  • Pre-processing happens first, e.g. on macros
  • Then compilation produces .obj files
  • These .obj files are linked by the linker
  • How to #include strategically.

(Unique Video Reference: 35b_BT_URC)

The C++ Compilation Process
07:26
  • If we #include in a .h file we create a “chain”
  • Any .h file that includes us will in-turn include
  • This can be hard to keep track of
  • To simply use a type, we can “forward declare”
  • Simply put class ClassName; under the includes
  • You’ll still need to #include in the .cpp to use.

(Unique Video Reference: 36_BT_URC)

Using Forward Declarations
12:37
  • In actor blueprints you have custom components
  • Static mesh components don’t appear by default
  • Use BlueprintSpawnableComponent annotation
  • Using hidecategories = ("CategoryName")

(Unique Video Reference: 37_BT_URC)

BlueprintSpawnableComponent()
10:56
  • How to disable or enable tick on various classes

  • GetWorld()->GetTimeSeconds() for logging

  • Documenting your execution flow for clarity

  • Change parameter names for clarity.

(Unique Video Reference: 40_BT_URC)

Review Our Execution Flow
13:35
  • If something’s weird break it down
  • Use logs or the debugger to follow each step
  • SuggestProjectileVelocity() has a bug*
  • … it MUST have an optional parameter!?
  • Moving to forward declarations.

Useful Links

  • * UE4 Answer Hub - SuggestProjectileVelocity() Behaving Badly

(Unique Video Reference: 41_BT_URC)

How to Report Bugs
12:18
Mid Section Quiz
10 questions
  • FMath::Clamp\(Input, Min, Max);

  • Very useful for restricting value ranges

  • Clamp our Barrel’s elevation

  • Wire it to the aiming component

  • Test barrel elevation works.

(Unique Video Reference: 42_BT_URC)

Using Clamp() to Limit Values
14:18

This mid-section challenge will help you integrate your knowledge and really cement what you’ve done in the past few lectures. It will also give you a great foundation of practical understanding on which to build. Please give it a good shot before watching my solution.

(Unique Video Reference: 43_BT_URC)

CHALLENGE - Turret Rotation
12:44

This is the 2nd part of the solution to this section’s longer challenge. We’ll be finishing off the turret rotation, giving us complete barrel aiming control by the end :-)

(Unique Video Reference: 44_BT_URC)

CHALLENGE - Turret Rotation Pt.2
11:32
  • Create a public Fire() method on our tank
  • Bind input via Blueprint
  • Call this new C++ method to test
  • Create a Projectile class, and Blueprint it.

(Unique Video Reference: 45_BT_URC)

Setting Up Projectiles
10:34
  • Multiple versions of the engine take up GB
  • Upgrade Building Escape and Battle Tank
  • Learn more about using source control
  • Using Stash in source control
  • Fixing issue with overlapping collision volumes.

(Unique Video Reference: 46_BT_URC)

Upgrading to Unreal 4.12
11:04
A Note About The Movement Bug
00:13
  • About AutoWeld compound objects
  • Working through self-collision issues
  • Disabling gravity on subobjects
  • A reminder Unreal is designed for humanoids.

(Unique Video Reference: 47_BT_URC)

Working Round Awkward Bugs
13:56
  • Using TSubclassOf\
  • More about forward declarations
  • How to use GetWorld()->SpawnActor()
  • How to spawn projectiles from a weapon.

(Unique Video Reference: 48_BT_URC)

Using SpawnActor<>() to Spawn
11:36
  • Recap use of CreateDefaultSubobject()
  • Use a ProjectileMovementComponent
  • Get our tank delegating launch to projectile.

(Unique Video Reference: 49_BT_URC)

Projectile Movement Components
11:10
  • Inline some code for readability
  • Inlining can also be called “defactoring”
  • Less lines of code is often better*
    • everything else being equal
  • FPlatformTime::Seconds() is an accurate timer
  • Make AI tanks fire on every frame.

(Unique Video Reference: 50_BT_URC)

Making AI Tanks Fire
09:45
  • EditAnywhere allows all instances to be edited
  • For example each AI tank could be different
  • EditDefaultsOnly allows “architype” editing
  • In other words, all tanks must be the same
  • Think which you want in future.

(Unique Video Reference: 51_BT_URC)

EditAnywhere vs EditDefaultsOnly
08:37
Mid Section Quiz
10 questions
  • Using primitive colliders in Unreal
  • Adding a quit button to our main menu.

(Unique Video Reference: 52_BT_URC)

Adding a Quit Button
11:05
  • Base Tank Tracks on UStaticMeshComponent
  • Create a BlueprintCallable throttle method
  • Bind input to track throttles
  • Discuss what Input Axis Scale does.

(Unique Video Reference: 53_BT_URC)

Setup Track Throttles
12:31
  • GetComponentLocation() does what it says!
  • Find root: GetOwner()->GetRootComponent());
  • Cast to UPrimitiveComponent so you can…
  • AddForceAtLocation();
  • Estimate sensible defaults for driving forces.

(Unique Video Reference: 54_BT_URC)

ApplyForceAtLocation() in Action
12:03
  • You can assign a physics material under collision
  • Friction is combined between two surfaces
  • The coefficient is the proportion of the contact force that can be exerted sideways before slip.
  • Adjust friction and driving forces to get movement.

(Unique Video Reference: 55_BT_URC)

Physics Materials & Friction
14:16
  • Fly-by-wire means translating control intention
  • How control intention maps to track throttles
  • Creating a TankMovementComponent C++ class
  • Why inherit from UNavMovementComponent

(Unique Video Reference: 56_BT_URC)

Fly-by-Wire Control System
08:50
  • Bind some input for forward and backward
  • Make the method BlueprintCallable
  • Make TankMovementComponent a default on tank
  • Make a protected tank variable to store pointer
  • Make this pointer BlueprintReadOnly pointer
  • Test that you get a log of +/-1.

(Unique Video Reference: 57_BT_URC)

Using BlueprintReadOnly
12:46
  • Actor components require instance references
  • We were passing these references from the tank
  • But we could equally keep them locally
  • Move to composing our actor in Blueprint
  • Create an initialise method for aiming
  • Test it works and hail the simpler code.

(Unique Video Reference: 58_BT_URC)

A Better Component Architecture
12:04
  • Add IntendTurnRight() method
  • Bind firing input to the “A button”
  • Test we can move manually with fly-by-wire.

(Unique Video Reference: 59_BT_URC)

Completing Manual Tank Movement
11:09
  • Pathfinding is finding the shortest possible path
  • This requires some (artificial) intelligence
  • All pathfinding must happen on a navmesh
  • Adding Nav Mesh Bounds to the level
  • An overview of how MoveToActor() and RequestDirectMove() work.

(Unique Video Reference: 60_BT_URC)

Introducing AI Pathfinding
12:03
  • We have access to Unreal’s source code
  • Let’s look into the UNavMovementComponent.h
  • We’re looking for RequestDirectMove()
  • We’ll override it without calling Super
  • We can then get the golden MoveVelocity vector
  • AI tanks can now use our fly-by-wire controls!

(Unique Video Reference: 61_BT_URC)

Dissecting RequestDirectMove()
12:29
Mid Section Quiz
10 questions
  • Focusing on controlling forward speed of AI
  • If target in front, move forward full speed
  • If target to side, don’t move forward
  • Vary smoothly in-between
  • This sounds like a cosine function to me!
  • Using FVector::DotProduct()

(Unique Video Reference: 62_BT_URC)

DotProduct() Vector Operator
12:30
  • Focusing on controlling turning of AI
  • If target in front or behind* don’t rotate
  • If target to side rotate at full speed
  • This is the behaviour of a sin function
  • Using FVector::CrossProduct()

(Unique Video Reference: 63_BT_URC)

CrossProduct() Vector Operator
13:42
  • Private, protected or public? Use the safest
  • UPROPERY / UFUNCTION needed? Use “”
  • #include and forward declarations required?

(Unique Video Reference: 64_BT_URC)

Finalising Your Class Code
09:28
  • Remember “what’s the least fun thing about this?”
  • One thing is not knowing if you can fire
  • How to change crosshair colour in blueprint…
  • … according to the aiming component state
  • States: Locked, Aiming, Reloading
  • Referencing actor component from player UI.

(Unique Video Reference: 65_BT_URC)

How to Use Blueprint Variables
10:10
  • We met enum class around lecture 35
  • In Unreal we must annotate with UENUM()
  • We must specify the storage type (uint8)
  • See Unreal’s coding standards in Resources
  • Remember we use enums to encode meaning.

(Unique Video Reference: 66_BT_URC)

Using Enum(erations) in UE4
12:06
  • Move away from CreateDefaultSubObject()
  • Make aiming a BlueprintSpawanableComponent
  • Get our code re-compiling as soon as possible
  • Experience hard crash and add pointer protection
  • Possibly get exasperated that we can’t find the suspected null-pointer causing the crash.

(Unique Video Reference: 67_BT_URC)

Refactoring our Aiming Component
14:52
  • Hard crashes can be difficult to diagnose
  • Attach your IDE’s debugger to the Unreal editor
  • Use it to discover the source (often null pointer)
  • We can also probe using Print in blueprint.

(Unique Video Reference: 68_BT_URC)

Attaching a Debugger to Unreal
07:22
  • Adding log entries to C++ and BP helps you to uncover the timing over events in the engine
  • We’re doing this to discover exactly when Construct and Begin Play gets called in both C++ and Blueprint
  • Note dropped actors are constructed in editor.

(Unique Video Reference: 69_BT_URC)

Constructor & Begin Play Timing
11:58
  • We don’t have a Aiming Component reference
  • It is hard to find a sensible time to set it
  • Also we don’t need the reference on the tank
  • We can Get Components by Class in Blueprint
  • Mock-up our C++ code in Blueprint.

(Unique Video Reference: 70_BT_URC)

Decoupling Your Architecture
09:01
  • We want to expose a C++ function to Blueprint
  • We also want to pass a parameter (aiming ref.)
  • Multicast delegates only work like this for actors
  • We’re using a component so we use…
  • UFUNCTION(BlueprintImplementableEvent)
  • You don’t need to define the function!

(Unique Video Reference: 71_BT_URC)

BlueprintImplementableEvent
11:57
Mid Section Quiz
10 questions

(Unique Video Reference: 72_BT_URC)

Using the ensure Assertion
09:32
  • Code architecture can be hard to see
  • Dependency mapping shakes-out the structure
  • Go through your .cpp files and look at includes
  • Map these as dependencies on a diagram
  • If it looks like spaghetti, you need to refactor!

(Unique Video Reference: 73_BT_URC)

Dependency Mapping
09:53
  • Congratulations on getting this far
  • We’re not teaching sterile solutions here
  • We’re showing you how to recognise real issues
  • … and how to tackle them sensibly
  • It’s not the easy path, but it is the valuable one.

(Unique Video Reference: 74_BT_URC)

Talking Head - Real World Skills
02:29
  • You should probably only refactor working code
  • Red means your code’s not working
  • Green means it is, even if the code is messy
  • We commit at green, then start refactoring.

(Unique Video Reference: 75_BT_URC)

Starting From Green
11:10
  • There is no need to cast the Pawn to a Tank
  • Doing so creates a dependency we don’t want
  • Remember a Tank is a Pawn
  • We simplify our architecture here.

(Unique Video Reference: 76_BT_URC)

Aiming Without the Tank
13:57
  • Removing our final dependencies
  • If you override BeginPlay() in an actor you should call Super::BeginPlay()
  • If you don’t override it at all, there’s no need to, your Blueprint Begin Play will still run.

(Unique Video Reference: 77_BT_URC)

Finishing our Refactoring
14:04
  • Actor Components use TickComponent not Tick
  • You can find the signature in docs online
  • Or by copying from the engine code
  • Remember to use override at to check
  • Remember to set the boolean in the constructor
  • GetWorld()->GetTimeSeconds() alternative.

(Unique Video Reference: 78_BT_URC)

Adding TickComponent() Back
13:06
  • FVectors are just structs containing float
  • You must “define equal” when comparing floats
  • The FVector::Equals() method allows this
  • Specify a tolerance, see docs in resources.

(Unique Video Reference: 79_BT_URC)

Are Two Floats Equal?
11:39
  • We can apply a sideways correction force
  • Remember Force = Mass * Acceleration
  • … and Acceleration = Speed / Time
  • So we calculate the force using the slippage speed,the frame time, and the tank mass
  • A way to calculate is FVector::DotProduct()

(Unique Video Reference: 80_BT_URC)

Programmatic Sideways Friction
15:18
  • We could use OnComponentHit in Blueprint
  • But we’re grown-ups so we’re going to use C++
  • Signature of OnHit(...) has changed in 4.12
  • Remember you need to make it a UFUNCTION
  • Details on next slide.

(Unique Video Reference: 81_BT_URC)

OnComponentHit Event in 4.12
08:55
  • Boolean flags usually make answers old
  • Try and think of a way of avoiding them
  • Revise the use of FMath::Clamp()

(Unique Video Reference: 82_BT_URC)

Avoiding Boolean Flags
13:18
Mid Section Quiz
10 questions
  • Use a literal glass ceiling to help with testing!
  • Sometimes the barrel takes the long route
  • A simple if() statement can help here
  • Find and fix another bug in the code
  • You can use %i formatter to log booleans.

(Unique Video Reference: 83_BT_URC)

Improving Tank Aiming
11:23
  • Expose the Acceptance Radius to blueprint
  • Tweak that value as EditAnywhere
  • Change back to EditDefaultsOnly once found
  • Prevent AI tanks firing until aiming is locked.

(Unique Video Reference: 84_BT_URC)

Tweaking Tank AI
12:14
  • Add a 4th enum state for out of ammo
  • Work around bug of blueprint select nodes not updating when we add new enum values in C++
  • Add a display for rounds remaining
  • Bind the UI to a GetRounds() method.

(Unique Video Reference: 85_BT_URC)

Making an Ammo Display
14:23
  • The tank components were built for the tank
  • It turns-out we can re-use movement and aiming
  • This is the benefit of re-usable components
  • We’ll create a self-aiming mortar tower.

(Unique Video Reference: 86_BT_URC)

Making an AutoMortar
14:10
Improved Mortar Models
00:09
  • Currently we .gitignore the Starter Content
  • Therefore we can’t track changes
  • We want a consistent starting point for particles
  • So we’re going to delete Starter Content
  • Lots depends on it so we use a special tool
  • That special tool is the reference viewer.

(Unique Video Reference: 87_BT_URC)

Using the Reference Viewer
14:10
  • We will compose our projectile in C++
  • Use SetRootComponent()
  • Use AttachTo(RootComponent)
  • You can set default properties in C++
  • Use UPROPERTY(VisibleAnywhere)

(Unique Video Reference: 88_BT_URC)

Preparing for Particles
13:22
  • Setup a Starter Content project
  • Use it to migrate assets to Battle Tank
  • Explore particle systems
  • Use world space for smoke trails
  • Create and share your smoke trail.

(Unique Video Reference: 89_BT_URC)

Introducing Particle Systems
15:54
  • Our smoke disappeared when viewed from side
  • This is due to the fixed particle bounding boxes
  • We can fix it by making the boxes dynamic
  • BUT we need to remove GPU rendered particles
  • … and test the performance hit is acceptable.

(Unique Video Reference: 90_BT_URC)

Particle Bounding Boxes
06:37
  • Use Message Log to see warnings
  • AttachTo() has become AttachToComponent()
  • Now must provide FAttachmentTransformRules
  • We’ll use KeepRelativeTransform for now
  • Write code to de-active launch blast and
  • Activate impact blast on impact.

(Unique Video Reference: 91_BT_URC)

Using FAttachmentTransformRules
16:26
Mid Section Quiz
10 questions
  • If you don’t AttachToComponent() then…
  • It will look like you’re attached but…
  • The transform may be broken and…
  • You’ll get really weird effects and…
  • Unreal may cache the issue...
  • So, always AttachToComponent() :-)

(Unique Video Reference: 92_BT_URC)

Radial Forces & Caching
14:20
  • Currently we don’t destroy our projectiles
  • This will cause slow-down and memory leakage
  • You won’t pass console testing with a leak
  • Tidy up after ourselves
  • Discuss projectile schemes
  • Destroy our projectiles with a timer.

(Unique Video Reference: 93_BT_URC)

Using GetTimerManager()
10:15
  • Unreal has an actor damage system
  • We’ll apply radial damage from the projectile
  • Then the AActor::TakeDamage() method will be called on the tank (and all other actors in radius)
  • We’ll then finish our damage system off
  • Solve the int or float damage question.

(Unique Video Reference: 94_BT_URC)

Using TakeDamage() on Actors
15:47
  • Add a UI Widget component to our tank
  • Make a very simple health progress bar
  • Wire the bar to the tank.

(Unique Video Reference: 95_BT_URC)

BlueprintPure & Health Bars
14:09

(Unique Video Reference: 96_BT_URC)

The Observer Pattern
14:19
  • We’re nearing the end of the section
  • You have several challenges over to try
  • These include various fixes and improvements...
  • Use StartSpectatingOnly() in Player Controller
  • DetachFromControllerPendingDestroy() in AI
  • Fixing a bug with our starting health

(Unique Video Reference: 97_BT_URC)

Finishing Off - Part 1
14:35
  • You can use the noise function on landscapes
  • Gameobjects are automatically destroyed when they travel a long way from the play area
  • Reviewing Unreal’s coding standards.

(Unique Video Reference: 98_BT_URC)

Finishing Off - Part 2
15:47

In this section we covered... + Basic terrain landscaping + Using and modifying the AI pathfinding system + A deep-dive into control systems + User Interface for the first time + A whole tonne of C++ and architecture.

(Unique Video Reference: 99_BT_URC)

Section 4 Wrap-Up
03:14
  • Our player controller line traces to aim
  • This can hit the UI in some circumstances
  • Change our line trace channel to ECC::Camera
  • Add a 1st person camera
  • Use the Toggle Visibility Blueprint node
  • Bind input and enjoy simple camera swapping.

(Unique Video Reference: 100_BT_URC)

Bonus - Switching Cameras
06:35
Mid Section Quiz
7 questions
  • Why the suspension is broken.
  • How we will fix it with a suspension.
  • Overview of how suspension works.

(Unique Video Reference: 100b_BT_URC)

Fixing The Tank Suspension
02:21

In this video (objectives)…

  1. Update the project.
  2. Fix any build errors.
  3. Fix any bad log messages.

After watching (learning outcomes)…

Can upgrade your own projects to 4.19.

(Unique Video Reference: 101_BT_URC)

Upgrade to 4.19 And Bug Fixes
13:07

In this video (objectives)…

  1. Discuss why the tank pops.
  2. Identify why real world vehicles don't.
  3. Create a physics model for our tank.

After watching (learning outcomes)…

Explain how to model a vehicle in a physics engine.

(Unique Video Reference: 102_BT_URC)

Real-world Vehicle Physics
08:51

In this video (objectives)…

  1. Introduce the physics constraint component.
  2. Combine two components with a constraint.
  3. Tweak the limits of a constraint.

After watching (learning outcomes)…

Create a physics constraint between two components and set limits.

(Unique Video Reference: 103_BT_URC)

Creating Physics Constraints
15:46

In this video (objectives)…

  1. Explain position drive.
  2. Introduce the theory of springs.
  3. Explain velocity drive.
  4. Making a suspension.

After watching (learning outcomes)…

Create a spring using the UPhysicsConstraintComponent and linear drives.

(Unique Video Reference: 104_BT_URC)

Making Springs
15:32

In this video (objectives)…

  1. Create a base class.
  2. Create all components.
  3. Configure the blueprint.

After watching (learning outcomes)…

Create Blueprint children of C++ classes derived from AActor.

(Unique Video Reference: 105_BT_URC)

Converting The Spring To C++
11:55

In this video (objectives)…

  1. Attachment with actors and components.
  2. Using GetAttachParentActor.
  3. Creating a spawning component.

After watching (learning outcomes)…

Understand component versus actor childing.

(Unique Video Reference: 106_BT_URC)

Attachment, Actors and Components
13:31

In this video (objectives)…

  1. Spawning and BeginPlay.

  2. Using SpawnActorDeferred.

After watching (learning outcomes)…

Able to spawn actors using SpawnActorDeferred and know when it's needed.

SpawnActorDeferred and BeginPlay
07:14

In this video (objectives)…

  1. Remove the mass.

  2. Introducing SetConstrainedComponents

  3. Set constraint to the tank root.

  4. Add more wheels.

  5. Tweak the spring parameters.

After watching (learning outcomes)…

Setup constraints between actors in C++.

Attaching Constraints In C++
13:09

In this video (objectives)…

  1. Chaining constraints together.

  2. Setup the new Axle and its contraint.

  3. Why we need a collider to simulate physics.

  4. Using USphereComponents.

  5. Disabling collisions on the Axle.

  6. Constraining the wheel rotation.

After watching (learning outcomes)…

How to chain constraints together.

Chaining Physics Constraints
15:42

In this video (objectives)…

  1. Exposing AddDrivingForce().

  2. The requirements for GetWheels().

  3. Update DriveTrack() to apply for all wheels.

  4. Remove OnHit() and ApplySidewaysForce().

  5. How to iterate over child components.

After watching (learning outcomes)…

Iterate over child components.

Applying Wheel Driving Force
11:29

Continued...

  1. Add getter to the SpawnPoint.

  2. Implementing GetWheels().

Solution: Implement GetWheels()
10:26

In this video (objectives)…

  1. Detecting no collision.

  2. Understanding Tick Groups and their order.

  3. When does OnHit get called?

  4. Apply force on collision or reset.

After watching (learning outcomes)…

An understanding of the Tick Group Order and how it interacts with physics notifications.

Tick Groups And Physics
18:20

In this video (objectives)…

  1. Making a testing level.

  2. Changing linear damping.

  3. Tweak linear damping.

  4. Tweak angular damping.

  5. Add more wheels.

After watching (learning outcomes)…

Understand how damping affects the tank.

Tweaking Linear & Angular Damping
11:56

How to workaround the "ConvexElem Invalid" errors.

BONUS: Fixing Collider Issues
03:21
End Of Section Quiz
5 questions
+ Continuing Your GameDev Journey
2 lectures 01:03
Coupon For Original Course Content
00:32

Congratulations on completing the course, that's no mean feat! So what now?

+ If you're looking to continue to your Unreal journey then check out our Unreal Multiplayer Mastery course.

+ If you’d like to learn C#, another C family language, then head over to our Complete Unity Developer 2.0 course.

+ If you're looking to create assets for your games, then our Blender course is for you.

Look forward to seeing you there soon.

Preview 00:30
Requirements
  • 64-bit PC capable of running Unreal 4 (recommended).
  • Or a Mac running MacOS 10.14 Mojave or higher
  • About 15GB of free disc space.
Description

This "critically-acclaimed" and "insanely successful" Unreal Engine course was created in collaboration with Epic Games.

*NEW* Every section of the course is being fully updated and remastered to Unreal Engine 4.22+. The first three remastered sections have been released! New content will be released over the coming weeks and months. Existing students get all the new material for free.

The course now has high-quality handwritten subtitles throughout, available as closed captions so you can turn them on or off at your convenience. This is one of the best Unreal Engine tutorials on the web.

This course started as a runaway success on Kickstarter. Get involved now, and get access to all future content as it's added. The final course will be over 50 hours of content and 300+ lectures.

Learn how to create and mod video games using Unreal Engine 4, even if you're a complete beginner. Unreal is a free-to-use game development engine used by AAA studios and indie developers worldwide. It can be a complex beast to get into, but we break it down step-by-step

Already know Unreal and want to learn VR or Multiplayer? Check out our other Unreal courses, just look for the green leaf for our other world-class Unreal courses.

We start super simple so you need no prior experience of Unreal or coding! With our online tutorials, you'll be amazed at what you can achieve. We believe project-based learning is the best way to learn Unreal Engine.

Benefit from our world-class support from both other students, and the instructors who are on the forums regularly. Go on to build several games including a tank game, and a First Person Shooter.

You will have access to a course forum where you can discuss topics on a course-wide basis, or down to the individual video. Our thriving discussion forum will help you learn and share ideas with other students.

You will learn C++, the powerful industry-standard language from scratch. By the end of the course, you'll be very confident in the basics of coding and game development, and hungry to learn more.

"Any serious game programmer needs to know C++"Jason Gregory, Lead Programmer at Naughty Dog (creators of Uncharted & The Last of Us)

Anyone who wants to learn to create games: Unreal Engine is a fantastic platform which enables you to make AAA-quality games. Furthermore, these games can be created for Windows, consoles, macOS, iOS, Android and Web from a single source!

If you're a complete beginner, we'll teach you all the coding and game design principles you'll need. If you're an artist, we'll teach you to bring your assets to life. If you're a coder, we'll teach you game design principles.

What this course DOESN'T cover...

Whereas this course is already huge, we can't possibly cover everything in that time. Here are some things we will not be covering...

  • Team collaboration topics.

  • Editor plugins or modifications.

  • Physics engine modification.

  • Multiplayer features.

Note: access to this course comes with an optional, free community site where you can share games and 3D models, as well as connect with other students.

Start to learn Unreal C++ now, you won't be disappointed!

All future content updates are included free!

Who this course is for:
  • Competent and confident with using a computer.
  • Artists who want to bring their assets alive in a game engine.
  • Developers who want to re-skill across to coding.
  • Complete beginners who are willing to work hard.
  • Existing programmers who want to re-skill to game development.