WEBVTT

00:00.140 --> 00:00.650
Hello guys.

00:00.650 --> 00:01.670
Welcome to the video.

00:01.670 --> 00:07.040
In this one I want to show you how to make an auto tile rule system.

00:07.040 --> 00:08.030
This system.

00:08.030 --> 00:09.830
Well let me just show you what it does.

00:09.830 --> 00:14.150
So you can select one tile and you can choose the fill tool.

00:14.150 --> 00:17.330
And you can, uh, draw level parts like that.

00:17.330 --> 00:23.180
And corners and sides of the level parts would be chosen automatically by unity.

00:24.150 --> 00:25.890
It works in a very simple way.

00:25.890 --> 00:30.420
You just need to give it a bunch of rules, and then you need to follows these rules and just does the

00:30.420 --> 00:31.200
job for you.

00:31.200 --> 00:31.800
Simple as that.

00:31.800 --> 00:37.260
I'm going to show you how to make it right now I just want to say that this makes it easier to use,

00:37.260 --> 00:39.360
but also it takes time to set up.

00:39.360 --> 00:41.340
And because of that, it is always a question.

00:41.340 --> 00:46.620
Is it better to use this system or just place tiles with your hands like that?

00:46.620 --> 00:52.140
Because maybe you want to have a handcrafted levels and you want to have some, you know, like specific

00:52.140 --> 00:54.090
corners and so on.

00:54.090 --> 00:58.830
So it always depends on the needs of the project, depends on what you want.

00:58.830 --> 01:00.990
Nevertheless, I want you to know how to use it.

01:00.990 --> 01:03.960
And I'm going to show you how does it work and how to make it okay.

01:05.310 --> 01:08.760
There are also some limitations, but we're going to learn about them later on.

01:08.760 --> 01:09.870
Let me erase it.

01:09.870 --> 01:11.190
Let me go to Tile Palette.

01:11.190 --> 01:13.350
I'm going to just keep this one.

01:13.350 --> 01:14.850
You can use it later on.

01:16.440 --> 01:21.150
Once you've got the project, let me just do stone rule.

01:22.190 --> 01:24.200
Here and we're going to make a new one.

01:24.200 --> 01:28.190
And this one you can just copy after you learn how to make it.

01:28.190 --> 01:32.540
Or you can just take it from the project that you'll get in the end of the section.

01:32.750 --> 01:33.440
Nice.

01:33.440 --> 01:35.060
Now how do you make a rule?

01:35.090 --> 01:38.090
You click right button create.

01:38.770 --> 01:39.370
2D.

01:40.790 --> 01:43.340
Tiles rule tile.

01:43.640 --> 01:46.070
I'm going to name it as would rule.

01:46.490 --> 01:51.950
And now, first of all, let's just click the lock it over here.

01:51.950 --> 01:56.270
This one will lock the inspector and no matter what we select, we're still going to have this, uh,

01:56.270 --> 01:57.650
object selected.

01:57.980 --> 01:59.420
Then let's go to graphics.

02:00.440 --> 02:01.370
Terrain.

02:01.700 --> 02:06.020
And let's work with the wooden tiles over here with this one.

02:08.210 --> 02:12.170
First of all, we need to set up default tiles so we understand what we are working with.

02:12.170 --> 02:14.960
And for that I guess it's better to choose the corner.

02:14.960 --> 02:16.400
So I'm going to choose this one.

02:16.550 --> 02:22.130
Then we need to say how many tiles we're going to have in this, uh, rule tile.

02:22.580 --> 02:24.980
For now we just want to have nine of them.

02:26.170 --> 02:28.720
Let's have nine of them now.

02:28.720 --> 02:29.380
Over here.

02:29.380 --> 02:33.100
We need to fill up the tiles on the right with the tiles we have here.

02:33.760 --> 02:35.260
And we're going to work with the wooden tiles.

02:35.260 --> 02:36.760
So let's go here.

02:37.530 --> 02:39.480
And let's take the corner.

02:39.480 --> 02:41.310
Then we need the top part.

02:42.270 --> 02:44.370
Then the right corner from the top.

02:44.820 --> 02:46.950
Then we're going to have the second line of the tiles.

