Hello again.
In this lecture, we're going to be creating three levels so that we've got some ammunition in the future
where we can load from one level to the next.
And I'm creating this big kind of level to have a little bit of fun, a little bit of level design fun
where I'm introducing the mushrooms and the spikes and the enemies and all that kind of jazz.
So let's get started in a moment.
I'm going to unleash you on a challenge to create a couple of levels.
But for now, I want to talk through a couple of things.
The first thing is for each of my levels, I'll have a spot where it's going to be the starting point.
I'll grab my player, put my player where I think the starting point of the level would be either up
here on the ledge, you jump down and progress or down at the bottom and you run through maybe at the
top here just for a bit of fun.
And the play is going to run, run, run.
And here it's pretty clear you end up down here and there'll be some sort of icon that says this is
how you exit and load into the next level.
The other thing I'm going to point out is I'm going to be talking about rooms.
So here I see that the area that the camera fits in.
So this is the camera at the moment where we fit in there.
I'm going to say kind of one room.
And this level I've got at the moment, it's around about three rooms, maybe four, if you can include
the fact that there's a bit of extra stuff down the bottom.
So one camera width or room two and then sort of three, that's about a three room level.
And at times we want to have a one room level, times we might have a 30 room level.
This one's about a three.
Okay.
Now the other main thing we need to do is click on our prefabs folder and prefab everything that's in
our scene that we want to have persist in our other levels.
So I'm going to prefab my enemy.
Drop it down in there.
That's good.
And prefab the cameras.
Drop that down in there.
I'm going to save up my scene to make sure it's all happy with our prefab thing.
It looks like it has.
Now, next up, click over on our scenes folder.
I'm going to rename this just click one more time.
Rename this to Levels.
Levels and scenes is pretty much the same thing.
Scenes as a unity word and levels is more of a video game word, I think more in levels.
And then what I'll do is click on our sample scene control data, duplicate control data, duplicate
one more time.
So now we've got three levels that are exactly the same as the level we've got there already.
So we've got our three scenes.
I'm going to rename this to be level one, level two, and you guessed it, level 17.
No, just joking, level three.
And it's asking me to reload because that's the scene we're in at the moment or the level we're in at
the moment.
We reload, make sure that we've still got all of our prefabs that have been prefabs and it looks like
they are.
So we click through them, they look like they're all exactly the same.
That's fine.
Level two I'm going to keep mostly the same.
I might do a little bit of tweaking.
Level one, I'm going to make this a small little introductory.
Here's how you do a jump and level three will put in all the bells and whistles, all the stuff that
we have now.
So here's what I've got to challenge for you.
That is that we need three levels.
Side note, you couldn't make this thing one entire level and not have to do any loading or any of those
transitions.
That's totally fine.
If you want to make one big mega level, tile map will let you do that.
But I want to teach you some things about how we load from one level to the next and have things persist.
So we are going to create a few levels.
You could be cheeky with this and just make one tiny little alteration for each of these three levels
and call them three levels.
That's fine if you want to do that.
If you don't want to actually do any level design, not a problem.
But here's my challenge for you is to make everything prefab.
You should have done that already.
Duplicate your existing level so you have three levels.
You've probably done that already as well as I've gone through it.
And then level one, a single room where you just jump over spikes so the player learns, Oh, I run
along and I jump over the spikes and I get to the end and I load a new level.
Don't worry about the level loading just yet.
We'll get to that in the next couple of lectures.
Level two is a triple room, so kind of the size of the level that I've got at the moment that has ladders
and enemies, but not yet the mushroom and not yet anything else.
And level three, as big as you like, do whatever you want, introduce some bouncing, some gaps to
jump over.
So some challenge in there as well as our ladders and enemies.
So go ahead, take on that challenge.
Put in as much or as little time as you want.
I'm going to create mine off camera and then just show you what I've done when we come back.
Because I think, you know, the process we go through now for making levels.
So there's a challenge.
Pause video.
See you back here when you're done.
Oh, dear.
Let me take you through what I've done just very quickly.
My first level is just a really simple jump.
The player looks at it and says, Okay, I think I run and I jump over that.
I get to the end and we load the next level.
So I have to click out of this on the level to Yes, I'll save, although I don't think I did anything.
Level one.
Level two what I'm trying to do here is very similar to what we had already adding a few extra goobers
in there.
But I wanted to teach the player at this next level of play that they can see down here.
Okay?
You can see that you drop onto that little bit of a leap of faith because you can't see whatever else
is going on down there.
You drop down there and then the camera shows you, Oh, there's another ledge, and then, oh, I could
have dropped the whole way down there.
So there's a little bit of that learning ladders, doing the jump again, and giving the player a choice.
Do you want to go the high road or the low road?
I really like that.
In all games you need to be giving the player some choice.
In this case, it doesn't really make any difference whether you go the highway or the low way.
Let's see and see if I can shoot him.
A little bit of a tricky shoot here so the player can practice their shooting in a fairly safe way.
There we go.
And then, just as we've done before.
Jumpy, jumpy.
Up here, you can jump and shoot that enemy or just ignore the enemy and down to the end of the level.
So pretty similar to what we had before.
But that's the flow.
And you can see my thought process there of what I'm trying to teach the player.
Obviously, remember to have your bounding box on your background layer so that your camera is in the
right place.
I move my player over here when I was just doing my play testing before.
I'm going to move the player back over there.
There's a bit of a bigger level.
I'm trying to show the player that you can bounce off mushrooms and do some leaps.
I won't go through the entire level because you get the picture here.
I'm just kind of building upon the excitement, but here's one of my jumps and the player can get all
the way up there.
If they miss that and they land on here, it's not quite as good.
There's all these spikes, a little bit of a trickier jump.
So I'm trying to get some of these more delicate, tricky platform kind of jumps, showing the player
that you go watch out for the enemy and jump over the enemy.
So you want to have those moments where the player is nearly squashed, but not quite because that's
what's going to make you game fun and get a lot of variety in there.
Make the player go up, make them go down, have one enemy, have three enemies, have small jumps,
have big jumps.
So it's all about variety and these sorts of games.
You don't want to have the player feel like they're doing the same thing over and over and over.
You want to have some challenge and up in there this is a little bit of a drop of faith.
But back in the other part of our level, just seem to you here, if the players over here, they can
see that there's some spikes down there.
So if they were to have a look, they could see those.
But in this case, just going to jump there and then that's the rest of my loop and then I die and fly
back to the start.
But I think that's good.
Then the player gets a little bit of that, like, oh, frustration, but excitement.
I can do it better next time.
The player should have some challenge.
Your game should be a little bit tough.
It shouldn't be that they can just walk through.
It's super easy and I didn't show you.
I won't go through that again.
But down the end of my level, we run down this little bit, jump over a couple of guys, and then just
go up a ladder.
So the final, final thought in here is just my thought process is as I'm making the level, I'm saying,
right, here's the player.
What do they want to do next?
Okay, I'll do a jump.
So there's a little mechanism I've got and then the next one is, okay, we'll have some spikes and
then we'll do some jumping up.
So it's really just a creative flow that I get into.
There's no specific formula.
It's just trying to have it every moment a little bit different from the previous moment.
And like I said before, have big things, small things drops, big jumps, small jumps, lots of enemies,
not a lot of enemies really go for that variety and that's a way to help you with your level creation.
So I look forward to seeing what you've come up with.
Please do share a screenshot in the discussions of one of your levels.
I'd love to see it and in the next lecture we'll hook up loading from one level to the next.