1 00:00:00,000 --> 00:00:02,872 Now we want to move, perhaps our player 2 00:00:02,933 --> 00:00:05,360 not to start in that top left corner there. 3 00:00:05,390 --> 00:00:08,078 So we can select the player in the Scene Dock, 4 00:00:08,386 --> 00:00:11,457 select the Move Tool in the toolbar and click and drag 5 00:00:11,743 --> 00:00:14,967 to move them somewhere else, maybe closer to that bridge 6 00:00:15,011 --> 00:00:16,440 or to the center of the room. 7 00:00:17,200 --> 00:00:22,743 Then press F5 and use the W A S D key to move. 8 00:00:23,033 --> 00:00:25,086 You can start to attack the enemies. 9 00:00:25,087 --> 00:00:27,889 When you enter a room, it closes, etc. 10 00:00:28,756 --> 00:00:29,920 You can play the game. 11 00:00:30,233 --> 00:00:32,840 One problem is it looks really empty, right? 12 00:00:32,870 --> 00:00:36,400 That purple background is not looking too great. 13 00:00:36,743 --> 00:00:40,600 We want to add perhaps some kind of sky to the game. 14 00:00:40,989 --> 00:00:41,640 We have one. 15 00:00:41,670 --> 00:00:43,967 So you can select the Main Node, 16 00:00:44,412 --> 00:00:45,960 and in the search bar, 17 00:00:45,990 --> 00:00:50,433 you're going to look for "sky", and you'll find the BackgroundBlueSky. 18 00:00:50,711 --> 00:00:53,811 This one we can drag and drop onto the scene. 19 00:00:53,833 --> 00:00:57,040 You can see it snaps immediately in some place. 20 00:00:57,256 --> 00:01:01,156 You can release the key to add it behind the rooms. 21 00:01:01,756 --> 00:01:05,344 And there you have the sky with some parallax happening. 22 00:01:05,400 --> 00:01:10,089 You can see the islands in the background that scroll at different speeds. 23 00:01:10,730 --> 00:01:12,800 All right, what else are we missing? 24 00:01:13,000 --> 00:01:16,867 Well, we have something called the UILayer up there, 25 00:01:17,300 --> 00:01:20,089 and we might want a life bar for our character. 26 00:01:20,356 --> 00:01:21,719 It can take damage, 27 00:01:21,767 --> 00:01:24,911 and you can see a "game over" if you lose your health, 28 00:01:24,944 --> 00:01:27,069 but you don't see your health which sucks a bit. 29 00:01:27,070 --> 00:01:31,713 So in the search bar, we're going to look for "health", 30 00:01:32,689 --> 00:01:34,200 and I think it's "healthbar". 31 00:01:34,244 --> 00:01:37,400 We start to type that, and you can click and drag it. 32 00:01:37,430 --> 00:01:41,880 This time we're going to drag it onto the screen. 33 00:01:41,910 --> 00:01:44,880 We want to be a bit careful in how we do that. 34 00:01:45,171 --> 00:01:50,343 So you can see the green and red arrows there, 35 00:01:50,614 --> 00:01:54,440 they define the origin of our game world. 36 00:01:54,729 --> 00:01:59,368 And where we place the health bar is going to be where it will appear 37 00:01:59,400 --> 00:02:00,760 on the screen. 38 00:02:00,760 --> 00:02:01,900 So we want to place it 39 00:02:01,901 --> 00:02:04,271 pretty close to that point in the top left. 40 00:02:04,714 --> 00:02:06,471 It will snap to the grid. 41 00:02:06,986 --> 00:02:09,800 So you do want to select the UIHealthBar 42 00:02:10,000 --> 00:02:12,657 and perhaps turn off grid snapping 43 00:02:12,857 --> 00:02:16,076 and move it a little bit away from the corner 44 00:02:16,471 --> 00:02:19,880 so that when you play the game, you can see it appears, 45 00:02:20,086 --> 00:02:25,760 it's not tucked against the screen edges, but it appears separated from them. 46 00:02:25,780 --> 00:02:26,280 All right. 47 00:02:26,310 --> 00:02:32,157 And now if you go take damage, you're going to see your health goes down. 48 00:02:32,871 --> 00:02:38,640 Next up, we want to add, perhaps some things to our room. 49 00:02:39,272 --> 00:02:41,929 Room A right now is a bit empty. 50 00:02:42,100 --> 00:02:44,360 Perhaps you want to add some things 51 00:02:44,390 --> 00:02:47,900 that you have in other rooms, like monsters, statues? 52 00:02:48,000 --> 00:02:52,320 Well, maybe not statues, but chests, entrances, those kinds of things. 53 00:02:52,350 --> 00:02:53,471 So let's do that. 54 00:02:54,143 --> 00:02:59,560 To do so we're going to have to open our room scene and add things to it. 55 00:02:59,590 --> 00:03:03,040 And you're going to see it looks very much like our main scene. 56 00:03:03,443 --> 00:03:05,520 So select the RoomA and you're going 57 00:03:05,550 --> 00:03:09,080 to click the Open in Editor icon to the right of it. 58 00:03:09,329 --> 00:03:14,214 Any change you make here will also appear in the main scene. 59 00:03:16,015 --> 00:03:18,914 So once again, we're going to clear our search bar, 60 00:03:19,043 --> 00:03:21,229 and we're going to look for "pickup". 61 00:03:22,100 --> 00:03:25,640 And perhaps we want to give the player, I don't know, a health pickup. 62 00:03:25,929 --> 00:03:29,876 So you can click and drag the HealthPickup.tscn file, 63 00:03:29,957 --> 00:03:32,871 and you can place it wherever you want in the room. 64 00:03:33,857 --> 00:03:36,880 You can create multiple ones. 65 00:03:37,143 --> 00:03:42,280 Just be sure that you have the root node, the RoomA node, selected when you do so. 66 00:03:42,457 --> 00:03:45,629 So the health pickups appear as children of it. 67 00:03:46,357 --> 00:03:48,543 And perhaps you want to add a chest, 68 00:03:48,544 --> 00:03:53,986 so you can look for "chest" in the search bar and click and drag Chest.tscn 69 00:03:54,129 --> 00:03:55,943 and place it near a wall, 70 00:03:56,043 --> 00:04:00,600 over the grass, or on those rocks in the middle, whatever you prefer. 71 00:04:01,943 --> 00:04:05,080 Then you can save by pressing Ctrl+S. 72 00:04:05,471 --> 00:04:07,400 And when you go back to the main scene, 73 00:04:07,429 --> 00:04:10,700 you can see in the room our pickups appeared. 74 00:04:11,657 --> 00:04:17,729 So this gives you a sense for how you nest those scenes into one another. 75 00:04:17,957 --> 00:04:20,120 You go work on one room, 76 00:04:20,414 --> 00:04:23,557 and within that room, you're going to place some pickups 77 00:04:23,558 --> 00:04:24,657 or some little things, 78 00:04:24,658 --> 00:04:26,899 and you're going to work on those separately. 79 00:04:26,900 --> 00:04:32,586 And once you save, everything exists in your main game scene.