WEBVTT

00:07.060 --> 00:07.840
All right.

00:07.840 --> 00:08.650
Welcome back.

00:08.650 --> 00:10.150
Now we have our project.

00:10.150 --> 00:14.740
We're set up and we're ready to start making some C plus plus classes.

00:14.740 --> 00:16.960
And we're going to start with our character.

00:16.990 --> 00:18.340
We need a character.

00:18.340 --> 00:20.860
We need something to run around in the world.

00:20.860 --> 00:23.980
And we know that we have our character assets.

00:23.980 --> 00:27.760
If we go to characters Ora here is our skeletal mesh.

00:27.760 --> 00:32.410
We need an actual character class that we can assign this skeletal mesh to.

00:32.440 --> 00:35.020
So that's what we're going to do in this video.

00:35.140 --> 00:41.860
Now we're going to have some functionality in our character class that will be shared between our player

00:41.860 --> 00:48.420
controlled character that's going to be Ora and the enemy characters that will be controlled with AI.

00:48.430 --> 00:54.390
And because we're going to share some functionality, we're going to make a base class for our character.

00:54.400 --> 00:55.930
So that's what I'd like to do.

00:55.930 --> 01:02.860
Now I'm going to go up to Tools and select New C plus plus class and choose the character class.

01:02.860 --> 01:08.510
And for our C plus plus classes, I'd like to use the public and private Git folder structure.

01:08.510 --> 01:14.270
So I'm going to click on public and that's going to put our header file in public and the CPP file in

01:14.270 --> 01:14.900
private.

01:14.900 --> 01:17.840
And I'm going to call this class Ora.

01:18.870 --> 01:25.170
Character base and this will be our base class and we'll have all of our characters in this project

01:25.170 --> 01:26.820
derive from this class.

01:26.820 --> 01:28.920
So let's go ahead and create the class.

01:28.920 --> 01:35.580
Now I have live coding off and my project is set up so that it doesn't automatically compile when I

01:35.610 --> 01:36.900
create a class.

01:36.900 --> 01:40.260
So it's going to generate the C plus plus code.

01:40.260 --> 01:47.460
So I'll give it a moment and once that's finished, I'm going to go ahead and close out of the Unreal

01:47.460 --> 01:48.360
Engine editor.

01:48.390 --> 01:53.610
Now A has been generated for me, but I'm going to open this project in Rider.

01:53.610 --> 01:59.760
Now, if you don't have Rider, you can use Visual Studio or even VS code if you'd like to do that.

01:59.760 --> 02:07.620
But as I mentioned, I'll be using Rider for this course and I can right click on the project and select

02:07.620 --> 02:09.480
Open with Rider.

02:09.630 --> 02:13.260
Now I'm going to tell Rider that I trust this solution.

02:13.260 --> 02:20.100
So I'm going to click Trust and Open and we'll see our brand new Aura character base header and CPP

02:20.110 --> 02:20.530
files.

02:20.530 --> 02:28.000
Of course they'll be red because I'm version controlling this rider is smart enough to see that and

02:28.000 --> 02:31.330
it's letting me know that these files are not staged yet.

02:31.330 --> 02:34.220
So that's going to help me to remember.

02:34.240 --> 02:40.870
Now we also see Rider link is required, so I'm going to go ahead and click install plugin and game

02:40.870 --> 02:44.860
just to take care of that and we'll give this some time.

02:45.220 --> 02:51.880
We see now that rider is ready to use and we'll give Rider a moment to process Unreal Engine source

02:51.880 --> 02:52.660
files.

02:53.050 --> 03:00.610
Okay, so after waiting patiently, now that rider is finished, we can now take a look at our new character

03:00.610 --> 03:07.150
base class and I'm going to tell Rider not to ask me again to add new files to get.

03:07.180 --> 03:09.880
I think I can handle doing that on my own.

03:10.090 --> 03:12.430
And here's our project.

03:12.460 --> 03:17.590
The Aura module contains a source folder with some new things.

03:17.590 --> 03:20.400
Here we have Aura and CPP.

03:20.520 --> 03:24.870
We got our Buildpacks, all that good standard stuff.

03:24.870 --> 03:31.200
Here's our public and private folders with Aura, character based and CPP.

03:31.440 --> 03:36.330
And of course once I stage and commit these and git, they'll no longer be read.

03:36.360 --> 03:41.490
If you're not version controlling, then Rider will not make these read for you and you don't have to

03:41.490 --> 03:42.300
worry about it.

03:42.300 --> 03:48.780
So before we go ahead and get started rearranging and coding things, I'm just going to go ahead and

03:48.780 --> 03:57.390
open up the Visual Studio solution as well, just so we can see what things look like and that it's

03:57.390 --> 04:00.060
telling me I need to install some extra things.

04:00.060 --> 04:05.190
Let's take a look and install those things we might need that we don't have.

04:05.190 --> 04:13.440
And once that's complete, we can now take a look at our project here in Visual Studio and we can see

04:13.470 --> 04:17.460
Aura character base here, both H and CPP.

04:18.210 --> 04:22.450
So it doesn't really matter what ID you're using.

04:22.480 --> 04:25.150
What matters is the code itself.

04:25.240 --> 04:32.680
Now throughout the course we're going to be running in debug mode and to run in debug mode, we need

04:32.680 --> 04:41.230
the editor symbols for debugging, which is a set of symbols that allows us to see the call stack when

04:41.230 --> 04:44.740
we're debugging and when we hit breakpoints and things like that.

04:44.740 --> 04:51.310
We'll be getting lots of practice doing debugging throughout the course as that will greatly enhance

04:51.310 --> 04:58.840
our experience as developers and we'll go ahead and run in debug mode just to make sure that we're up

04:58.840 --> 05:01.660
and running and everything's working in this video.

