1 00:00:00,757 --> 00:00:03,043 We can start setting up the level. 2 00:00:03,400 --> 00:00:06,386 To do so, we're going to add rooms. 3 00:00:06,560 --> 00:00:10,957 We split our game levels, our game world, 4 00:00:11,271 --> 00:00:14,443 into chunks that we call rooms in this project. 5 00:00:14,871 --> 00:00:18,286 To find the rooms, you focus the Search Files bar, 6 00:00:18,700 --> 00:00:19,669 type room, 7 00:00:19,670 --> 00:00:22,886 and we're going to fold the entrances directory, 8 00:00:23,100 --> 00:00:25,471 which has only the room entrances. 9 00:00:25,829 --> 00:00:30,171 We prepared four rooms for you, Room A, B, C, and D. 10 00:00:31,186 --> 00:00:33,680 Still with the main node selected, 11 00:00:33,710 --> 00:00:39,943 you're going to click and drag RoomA.tscn, on to the game view. 12 00:00:41,200 --> 00:00:44,440 This is going to allow you to navigate it, 13 00:00:44,470 --> 00:00:45,880 so you can press F5. 14 00:00:46,114 --> 00:00:48,814 Now when you play and press W, A, S,D, 15 00:00:48,957 --> 00:00:52,457 the character is going to move around the room. 16 00:00:53,186 --> 00:00:55,960 You can press F8 to stop playing. 17 00:00:56,757 --> 00:00:58,920 Now we can place other rooms. 18 00:00:58,950 --> 00:01:03,040 So you can click and drag and place Room B to the right of this one. 19 00:01:03,314 --> 00:01:07,920 Use the mouse wheel to zoom out of the view. 20 00:01:08,214 --> 00:01:12,443 You can also use the buttons up there in the top left, minus and plus. 21 00:01:13,643 --> 00:01:15,680 Then we're going to click and drag Room C. 22 00:01:15,886 --> 00:01:18,560 This one goes above the other one. 23 00:01:18,590 --> 00:01:20,800 We'll move it up in a second 24 00:01:20,830 --> 00:01:22,880 and we're going to click and drag Room D, 25 00:01:22,910 --> 00:01:26,886 which is going to be somewhere around here below the other rooms. 26 00:01:28,357 --> 00:01:33,760 As I told you, we want to move the Room C that we misplaced, up here. 27 00:01:33,790 --> 00:01:35,329 One thing we can do is 28 00:01:35,330 --> 00:01:38,040 click to select the node in the scene dock, 29 00:01:38,357 --> 00:01:40,600 and then we're going to select the move tool 30 00:01:40,629 --> 00:01:42,986 in this toolbar at the top. 31 00:01:43,629 --> 00:01:45,960 The move tool is right here, the move mode, 32 00:01:45,990 --> 00:01:49,929 and then you can click and drag anywhere in the view to move the room. 33 00:01:51,114 --> 00:01:53,229 We actually have a little problem. 34 00:01:53,629 --> 00:01:59,657 We need the rooms to align pretty perfectly to a game grid 35 00:02:00,143 --> 00:02:02,686 for us to connect them with bridges. 36 00:02:03,257 --> 00:02:04,480 I'll show you that. 37 00:02:04,943 --> 00:02:07,180 I'll explain how this works in a second. 38 00:02:07,210 --> 00:02:09,160 But if I try to draw bridges, 39 00:02:09,190 --> 00:02:12,960 you're going to see they are not aligned with the room entrances. 40 00:02:13,257 --> 00:02:14,760 How do we get them to align? 41 00:02:14,986 --> 00:02:19,786 Well, I'm going to select the main node and activate the editor grid. 42 00:02:20,329 --> 00:02:25,840 To do so, you go to the toolbar and you're going to use this icon, Use Grid Snap. 43 00:02:25,870 --> 00:02:27,729 You can also press Shift G. 44 00:02:28,757 --> 00:02:30,680 There you can see the grid appear. 45 00:02:30,710 --> 00:02:33,520 The grid is a bit too fine for us. 46 00:02:33,714 --> 00:02:35,699 We want something a bit larger, 47 00:02:35,700 --> 00:02:38,280 so we're going to change its configuration. 48 00:02:38,714 --> 00:02:45,386 To do so, click the three dots next to the grid icon and go to Configure Snap. 49 00:02:46,814 --> 00:02:49,000 You're going to change the grid step. 50 00:02:49,030 --> 00:02:52,240 It's set to eight pixels by eight pixels. 51 00:02:52,270 --> 00:02:55,586 We're going to change it to 64 pixels 52 00:02:56,314 --> 00:02:59,700 by 64 pixels and press Enter, 53 00:02:59,843 --> 00:03:02,680 then click the OK button to confirm the changes. 54 00:03:02,971 --> 00:03:05,880 You can see the grid steps become wider. 55 00:03:06,329 --> 00:03:09,057 Once we have that, we're going to select the rooms 56 00:03:09,314 --> 00:03:12,614 and then press the W key or select the move tool 57 00:03:12,786 --> 00:03:16,560 to move our rooms to align with the grid. 58 00:03:16,957 --> 00:03:19,357 I'm going to start from B, do the same 59 00:03:19,729 --> 00:03:24,040 and make the entrances align between the two rooms. 60 00:03:24,429 --> 00:03:28,600 That will allow us to draw a direct bridge between the two. 61 00:03:28,900 --> 00:03:33,171 Then I'm going to select Room C and try to align it. 62 00:03:34,014 --> 00:03:36,780 It can be slightly misaligned, 63 00:03:36,810 --> 00:03:42,440 but we need to be able to create a bridge going from one to the next. 64 00:03:42,470 --> 00:03:47,040 Even if there are some turns, it needs to align to the general grid. 65 00:03:47,371 --> 00:03:52,560 Then the Room D, we're going to move down right there. 66 00:03:52,590 --> 00:03:54,457 It should be, it should be fine. 67 00:03:55,871 --> 00:03:57,840 I'm going to move it up a bit. 68 00:03:57,870 --> 00:04:01,514 You can change that and tweak that later anytime, actually. 69 00:04:02,986 --> 00:04:05,400 We have some rooms in there. 70 00:04:05,430 --> 00:04:07,280 I'll let you do the same. 71 00:04:07,310 --> 00:04:09,200 Rewind the video if you need. 72 00:04:09,714 --> 00:04:12,786 Then we want to connect them with bridges. 73 00:04:13,536 --> 00:04:16,840 To do so, we have a node called bridges. 74 00:04:16,860 --> 00:04:20,486 As was seen, it's what we call a TileMap. 75 00:04:20,786 --> 00:04:23,120 This game is made with TileMaps. 76 00:04:23,371 --> 00:04:24,629 The levels, at least, 77 00:04:25,014 --> 00:04:29,027 those are grid-based level creation systems 78 00:04:29,227 --> 00:04:32,480 that reuse square textures. 79 00:04:32,510 --> 00:04:37,280 We use small texture chunks that we repeat next to one another. 80 00:04:37,771 --> 00:04:40,200 If you select the bridges node 81 00:04:40,220 --> 00:04:45,000 on the right side, you will get some palette that you can choose from. 82 00:04:45,030 --> 00:04:47,720 You can draw the floor, grass, walls. 83 00:04:47,750 --> 00:04:50,080 But what we want really is to draw bridges. 84 00:04:50,100 --> 00:04:51,714 So we're going to select that 85 00:04:52,314 --> 00:04:56,800 and then click and drag to draw bridges and connect the rooms. 86 00:04:57,086 --> 00:05:02,040 You can click drag, and you're going to connect the rooms that way. 87 00:05:02,070 --> 00:05:04,000 Left click and drag, by the way. 88 00:05:04,414 --> 00:05:07,343 Right, and you want to connect them. 89 00:05:07,714 --> 00:05:10,120 If you have chunks that go on the side, 90 00:05:10,150 --> 00:05:15,157 you can right click and drag to erase the cells that you drew. 91 00:05:16,471 --> 00:05:21,600 Then we're going to left click here and drag to connect to the starting room 92 00:05:21,630 --> 00:05:23,900 and we can overlap a bit on the grass. 93 00:05:24,800 --> 00:05:27,457 You will see that some bits look a bit off. 94 00:05:29,614 --> 00:05:33,520 The the tiles, the drawing adapts to the corners that we have. 95 00:05:34,029 --> 00:05:36,760 If we're drawing a horizontal or vertical bridge, 96 00:05:37,100 --> 00:05:40,604 but in some cases it draws the wrong chunk, 97 00:05:41,286 --> 00:05:42,560 we need to correct that. 98 00:05:42,814 --> 00:05:45,560 To do so, we keep the bridge selected 99 00:05:45,590 --> 00:05:49,500 and we click the Disable Autottile check box. 100 00:05:50,100 --> 00:05:53,120 This will give us a secondary palette, 101 00:05:53,150 --> 00:05:58,080 which lets us select a single bit of the bridge to draw. 102 00:05:58,386 --> 00:06:02,800 You have the one in the top right, that's going to be the horizontal chunk, 103 00:06:03,029 --> 00:06:05,988 and the one in the center bottom, the one before last, 104 00:06:06,371 --> 00:06:08,171 that's going to be the vertical one. 105 00:06:08,172 --> 00:06:09,920 I'm going to select it by clicking it, 106 00:06:09,950 --> 00:06:16,086 and then I click left click where I have the wrong bits in my map. 107 00:06:16,843 --> 00:06:21,400 The vertical ones, I'm going to click on this one, and then these two. 108 00:06:21,614 --> 00:06:26,560 Perhaps I can add one chunk of bridge that goes into the room there. 109 00:06:27,029 --> 00:06:30,520 Then I want to do the same for the horizontal ones that are off. 110 00:06:30,540 --> 00:06:35,571 So I'm going to select the horizontal chunk and click here and there. 111 00:06:36,500 --> 00:06:39,786 At the bottom, I also have this one that's not correct.