ArticlesBlog

How to make a Video Game in Unity – BASICS (E01)

How to make a Video Game in Unity – BASICS (E01)


So here’s the step by step guide on getting started with your first video game. What you see on the screen now is what we’re going to be making through this miniseries. It’s really simple and Arcad(ey) but it’s always easy to add more gameplay elements and cooler graphics at a later point. Right now, let’s just jump into it. Let’s begin by installing unity. If you’ve already done so you can just skip ahead in the video. First we need to go to unity3d.com When we’re here, we’re going to click “Get unity now.” And we can see all of the different versions of unity. Unless you’re a really experienced developer and working in a team. I definitely just recommend the personal version you can see that it comes with all engine features all platforms Updates, and it’s Solely royalty-free So you can use it even to create commercial games the other stuff here is mostly some in the cloud Features and of course the ability to customize your splash screen So let’s go ahead and hit download now let’s also download the installer And it should be very similar on both windows and Mac go ahead and open the file You just download it so that guess and then we can just skip through the installer I’m going to choose 64-bit if you want a newer computer. You should do the same [and] this here is really neat This is our shoot to customize what parts of unity that you want to [download] because unity might be fairly large I recommend you download unity the documentation the standard assets if you’re on the windows definitely check out Microsoft visual Studio tools for unity this will give you a much better text editor Then you can of course choose the platforms that you want to export to I’m just going to select Mac and web Pl We’ll just go next choose the folder to install to and it’s going to download unity and install for you Let’s take a while. Let’s hit finish so you can see I’m using genetic [5.5] Which is currently the newest version, but don’t worry unity rarely changes things really dramatically so now we can just hit new to create a new project and a unity project is basically just a place to host all of Our code and acid, it’s pretty much our entire game before you build it Let’s give it a name and here. You can decide whether you want to build a 3D or 2D game however This is pretty much Just [going] to change the few settings inside of unity that we can change at a later point really really easily so this decision here Doesn’t matter too much for now. Let’s [just] keep that 3D Let’s pick a location for a project and hit create So is what unity looks like right when you open it up, you’ll notice that I have a dark skin for unity That’s because I’m using a paid version, but other than the color of the editor That’s not going to make any difference [throughout] the videos, so let’s begin by exploring the user interface, so in the Middle here We have this scene view you can use the mouse wheel to zoom in and out you can use the middle mouse button To pan around and if we hold down alt and left-click we can then pivot around the center of our view over here We have the hierarchy this displays all the different game objects that we have in our scene You can see here our scene is currently untitled and it has two game objects the main camera [and] the Directional light notice that when I click on an object say the main camera the inspector will display Properties for that up here each one of these collapsible things here are called components components are what makes objects do different things But we’ll get into that in a second you also have the project panel down [here] which shows all of our different game assets that We can then drag into our scene making them [appear] [in] the hierarchy you can totally rearrange Unity in any way that you would like and drag around panels and really go creative with this But remember you can always go to the top right corner and select Default and it’s going to reopen to the default layout and any window you don’t already have open you can go to window and select It from here, so let’s start building our game first off We want to create a ground plane for a player [to] stand on to do that Let’s go over to the Hierarchy [right] click You can also go [into] create and select 3D objects keep this spawns a new cube into our scene again We can use the movement controls to have a look at it We can always click the focus on it by hovering over the scene view Selecting it and hitting f now the cube currently is somewhere in our scene [and] it’s really hard to get a look at where so what we’ll do is Just go over to the transform here, right click and hit reset and that just centers it you can see the position [is] now We’re on the x 0 and the y and so you’re on the set and gives it a scale of one by one by one Again [hit] f to focus on it So if we go into a game view we can now see our cube through our camera if we want we can take our game View here and dock it to the right so that we can see both our scene and the game view at the same time then We can take our camera here, and we can readjust its position and you can see that updating in real time I’m just going to press ctrl z to undo that and then going to select the cube and scale it up Let’s give it a scale of 15 on the x we keep it at 1 on the y and give it say 100 on the z if we zoom out now we can see just how huge this ground plane We can then go and rename it to ground and we can simply drag on the blue arrow Here to move it over something like that [just] so it starts about at the same point as our camera, then let’s create another object So [right-click] go 3d object and then cube again let’s reset the transform so it’s centered on the scene We can then drag on this green arrow to move it up [let’s] again hit f to focus on it, and we can see that We now have [our] new Cube here standing on the ground this cube is going to be a player So let’s go ahead and rename him to player and it’s also make him a bit more visible because right now everything is pretty boring White to do that We need to assign a material to our player And we create a new material in the project panel let’s right click down [here] Go create and then material will name this material our player and then matt foreign material, but that’s optional that’s it enter now We can adjust different properties on this material stuff like how Metallic it should be the smoothness of the material and the color up here So we’ll make this some kind of bright [red] and what we can do is then simply drag our player [matte]? Onto our Cube And you can see it Updating in real-time [so] simply let go and it’s applied and any changes that we now make to this material are going to update For our player. I think our camera is a bit far [away], so let’s also select our camera and move it a bit closer Again, we can move it over by simply dragging on this arrow Move it up a little bit and that looks a lot better So now if we were [to] hit play and actually run our game not much happens That’s mostly because we haven’t done any [programming] yet, and so we can’t really control the player But we also need to add some physics into a game right now if we exit play mode take our player Drag him up here, and hit play again. He’s just [going] to float in the air He’s not falling down [the] reason why is that we need to tell this game object to interact with the unity physics system to do That we go out of play mode and add a new component in our case. We want to add the physics Rigidbody component Now when we hit play we should see that our cube falls to the ground and indeed It does right now it falls in a bit boring way So let’s try and rotate our cube a bit to make [it] more interesting to do that We switch to the rotation tool notice how all of the different tools are up here right now. We have the move tool [selected] We can also shift to rotate scale And then this one is [for] manipulating 2D graphics which allows you to easily do all of the different [things] at the same time [you] Can always switch between these really quickly by using? Q w R and t so we’re going to press each Rotate and I’m just going to kind of rotate it in a random way here So if we now hit play he’s going to fall down and we can now see that he has a lot more Advanced physics applied than we were able to see before so I’m just going to undo that Rotation by pressing control bit and I’m also going to move him down here We can also try duplicating him, so let’s press cTrl d to Duplicate let’s move this one up and over a bit and see how they [interact] with each other awesome So one really important thing to understand is what is making these objects behave this way and the answer [is] of course Components, so if we now exit out of play mode and select the player here We can see that he has all of these different components the first one is something that you will see on all game objects called the transform component which just keeps track of where the game object is in space, how it’s rotated and its size you can see we can adjust all of these and The game object will be adjusted accordingly and also if we go ahead and drag on the game object you will see the transform component Updating the rest of them though are all optional we have the mesh renderer down here Which is responsible for drawing the object on the screen then we go ahead and disable that it’s actually going to disappear It’s still in here You can see it’s still in the hierarchy and it still has this green box, and we can move it around But until we enable the mesh renderer It’s not going to be visible then of course we have the box collider Without this we wouldn’t be able to collide with [all] the objects if I go ahead and disable the box collider And then hit play this should just fall [through] the ground But if we then go ahead and re-enable the box collider you can see that It’s now able to Collide with everything so remember to get realistic physics We both need a collider and a rigidbody and in order to see it. We need a mesh renderer I of course skip the mesh filter up here. That’s not because it’s Super advanced It’s just that this is only responsible for a very simple thing and that is choosing the [shape] of object right now You can see it has two cube selected. We can easily go in here and change it so we simply click on the little bowl here then we can change it to a capsule a Cylinder a plane a sphere and so on you will notice that it’s distorted, but that’s just because we messed around with the scale so we Change that to 1 and you will notice now that It’s a sphere of course a box collider is still a box so if we want this to behave like a Few years We’ll need to remove the box Collider So [right-click] [a] remove component and instead add a sphere Collider and notice how I’m just using search here that just makes things a lot easier [so] let’s just [enter] that and you can see now that it has the sphere collider So if we go ahead, and hit play it acts like a sphere And this is of course more noticeable if we move it over So that we can see it hitting the box and it’s going to go and roll off our ground plane Another thing is you can also adjust values while [plane] we could take our player here And we’re still playing and move them around it might be a bit buggy sometimes when using the physics system But we are able to do it We can even go in here and say disable the ground plane [or] three different stuff like that But just know that any Adjustment that you make while in the game and running are going to go back as soon as you quit playing so make sure not To do any important adjustments while playing or at least remember your settings [oils] You’re just going to have lost progress, so the final thing I wanted to do is just delete the [bowl] here And maybe make this a bit prettier by changing our [sky] [box] to do that We go and select our main camera and as the [skybox] here we’re going to change it to Solid color and let’s make the color here a very wide grey not the most exciting thing in the world But I think it looks pretty simplistic and cold by the way the way I just maximize the game view here is something you’re going to see me do a lot of times That’s by hitting shift space finally to save your game We can go ahead and hit [cTrl] s or command [s] if you’re on the Mac or go to file/save Seems that we need to name our seen something and seems in unity are basically just Levels so we’ll just go ahead and call this one level one and Hit save you can see now that the scene appears down here in the project panel if we had multiple scenes We would be able to shift between them by simply double-clicking to load that level up So that was pretty much all of the handy tips that I could fit into this video I know some things are probably really confusing but really the best way for you to learn some of this stuff is by just messing Around with it yourself and then of course in the next video We’ll delve into some actual programming that was pretty much it for this video hit the subscribe button to be notified The new video comes out I upload Sundays and Wednesdays [and] of course if you’re a fan of the channel you can always support me over at Patreon Patreon calm [Stash] [brackets] So thanks for watching and I will see you in the next video Thanks to all the awesome patreon supporters who donated in December and a special thanks to Sultan [Al] [sharif] [Derrick] James Kirk [Face] Tamara phi James Callaghan Robert Barnum and Jason Lotito if you want to become a patron yourself you can do so at patreon.com slash [bracket]