02:46.950 --> 02:51.840
So the left one, the middle one, the right one.

02:52.020 --> 02:54.960
Then we're going to have the bottom line of the tiles.

02:54.960 --> 02:59.100
So the bottom one the middle one the right one.

02:59.100 --> 03:03.510
Before we continue the setup let's go to Asset Tile palette.

03:03.510 --> 03:07.020
Let's take this wooden rule and let's drag it over here.

03:07.020 --> 03:08.640
Then we're going to select it.

03:08.640 --> 03:12.210
And I want to draw a platform just like that.

03:12.570 --> 03:15.810
I know it is a mess right now but no worries we're going to fix it.

03:17.150 --> 03:20.660
Now, how does the rules are working?

03:21.350 --> 03:23.390
Well, you take a look at the first one.

03:23.390 --> 03:27.620
We have a corner, the top left corner and this corner.

03:28.780 --> 03:31.510
Cannot have anything at the top.

03:32.800 --> 03:33.070
Uh.

03:33.070 --> 03:37.480
And this corner and the left adhere and adhere.

03:37.480 --> 03:41.170
This corner can be extended only to the right.

03:42.010 --> 03:44.770
To the bottom right and down here.

03:44.770 --> 03:48.220
And these are not supposed to have anything, right.

03:48.220 --> 03:49.750
That's the rule for this corner.

03:49.750 --> 03:52.630
He can be placed only in these conditions.

03:52.630 --> 03:59.650
If it is like that, we need to go here and say that it can be extended here, here, here.

03:59.800 --> 04:02.050
But it cannot be extended here.

04:02.050 --> 04:05.710
So we put cross and to put a cross you need to click it twice.

04:05.710 --> 04:11.020
So cross cross cross cross cross okay.

04:11.020 --> 04:12.670
And look at this.

04:12.670 --> 04:15.430
You've got a corner over here automatically.

04:15.430 --> 04:16.540
Very nice.

04:16.540 --> 04:19.390
So there are three states for this one.

04:20.320 --> 04:22.930
One is the arrow, which says.

04:23.750 --> 04:25.880
Title can be extended to this side.

04:25.910 --> 04:32.720
Then there is a cross which says titles cannot be extended to that side, and there is an empty square

04:32.720 --> 04:38.900
which is sort of like is not taking any rules, you know, you can have that, can have that like it

04:38.900 --> 04:41.000
does not have any rule for that spot.

04:41.000 --> 04:41.750
Exactly.

04:41.750 --> 04:44.510
So we know how it works, how the rules should be.

04:44.510 --> 04:46.490
So let's just set up the rules.

04:46.490 --> 04:49.370
And I'm going to explain everything I do for the first one.

04:49.370 --> 04:53.660
But for the second one I'll just do it quickly and you'll see the result okay.

04:53.660 --> 04:55.580
Now let's go further.

04:55.580 --> 05:02.420
And let's just say that this style can be extended to the left, down, left, down, down, right and

05:02.420 --> 05:03.110
to the right.

05:03.110 --> 05:08.900
It cannot be extended here, but it may have something here because we're going to have like different

05:08.900 --> 05:09.920
shapes of the platform.

05:09.920 --> 05:11.990
So I'm going to just do this.

05:13.050 --> 05:15.300
And that's it for this corner.

05:16.630 --> 05:17.050
Sorry.

05:17.050 --> 05:18.190
Here, here.

05:18.190 --> 05:19.420
This one cannot be used.

05:19.420 --> 05:21.670
So just like that.

05:22.320 --> 05:22.800
On the left.

05:22.800 --> 05:27.420
One can be extended like that and it cannot have anything from the left.

05:27.960 --> 05:31.020
In the middle, it can be surrounded from any side.

05:31.020 --> 05:33.030
So we're going to do it like so.

05:34.740 --> 05:41.850
For the right one over here can go just to these sides, but cannot have anything here.

05:41.850 --> 05:49.920
So this is how we do it for the bottom left can be extended to this direction but can't have anything

05:49.920 --> 05:50.790
here.

05:51.760 --> 05:55.660
The bottom line over here can go like so.

05:55.660 --> 05:59.590
So we go here, here, here, here, here and here.