05:01.660 --> 05:08.920
So the first thing we need to do in order to run in debug mode is we can open our epic games launcher.

05:09.800 --> 05:15.020
Go to library and find our version of Unreal Engine.

05:15.050 --> 05:19.670
Click the drop down next to launch and go to Options.

05:19.670 --> 05:22.660
And here we see editor symbols for debugging.

05:22.670 --> 05:28.760
Now, if you've taken some of my other courses, I haven't forced you to do this, namely because,

05:28.760 --> 05:32.870
well, it's nearly 60GB in this case, which is a lot.

05:32.870 --> 05:40.190
But for this course, I highly recommend that you do install editor symbols for debugging as debugging

05:40.190 --> 05:44.840
is an important skill that you should have as a game developer.

05:44.840 --> 05:50.870
And as you'll see throughout the course, it's going to allow us to get a lot of information that we

05:50.870 --> 05:53.270
would otherwise not have access to.

05:53.270 --> 05:58.070
So make sure that checkbox is checked and go ahead and hit apply.

05:58.070 --> 06:02.900
And I'm going to give this a few minutes to finish downloading those symbols.

06:02.900 --> 06:10.380
And in the meantime, I'm going to close out of the Ides, both Visual Studio and writer, and I'll

06:10.380 --> 06:13.050
go ahead and edit out that wait time.

06:13.470 --> 06:13.860
Okay.

06:13.860 --> 06:17.460
So now that that's finished, I'm done with the Epic Games launcher.

06:17.460 --> 06:22.200
I'm going to close it and reopen my project in my IDE.

06:22.680 --> 06:27.150
Now I'm going to go ahead and open up the new project in Writer First.

06:27.150 --> 06:32.160
And now that I have editor symbols for debugging, I can run this in debug mode.

06:32.160 --> 06:39.450
So I'd like to come up here to my solution configurations and change the configuration from development

06:39.480 --> 06:40.950
to debug game.

06:40.950 --> 06:48.570
So I've switched to debug game and now if I like I can hit run that'll compile and launch the Unreal

06:48.570 --> 06:51.240
engine editor without running in debug mode.

06:51.240 --> 06:57.150
Or I can hit the debug button which will run this project in debug mode.

06:57.180 --> 07:02.250
That's what we're going to do most of the time as we're developing and playtesting this project.

07:02.250 --> 07:06.720
So I'll go ahead and allow writer to launch the engine.

07:06.720 --> 07:13.350
We see up here that it says Ora debugging now and we now have the editor open and we're running in debug

07:13.350 --> 07:13.920
mode.

07:14.370 --> 07:19.200
Now, we do need to make sure that if we make changes here in the editor that need to be saved, that

07:19.200 --> 07:23.370
we do click save all before we end our debug session.

07:23.370 --> 07:28.110
If I go back to writer, you'll see that up here there's a red stop button.

07:28.110 --> 07:32.040
If I hit that, it's going to actually close out of the Unreal Engine editor.

07:32.040 --> 07:36.090
As you can see, it's no longer open, so that's something to be aware of.

07:36.120 --> 07:39.450
Now we can run in debug mode in Visual Studio as well.

07:39.450 --> 07:44.910
I'm going to close writer and open my Aura Visual Studio solution.

07:44.910 --> 07:51.480
I'll go ahead and close this What's new tab there and we can change this from development editor to

07:51.510 --> 07:59.790
debug game editor and what this will do is it'll run the project with debug symbols for our game project

07:59.790 --> 08:06.180
module and not the engine modules and we can simply hit the play button if we want to launch this in

08:06.180 --> 08:07.380
debug mode here.

08:07.380 --> 08:14.650
And once again we have aura open and just like we saw before when we were debugging from writer, we

08:14.650 --> 08:16.990
see debug game up here at the top.

08:17.140 --> 08:22.590
I'll go ahead and close out of the editor and I'm done with Visual Studio.

08:22.600 --> 08:24.520
I'm going to go ahead and close out of that.

08:24.520 --> 08:30.340
As I mentioned, I'll be using writer, so I really don't need my Visual Studio solution.

08:30.370 --> 08:32.950
It's there, but I can remove it.

08:32.950 --> 08:34.990
I can also remove the settings.

08:34.990 --> 08:39.250
That's just some options for writer slash Resharper.

08:39.280 --> 08:44.530
I'm going to go ahead and just delete both of those and I'll right click on the new project.

08:44.530 --> 08:48.430
And once again I'm going to open with writer.

08:51.080 --> 08:54.230
And I'm ready to actually start coding.

08:54.320 --> 08:56.680
Now we'll start coding in the next video.

08:56.690 --> 08:58.310
For now, we've got things set up.

08:58.310 --> 09:00.950
We're able to run and debug mode.

09:00.980 --> 09:02.800
Everything's looking great.

09:02.810 --> 09:07.700
I do have a lot of red here and I can fix that by making another commit.

09:07.700 --> 09:13.820
And the convention that I'll use for this course is each commit will be named after the lecture title,

09:13.820 --> 09:20.240
as is pretty common with my courses, so I'm going to go ahead and commit.

09:21.350 --> 09:23.090
I like to run git add

09:25.670 --> 09:34.790
git status and then I'll make a commit and I'll call this the base character class.

09:40.920 --> 09:42.480
So there's my commit.

09:42.630 --> 09:45.210
I can go ahead and push to my remote repo.

09:49.580 --> 09:50.720
And we're good.

09:50.720 --> 09:51.890
And back in Rider.

09:51.920 --> 09:54.020
The red is gone.

09:54.440 --> 09:56.310
Okay, we're all set up and ready.

09:56.330 --> 09:59.210
We'll start actually coding in the next video.

09:59.540 --> 10:00.530
I'll see you soon.
