Hello and welcome.
In this lecture, we're going to be adding some extra layers of tile maps.
We're going to be adding the background and the water.
So let's get in and talk about toe map and layers.
Okay.
Let's see if you're paying attention in the last lecture.
I'm going to ask you if you remember.
So this is the challenge for you.
Create a new tile map, call it background tile map.
Add our background tiles into the palette.
Let me just show you which one those are.
That for me, it's the spa background with the brown tint, although they're kind of green, so maybe
I should rename that.
But it's cool for now.
Don't worry about Rick on with the challenge.
So add the background tiles into the palette and then paint some of those background tiles.
And just a note, don't worry if the sorting order or the order sorting is wrong, we'll be going through
that together.
So if you're finding that your background is on top of the platforms or you can't see it, that's cool.
Just find somewhere in your scene and paint down some of the background tiles.
There's a challenge.
I'll see you back here when you're done.
So first thing I'm going to do on the toll map grid, I'm going to right click to DX Object and tile
map and rectangular.
I want to make sure it's a child underneath our tile map grid and I will name this background tile map.
So if I click on background tile map now, I will be creating to that tile map.
If I click on the foreground or the platform's tile map, I'll be creating to that.
I can also change it here under active tile map, depending which one I want to select.
And you see a little bit going over there to let us know that we change something.
And so it's really important to get into the frame of mind that if you're doing something on one particular
tile map, you've got to switch it or else before you know it, you've gone and painted a whole bunch
of background right over the top of the layer, which is your platform.
So just a note on that.
Now what's next on our list?
Add our background tiles into the palette.
Okay, good.
We'll find a little bit of space down below here.
We will open up or I will open up the background, highlight all of these, drag them into our palette,
pop them just there.
Looks good.
It'll ask me where I want to put these tile folder perfect select folder pink bonk pink brings them
all in and can see that it doesn't look so good on the screen here.
But these are all different tiles, a little bit of random structure to them so that it looks like some
background.
We've got all that there.
Now I need to make sure I'm selected on the background tile map, highlight all of these and I'm just
going to go blank, blank.
And as I mentioned before, that doesn't look too good because I'm just painting right over the top
of my platforms.
I'll pop all these in here.
Now, you don't need to worry for the moment how much space you're taking up.
It's just all of the background.
You can see where our camera is here with the white part.
And if you wanted, incidentally, to make your camera so that you see more you like.
But that's not enough space to fit in all I want to fit in there.
Considering that the tile map is this particular size of the tiles of this particular size, you just
go click on camera and you could change the size to bring it in.
That'll have a lot less tiles on the on the screen at once or move it all the way out.
And then maybe it makes the tiles really tiny.
So I'm going to leave it five for now because I'm not sure how big I want it until I get my character
in there and have the character running around.
But we've found ourselves a bit of a problem.
Now let's click on the background tile map and as we've done before, you can find the sorting order
or the order in layer and I can make the background over in here minus one.
There we go.
And now it's behind the platforms.
And the platforms is going to be at zero four.
Click on that platform is at zero.
I'm not going to do it that way because I don't know how many of these layers I want.
I'm going to do it a slightly different way just to show you an alternative way.
So I'll put that back to zero and I'm going to jump up to in my inspector, you see layer and then default.
We will jump into there and we'll click on add layer.
Now it's super confusing because we've got sorting layers and then we've got layers.
So it's like there's so many layers going on here.
I'm going to click on plus on the sorting layers and I'll add a new layer which I will call platforms
and then hit Enter and I'll click plus again and another layer which I'll call background and hit enter
again.
Now jump back out, click on background tile map, scroll down to where we have our sorting layer and
change this to be background and I'll jump over to my platform's tile map and change this to be platforms.
So why did we do that?
Well, if we jump back into where we scroll up, look at the layer here, click on the default area,
go to add layer, go back to sorting layers.
You can see in here.
So I know a little bit of a journey you can see here, if you grab one of these layers, you can move
them up or move them down so we can easily change what is above other things on the screen in a very
easy way because we've got all this layer, so whatever in this list is on the bottom.
You will see on top of the screen, I know those words don't make sense.
So layer one and then layer two.
Layer one is background for me, and that is underneath layer two, which is platform.
So if we add a layer three, four, five, six, seven, we can easily just change what appears over
the top of what.
Now we can see the result here.
I went and made my background very green, so it really pops out and you can see it.
But it might be too green.
It might be looking at this thing.
I don't know about that.
What we can do.
I've just got to play around with this.
That's why my screen looks a little different.
If you go into your tiles, find the asset file.
So the assets that we've gone and created for our tile palette highlight all of those for the background.
Now we've got color.
We can do a little bit of tinting on this.
So if I click on the color, I might want to have them a little bit darker, a little bit brighter,
a little bit more red, a little bit more green, for example.
So you can do a little bit of tinting.
There's a limitation to this, but if you do find that they're popping out a little bit too much with
the graininess, then you can go and change that.
You can do that for any of the tiles that your heart desires, make them maybe a little bit bluer because
they're starting off at green.
We're pretty much limited to just making them a little bit darker, which is fine.
I think that might be enough for us.
And you know what?
While we're here just for fun, let's make ourselves a water layer so we can pop some water around in
our map.
So the water would probably be on top of the back.
Brown but underneath the platforms.
So go ahead, pause the video and make yourself a water layer.
Okay.
So once again, toll map, right click to the object tile map, rectangular.
We will make this water tile map and then that gives us that extra option on water tile map.
Great.
I'm going to.
I've already brought this in, so we already have the assets in there.
Okay.
Now we need to over in the top right on layer, we need to add a layer.
We will add in under sorting layers, click plus we'll add ourselves water.
I know it's going to need to sit in between these two layers and then jump back clicking on water tile
map, scroll down and find sorting layer to be water perfect.
Now click on some of the water.
See if I can paint that down.
Yes, I can.
And where can I paint it?
So it makes sense.
Not just the air it'd be floating in the air.
I'm going to click on the top little bit of the water actually while I'm here, I'm just going to separate
this.
So click on selection, select those to click on edit, click on move, edit them down, just so they're
not sitting right on top of it.
Actually, I just grab that bottom bit and put that underneath.
There we go.
That's how they go.
You know, while I'm here, I'm going to click on the Eyedropper, highlight two of these, and then
just paint a couple of things side by side.
So I've I wanted to paint it down more quickly.
I could so click on the eyedropper, select all four of these things, jump back over into the world
and then pop that in.
And then we go, We've got some water.
It doesn't look that good because I think I need to move this up a little bit.
So I'm just going to very, very quickly finesse that or else it's going to bug me.
There we go.
Now that we have our little pond in the middle of our platform level with our various layers.
So good stuff.
I'll see you in the next lecture.