05:59.590 --> 06:00.730
We're going to put a cross.

06:00.730 --> 06:01.780
This is the last one.

06:01.780 --> 06:02.830
Very easy one.

06:03.010 --> 06:05.050
It goes up and left and up left.

06:05.050 --> 06:07.360
So up up left and left.

06:07.600 --> 06:09.520
And here we're going to have crosses.

06:10.320 --> 06:12.900
Okay, so now the system is working.

06:12.900 --> 06:17.370
You can select this tile and you can draw anything you want.

06:19.280 --> 06:25.280
Although it is not over yet, you can see the mess it makes when we have corners like this.

06:25.280 --> 06:29.930
By the way, this is a good result, but over here this is also a good result.

06:29.930 --> 06:30.980
I kind of like it.

06:31.550 --> 06:32.150
Give me a second.

06:32.150 --> 06:33.770
I'll try to draw something.

06:34.980 --> 06:35.550
Yeah.

06:35.550 --> 06:39.930
So when we have something like this, you can see it's not working very well.

06:39.930 --> 06:40.620
Right?

06:41.160 --> 06:41.490
Um.

06:44.060 --> 06:44.720
Like this.

06:44.750 --> 06:46.250
It is not working very well.

06:46.250 --> 06:48.500
It needs some corners.

06:48.500 --> 06:53.150
So here, first of all, it depends on what platforms you're going to make in the game.

06:53.150 --> 06:57.560
But we can use these corners and make it work.

06:57.560 --> 07:03.080
But I know this because I spent a good amount of time trying to set up these tiles.

07:03.080 --> 07:05.600
It's not like I magically know this information.

07:05.600 --> 07:08.240
I actually tried for a while to make it work.

07:08.240 --> 07:12.890
So I'm going to show you how to set up everything with these tiles, and I think it can be applied to

07:12.890 --> 07:14.120
these tiles as well.

07:14.120 --> 07:19.640
But for this over here, to be very honest, I'm not sure how to set up these corners.

07:19.640 --> 07:23.720
So if you like you can try and see how it works for you.

07:23.720 --> 07:25.400
But I'm just going to leave it at that.

07:25.400 --> 07:30.950
And if I need this one to be with corners, then I'll just do it manually with my hands.

07:30.950 --> 07:36.080
But other than that, I'll just use square platforms and rectangular platforms.

07:36.200 --> 07:36.800
Yeah.

07:36.800 --> 07:41.090
So let me show you how to stop corners for the wooden tile set.

07:41.940 --> 07:45.240
We're going to go here and we're going to extend it.

07:45.330 --> 07:48.570
Add one and then we need to go to graphics.

07:49.270 --> 07:53.710
Terrain, and we need to find that corner thin.

07:56.190 --> 07:57.690
And this one.

07:58.680 --> 07:58.830
Now.

07:58.830 --> 07:59.160
Wait.

07:59.160 --> 08:00.330
This is the top left.

08:00.330 --> 08:00.660
Right.

08:00.660 --> 08:02.190
Let's go and find top left.

08:03.280 --> 08:07.630
Actually, it's not the top left, and maybe we need to draw it with the hands to see what is the top

08:07.630 --> 08:07.960
left.

08:07.960 --> 08:08.710
What is not.

08:08.740 --> 08:09.970
Wait, why did I delete that?

08:09.970 --> 08:10.780
Let's keep it.

08:12.580 --> 08:14.680
Just want to try to repeat the shape here.

08:15.040 --> 08:16.030
So.

08:16.950 --> 08:18.600
Something like this.

08:18.780 --> 08:20.850
Something like this.

08:25.200 --> 08:30.030
And, uh, something like this goes here, this goes here.

08:30.030 --> 08:32.250
And let's say we want it to be extended up.

08:32.580 --> 08:34.650
So we draw it like.

08:36.110 --> 08:37.070
So.

08:39.270 --> 08:41.790
And the question is, what do we place over here?

08:41.790 --> 08:43.680
What do we place here and here?

08:43.680 --> 08:46.650
We're going to place the corner like so.

08:47.010 --> 08:48.300
And one.

08:50.170 --> 08:51.580
Over here like so.

08:51.580 --> 08:52.960
So this makes it better.