Comments (100)

  1. Hope you guys like the video!

    There is a poll towards the end on what programming language you would like me to teach – JavaScript or C#. Both languages can be used to make awesome games. JavaScript is considered easier to learn for complete beginners however Unity has shifted heavily towards C# lately (their premade assets, documentation and tutorials is all in C#). C# is my personal favorite but I started in JavaScript so things can quickly change! I will leave the decision to you guys!

    Oh and thanks for all the support on the last video, it makes me excited to bring you more! Remember to share the video if you think it's worth it 😉

    I'll see you in the next one!

  2. Java exist…unity: ima end this man’s whole career

  3. @Brackeys Is Unity version 5.5 still good? I am not sure what Unity version to get there are the two LTS version 2017 and 2018 so I am confused to which one to install.

  4. Is it possible to learn how to create a game at 21 years old…? I don't even know if I need to learn coding…

  5. is it only my cube that goes up…

  6. Watch my gameplay of Unity's Unwind (hardest unity game in my opinion). Do subscribe for more content related to mobile gaming. Thanks. Link given below :
    https://youtu.be/8mtjJRtF52o

  7. Lol i got an ad on how to learn unity

  8. What is best C# or java script

  9. Fucking love this man, I'm new to unity and I've scripted a bit on roblox.. (Yeah I had to start somewhere) and I want to get into real programming, I'm rn doing computing science and hope to continue doing so (I'm not a big fan of math but I still pursue to become better).

  10. When ever I press new it says I need to install unity but I followed the steps

  11. I encounter an error that says "Creating Project folder failed". How do I fix this to start making.

  12. Just curious, how much money do make from making games

  13. man i love the internet there is so much free knowledge out there

  14. Am i the only one who thinks learning unity is hard?

  15. Could you please make a video about vr?

  16. Uhhh i don't have the programming thing. I do have unity but not the program thing to code with, is that a glitch or do i download it separately

  17. really helpful but i should mention that you are super cute)

  18. thanks for the help

  19. i got thsi problem i cant move my camera and anything

  20. I'm Confused, im using unity personal, acer aspire. My objects are blurred at game scene. Is this normal because of my laptop's performance or a disadvantage of unity personal?

  21. I wanna add a shop system and make player enable to purchase skins.(sorry for my bad English)

  22. Why when i open the installer give me a mensage: 64 BITS REQUIRED.
    Sry for english

  23. Cool video! Excited to get started with Unity. I noticed that Unity Hub comes with a couple of templates you can work on but I'd rather follow tutorials like these where you learn to build everything from scratch. On to the next part!

  24. Does anyone know how to get the shadows and the nice sky backround? everything defaulted to plain gray for me with no lighting or anything

  25. Kya me python se game bana skta hu unit

  26. At first I tried this on Unity 5, but bcoz of my RTX 1080i , I had to download Unity 4
    sadness noise

  27. Can I do it if I’m on a IPad?

  28. MY CUBE IS GOOING UP HELP

  29. Hi, can I create a game with my friend at the same time in unity, I mean online or something like when we work together on the same file at the same time and see each other's changes?

  30. I love unity but my pc is potato and for now I use Construct

  31. does any projects use structural programming?

  32. all these kids in the comments that are going to give up in 1 day XD

  33. finally a channel that explains things while showing them
    as someone who's a complete beginner to coding, this helps a bunch! thanks for the video!!

  34. The installation of unity is MUCH different now. You now have to install unity hub and you add unity to it. It is also no longer using a wizard to allow you to select which addons for unity you want.

  35. I've been watching your videos for years and either this year or next year I'm going into game design for full sail university thanks for the wonderful videos

  36. Reminder : This is not the beginner friendly tutorial, you find him change something drmatically :xD, to follow this series – you must have the basic idea of 3d view port.

  37. anyone else hear someone else typing at a keyboard in the background

  38. please we need the translation arabic

  39. Unity basics Tuto :

    https://www.youtube.com/watch?v=-wqioCzBiGU

  40. I mainly wanna know how to trigger actions on unity

  41. brackeys: …and let's make him a bit more visible because right now everything is pretty "boring white" 4:53
    everyone in 2019: that's racist

    also everyone in 2019: that's sexist

  42. Hey experts. Would you think that Unity would be a good engine to use to create a game like TES3: Morrowind? Or would you say Bethesda's engine is better for something like that?

  43. I want to do something, i was going to start and focus in UE4 but if you recommend Unity before, well i guess the more you learn the better…

  44. why not use plane for the ground?

  45. This is my first experience in unity should I start from here ? Because I saw many unity courses in your channel

  46. wow its nice video
    thanks

  47. Thank you! Starting Unity, will definitely be my jump start, and what will actually interest me in Unity. Trying to make games and this will help me! Thank you!

  48. I have useed unity for a couple of months. And out of no where a message came up and said that i needed a license for my visual studio 2017. That my 30 day trial has expired when i have used it for like 4 months. Pls help

  49. Am i allowed to publish some of this code in my own game? Or is that not allowed? Please answer me

  50. hey!! your video was very helpful to me. but I am facing a problem : [
    actually, my main player is falling down continuously instead of falling on the stage, when I add rigid body component. how can I overcome that ??

  51. Thank you soo much i am so excited to make my first videogame!

  52. He is talking way to fast

  53. Hello everybody . I'm 13 years old and I really love programming. I learned how to write codes using Brackeys lessons. I recently posted a video where I created a Minecraft in Unity 3D but it is gaining little views. I spent a total of 10 hours on video, including editing.If you want, look at it and evaluate it adequately https://www.youtube.com/watch?v=BofvAhiRndg

  54. im going to make Terraria come to life

  55. Subbed , great video !

  56. I have unity version 2917 wonder if this tutorial will work

  57. that look like roblox studio

  58. finally I downloaded unity.

    looks like an achievement. Thanks for help
    I didnt check visual basic download.
    how can I download now? or do I have to download everything again to run smoothly

  59. omg i love you have my babies plssss

  60. can i download with windows 38bit

  61. wheni try to go to the projects tab unity crashes for me

  62. Today I'm starting to learn unity and i want to make a game to publish on android. I'm very excited about that 😀
    Wish me luck guys!

  63. I love your videos OMG keep going man.

  64. https://www.youtube.com/watch?v=3Rl2Ycn2jKk Full Unity Free Course for 2D

  65. Add more ads Brackeys so you can have more support. I can't help you in patreon but I can watch ads.

  66. I remember doing this 2 years ago lol I'm still trash

  67. https://www.youtube.com/watch?v=w4V7BQVhIsA&t=1362s

  68. I would install it on my laptop it's not as huge as other engines : P and it does not require that much resources no idea?

  69. This is one of the better tutorials I've seen online in general. Very elementary and well explained.

  70. Great work ! I also found this video..while learning…. very informative ….https://youtu.be/sOUwrtZnvOI

  71. Will this work for mobile games

  72. my cube just falls through the platform I made

  73. need help creating a 2d game, most profitable game..
    contsct me: [email protected]

  74. I manage to do it with my potato laptop…I just need to wait every 20 seconds to go on game mode :3

  75. Sir, I am beginner so what I do first

  76. WOo! This is scary, I'm rewatching this video and I'm about to begin making my first game (or just the start anyway). The files and stuff haven't downloaded yet and I'm already scared as heck. PFooO! Wish me luck everyone.

  77. i love your tutorial ! thank you

  78. cool I cant wait to play my own game!

  79. watching though this series second time today cos I wasnt making it first

  80. also if the axies around the cube arnt showing for u they didnt for me press W

  81. I learn so musch! thanks better i learn from my teacher in two months I got nothing

  82. When I download Unity it just downloads a bunch of empty files and does not download unity.exe

  83. how do you update your game if its published. like update with new weapons,items,styles???

  84. im terrible at this

  85. Untitty is trash because it gives it's users the will to commit suicide because it's a fucking pain to use

  86. For people who asking how have the black theme free it's impossible (legaly) because it's in the pro version
    But if you search you can find how have it with personnal version 😉 (Buuuuut you can have a year in prison to modify the software so….)

    I'm not responsible for what you do, but I'm still warning you

  87. Me made ball roll down ramp
    Me happy

  88. im starting to learn this now, im a senior and its not too late right?

  89. mine say generate lightmap uv what is that, and how do i get around that?

  90. My computer is not powerful enough to do this, it is so slow.

  91. what's the difference in using a 3d object as a playing surface as opposed to a terrain object?

Comment here