‫Now that we have our main menu, we can go ahead and work within our game scene.
‫And this scene we will need all the walls.
‫We will need the two racquets.
‫Then we will need the name of the player one and the player two.
‫And of course, the scores and very important is our ball in the middle, of course, as well.
‫So let's get started by by adding these elements into our game.
‫So far we had only the main camera, but we also need is our field.
‫So I'm going to create a new game object, which I call field.
‫And within that field we will need balls.
‫So I'm going to create another game object, which is walls.
‫So in general, what do we need in order to get started?
‫As you can see here, we need the player, one player to wall one, wall to wall three and wall four,
‫then the racket, one racket to the numbers, the ball and the middle line.
‫So as you can see, there is plenty to add to the game.
‫And we will start off by creating the walls and I will use cubes for my walls.
‫So I'm going to create a new 3D object, which is a cube, and that cube will be my wall top.
‫And as you can see here, we have our wall top here in the left hand side, but it's super small, so
‫it's really not very relevant right now.
‫Let's change that by changing the scale, for example, 1400 for our X scale.
‫And as Y scale, I'm just going to take five.
‫Now, let's drag it up to 350.
‫That will be our top wall.
‫And of course, we need a different material.
‫So far we only have the default material in there, so we will need a wide material.
‫So I'm going to create a new material and I'm calling I'm going to call that white and now let's put
‫some emission on it and make it white.
‫So now we can drag that into our wall top.
‫And you can see we have our wall.
‫Now that we have our top wall, we can duplicate that and call it wall bottom.
‫And the only thing we need to change is the Y value, which means we have to put it down.
‫So I'm just going to use -350.
‫Then of course we need two more walls.
‫So I'm going to create those wall right and wall left and there.
‫We don't need to scale up the X value.
‫So I'm going to use five here, but we need to scale up the Y value.
‫So a good value here is 670.
‫And now, of course, we also need to change the Y and the X position.
‫So the Y position should be zero and the X position is at 700 for the right wall and -700 for the left
‫wall.
‫So now let's scale it correctly as well.
‫So this is going to be five and 670.
‫How did I get those values?
‫Well, I just played around with them.
‫If you want, you can make it.
‫Or if you if you want, you can even close it here so you can close the little gap that you have here.
‫But I personally like it like that.
‫Next, let's create the middle walls.
‫So I'm just going to call them middle walls.
‫So create a new game object, create empty within our field.
‫And I'm just going to call that middle walls.
‫This will be the dashes in the center.
‫So let's create those, create a 3D object, which is a cube.
‫And I'm just going to call that middle wall one and.
‫What I would like to change here is, of course the scale as well.
‫So let's scale that to five for the X value and 100 for the Y value.
‫And now we need to drag in our white material in there as well, and we can now duplicate it.
‫So let's move it a little bit first before we duplicate it.
‫So I'm just going to move it up a little bit then.
‫Let's see, it's at 200.
‫And 81.
‫So maybe let's go with 280 for our first ball.
‫280, then the second one.
‫We'll be at 140.
‫And now let's duplicate those even further.
‫So this one will be at zero.
‫The next one will be at -140 and the last one at -280.
‫All right, so now this looks pretty good already.
‫I'd say so.
‫We have a good start.
‫Now we will need the racquets and the ball because the number and the names are part of the hut.
‫So we are going to create a hut for that later on.
‫So now let's go ahead with the rackets.
‫I create a new empty object, and I'm going to call that records.
‫And those records are cubes as well.
‫So let's create a cube three DX Object Cube, and I'm going to call it Record Player one.
‫I scale it to being 20 and for the X value 150 for the Y value and the position I set it to -600.
‫So it's here at the left hand side.
‫So now of course it also needs to be white.
‫So I drag my white material into my record.
‫Now we can duplicate that for our second record.
‫So I'm just going to call that record player two and I change the position to being plus 600.
‫So now we have our field pretty much, and I want the records to be inside the field, so I'm going
‫to drag that into my field game object.
‫Now let's save this in real quick.
‫Now, what we need next is our ball.
‫So let's create a ball.
‫Which is a new cube, and I'm going to call that ball.
‫And that cube needs white material as well.
‫And let's set that up.
‫The size for it should be 20 times 20, so 20 for the X value and 24 the Y value.
‫Now you can see the ball here, but it's not a perfect position for the ball to start at.
‫I personally think because it's a little bit too centered, it's cutting through the center line.
‫So let's move it a little bit to the side, maybe to -100.
‫All right.
‫So far, so good.
‫We have our field set up now.
‫Let's go with the HUD.
‫So let's create a UI element, which is text.
‫So let's create text which I call label player one.
‫I want the label for the player one and the score for the player one to be within one game object.
‫So it's all tidy.
‫So everything is connected if it needs to.
‫So let's call that one player one and drag the label for player one inside of that.
‫So now let's resize our whole canvas.
‫So I'm going to use screen space camera.
‫And of course, we need a camera for that.
‫So I'm going to use the main camera then as the canvas scaler.
‫I want to use scale with screen so that depending on how big the screen is, our UI will always be at
‫the same position.
‫So I'm going to scale that up to 1600 to times 900, and the screen match mode should be expand so that
‫our screen expands or our canvas expands based on the screen size.
‫All right.
‫Now that we have that, we can go ahead and move things around.
‫So, for example, our label player, one should be at the left hand, top side.
‫So let's move it there.
‫A good position for that would be 125 and 54.
‫Now it doesn't make sense because the position is not correct for our player one in general.
‫So let's position that at zero and let's change the height of our player one as well.
‫So player one canvas.
‫So this is the canvas player, one part of our HUD.
‫We change the x position to -350.
‫So it's a bit further to the left.
‫I position the y value to 300 and the width should be 700 to high 200.
‫So now it takes over this whole area here at the left hand side.
‫So we can have the text for player one here and the number here at this corner.
‫So these are just values that I played around with in order to get this size for our player.
‫One canvas object.
‫So now let's go ahead for our player one.
‫Text change to width and height variables.
‫So the width should be 250 and the height should be 80.
‫So now we can go ahead and change the text to, for example, player one.
‫Now the font size.
‫Should be higher, of course, so that we can see anything, because so far we can't see anything and
‫the next one should be the font.
‫So we had worked with Monroe already, so now we're going to work with Monroe again.
‫Of course, we still need to change the color of our text to being white so that we can see anything
‫and is the font size.
‫Of course we need to use a smaller value than the height of our text.
‫Now you might wonder why we still can't see anything that has to do with the plane distance.
‫So I'm just going to set that up to be one within our canvas game object.
‫So now that we have our player, you can see it's not at the right position and that has to do with
‫the anchor.
‫So far, the preset is to center, center, so center and middle, which means that it's centered within
‫its parent and the parent is our player one.
‫So our player one has this rectangle as its size, as you can see.
‫And within that, for now we use the center middle point and we can change that to middle left.
‫And if we do that, you can see our position x value here changes.
‫Now what I want to have is the same value that's 125 in comparison to the left hand side.
‫So that means the X position has to go to 125.
‫So now you can see that our player one is positioned just right now that we have that, let's add the
‫score label to it.
‫So we need another text and I'm going to change that one to or I'm going to duplicate Labor Player one
‫and I'm going to call that score player one and now of course we need to change the position of that
‫one.
‫So now we want it to be at the bottom right corner.
‫So the score player one should be transformed to the bottom right corner here.
‫And of course we need to change the X and Y position then as well.
‫So for the X position, I'm going to take -100 and for the Y position I go with 50.
‫Now of course, the text will be zero at the beginning and let's center the text so that it is in the
‫center of its view.
‫Now the width and height can be changed as well because we won't need that much width.
‫So I'm just going to go with 20 and 100 for the width and height, and I'm gonna center the zero in
‫its view.
‫So now it's centered, as you can see.
‫If I center it in its view in terms of height with the alignment, then that means that our number will
‫be just in the center now.
‫So the number is centered and it can grow because it has enough space to the left and to the right.
‫We could even change the font size if we feel like it.
‫So for example, it would be a good font size here.
‫I think right now that we have that for our player.
‫One, we need to duplicate that and do the same thing for player two.
‫But there will be some minor changes because now the anchor is not set right anymore.
‫So that one we will be labeled player two and that one will be square player two So let's change the
‫anchors for both of them and let's move the player to game object in general first.
‫So that one should be at 350 and now we can go ahead and change the alignment to being right for our
‫label.
‫Player two And now of course we also need to change the X position.
‫So 125 negative should be a good position for our player too.
‫And now I want the alignment to be to the right.
‫So now it should be aligned to the right.
‫As you can see now it aligns perfectly with this corner here.
‫Let's change the text to player two as well.
‫And now we only need to change the score for player two.
‫So the score for Player two now should not go to the bottom, right, but to the bottom left.
‫And of course, we need to change the X position for it as well.
‫So now we should be just fine.
‫I think we have the zero zero, we have our racquets, we have the ball, we have the waltz.
‫And in terms of looks, the game is pretty much done.
‫Of course we need to add all the functionality and that's what we are going to do in the next videos.
‫So please go ahead and try to rebuild that.
‫You can use different values, of course, as you like and different colors, different fonts, all
‫of that.
‫Have fun building the field and the scene.
‫So let's save the scene and see you in the next video.