08:52.960 --> 08:55.450
And this what we need to achieve with the rule tile.

08:55.480 --> 08:56.140
Okay.

08:57.300 --> 08:59.430
So this one goes to the top left.

09:00.820 --> 09:01.780
This is the top left.

09:01.780 --> 09:03.040
You see, this is very confusing.

09:03.040 --> 09:04.630
I'm telling you, this is super confusing.

09:04.630 --> 09:06.160
This is not easy to do.

09:06.460 --> 09:08.170
Uh, we're going to drag this one over here.

09:08.170 --> 09:09.400
This is the top left.

09:09.730 --> 09:17.170
And because it is a top left and can be extended to any direction except the top left corner, just

09:17.170 --> 09:17.800
like that.

09:17.800 --> 09:19.810
Yeah, it's working very well.

09:19.810 --> 09:22.690
Now, this is the top right.

09:23.300 --> 09:24.440
This is the top, right?

09:24.440 --> 09:25.400
Let's find it.

09:25.400 --> 09:27.050
Let's add one.

09:27.050 --> 09:29.360
Drag the top right for the top right.

09:29.360 --> 09:32.480
Cannot be extended here but can go like so.

09:33.110 --> 09:39.770
All right again I want to repeat this was achieved through the experiments and good amount of time of

09:39.770 --> 09:40.550
trying.

09:40.550 --> 09:43.460
So if you want to set up others you'll have to do it yourself.

09:43.460 --> 09:45.740
I'm just showing you the system and how it works.

09:46.100 --> 09:49.190
This one will go to the bottom right.

09:49.520 --> 09:56.270
So let's drag it and say that bottom right and can be extended like so.

09:56.270 --> 10:00.560
And one more bottom left is this one.

10:01.880 --> 10:07.340
And cannot be here, but can go to these directions.

10:07.640 --> 10:08.540
Okay.

10:09.260 --> 10:10.640
I hope I'm right.

10:11.760 --> 10:12.480
Yeah.

10:12.600 --> 10:13.920
Now let me show it to you.

10:13.920 --> 10:16.770
So as you can see, it is not perfect.

10:16.770 --> 10:18.960
Even with that, it is not perfect.

10:19.350 --> 10:26.220
So if you want to have some platform that looks good, you need to take this into account how it's made

10:26.310 --> 10:26.880
right?

10:26.880 --> 10:27.690
This one works fine.

10:27.690 --> 10:33.930
But again, if I try to do something like this is not very pretty and this one would be better crafted

10:33.930 --> 10:37.050
manually with the hands, unless you want to do like so.

10:37.050 --> 10:42.060
So there are some limitations, but still a lot of time can be saved with this system.

10:42.060 --> 10:45.450
So maybe it is better to set up the system and sometimes use that.

10:45.450 --> 10:46.680
Sometimes you use that.

10:46.860 --> 10:49.140
There is also a problem.

10:49.140 --> 10:50.370
I know what you're thinking.

10:50.370 --> 10:56.400
You're thinking why would we not just add one of them manually like that and it cannot be done?

10:56.400 --> 10:58.740
This would be sort of a break in the rule.

10:58.740 --> 11:00.090
So you cannot do it like that.

11:00.090 --> 11:08.130
Because for these tiles that were drawn with the rule, this is the alien tile and it interrupts the

11:08.130 --> 11:08.970
system there.

11:08.970 --> 11:09.510
Okay.

11:10.460 --> 11:13.880
Yeah, yeah, maybe it can be done better.

11:13.880 --> 11:18.470
For example, you can extend neighbors and do like a better setup.

11:18.470 --> 11:24.440
But personally I think it would be a bit overkill because level is going to be very simple for this

11:24.440 --> 11:29.480
game, and I don't think I need that super setup to make it work, honestly.

11:29.480 --> 11:30.230
Yeah.

11:30.950 --> 11:31.970
So I'm going to keep the rule.

11:31.970 --> 11:38.120
I'm going to use it later on for some basics layout, maybe like uh, outside parts of the level, but

11:38.120 --> 11:41.180
other than that, I'm not going to really worry about it.

11:42.610 --> 11:44.200
Um, yeah.

11:44.230 --> 11:47.830
Now let's fix the stone one, and let's set up one more real quick.

11:47.830 --> 11:50.320
I'm just going to show you the result over here.

11:50.560 --> 11:53.050
This is how it is here.

11:53.050 --> 11:55.780
You can just pause the video okay.

11:55.780 --> 11:59.200
Now let's go to Assets tile palette.

11:59.200 --> 12:00.970
Let's unclick this one.

12:01.770 --> 12:03.450
Let's go to this one.

12:03.450 --> 12:04.800
Let's lock it.

12:04.800 --> 12:07.290
Let's go back to graphics terrain.

12:07.290 --> 12:11.730
Let's assign this corner over here so we can understand what is it.

12:11.730 --> 12:13.200
And for this one.

12:14.240 --> 12:14.750
Again.

12:14.750 --> 12:16.250
We could set up corners.

12:16.400 --> 12:16.820
Uh, maybe.

12:16.820 --> 12:17.960
Let me try.

12:18.890 --> 12:20.810
Could I try to do that?

12:20.960 --> 12:22.760
Okay, I'm going to try.

12:23.690 --> 12:26.330
I'm going to try because I want you to have it.

12:31.620 --> 12:33.990
Let me take it and draw some platform.

12:42.290 --> 12:45.740
Okay, let me try to do it one more.

12:46.640 --> 12:47.540
This one.

12:47.930 --> 12:49.550
I assume this one is a.

12:53.590 --> 12:54.910
Wait, which is this one?

12:54.910 --> 12:55.810
Let me throw it.

12:55.810 --> 12:57.580
I need to draw it with my hands.

12:57.760 --> 13:01.060
You see, this is super confusing telling you.

13:02.540 --> 13:04.370
So this is the top left.

13:04.370 --> 13:09.260
Okay, let's go and find the top left and do it like so.

13:10.670 --> 13:11.570
Very well.

13:11.900 --> 13:13.790
Now the top right.

13:15.820 --> 13:17.740
This is suitable for the top right.

13:18.340 --> 13:20.710
So let's click plus add.

13:21.520 --> 13:22.990
This is the top, right?

13:23.770 --> 13:25.420
And do it like so.

13:29.060 --> 13:31.400
This would be a bottom left.

13:32.570 --> 13:33.200
I think so.

13:33.200 --> 13:34.940
Let's add one more.

13:38.420 --> 13:39.410
The bottom left.

13:43.960 --> 13:44.650
Okay.

13:44.650 --> 13:45.520
Somewhat.

13:45.520 --> 13:46.570
Okay, I think.

13:46.570 --> 13:47.920
And I kinda like it.

13:48.160 --> 13:49.540
Maybe could be done better.

13:49.540 --> 13:51.400
If you find a better way, let me know.

13:51.400 --> 13:52.060
Why not?

13:52.060 --> 13:53.440
I'm happy to use it.

13:53.440 --> 13:59.830
I'm happy to use, uh, rule of the like the set of the someone who did set up for this.

13:59.830 --> 14:02.050
Okay, but this one works pretty fine, I would say.

14:02.050 --> 14:02.290
So.

14:02.290 --> 14:06.010
I don't really have a reason to be worried about it.

14:06.740 --> 14:07.220
Okay.

14:07.220 --> 14:08.630
I can use it to make levels.

14:09.250 --> 14:10.120
Nice.

14:10.120 --> 14:13.000
The rules for this one are super simple.

14:13.000 --> 14:20.350
They are just the first nine of like you can use this, this and this and this probably.

14:20.350 --> 14:23.440
And use the first nine rules over here to make it work.

14:23.440 --> 14:28.690
The same for this however, you can see they are, I would say pretty naughty.

14:28.690 --> 14:31.930
So you would have to use it just manually by drawing with a brush.

14:31.930 --> 14:32.770
Okay.

14:32.770 --> 14:34.660
Now let me erase this.

14:34.660 --> 14:38.140
Oh let me erase this and let's go to the next video.

14:38.140 --> 14:43.720
I'm going to show you how to make a level just, you know, basic setup that we'll use to test character

14:43.720 --> 14:44.920
enemies and traps.

14:44.920 --> 14:45.640
I'll see you there.
