DEV Community

Abdulmuqadim
Abdulmuqadim

Posted on

How To Make A Game With Unity For Beginners

How To Make A Game With Unity For Beginners

To start we have to cover the user interface . In the center of the screen,there is something called the scene view . What scene view means is everything including the stage that the designer works on that you could see very well . On the second bar,there is the Game window that is basically what the camera sees.In the scene view there is a small camera that is seeing everything the game designer does . On the left,there is something called the heirarchy and it is basically like an inventory list . The scene view has a lot of stuffs with icons and items and the hierarchy is a list of that view and it is also a colapsable list . The hierarchy consists of the main camera and the directional light . If you click anything on the hierarchy it will also select it in the scene view . At the bottom,there is something called the project window,it is being splited into two parts,on the left side,we have a folder view and on the right side,we have a bunch of icons . On the right side of the screen,there is something called the inspector and when you have something selected in the scene view or in the hierarchy then you will have some stuffs for the object you have selected in the inspector . It is more like a magnifying glass that zooms in on an object and you can change values in the inspector .

         To start to make a game in Unity,you have to go to the hierarchy and right click then scroll down to 3D objects . Game objects are collections of a transform and components that you can add to the game . Unity's coordinate system is working with X,Y,Z . Z is for moving the object forward which is the blue arrow. To rotate the view,you hold the alt key and the left mouse button . The top left of the hierarchy we have a toolbar consisting of the move tool,rotate tool and scale tool . Anytime the object on the scene view is changing positions,this changes the value in the inspector . A transform is the position,rotation and scale of a game object . When you create an object,not only does it add the transform automatically but it also have a bunch of components . It,s got something called the mesh filter which is telling the graphics card what type of a mesh it should render which is responsible for telling the graphics card hoe to render the mesh . There is also another thing on the inspector called the box collider . A collider is telling physics engine how it should be interacting or how it should be colliding with other objects on the scene . To rename the object on the hierarchy,you have to click f2 to rename . To create a material for the game,you go to project window and click on assets . You then right click,scroll up and create a new folder,then name the folder "Material" . To create a material,you go to your folder named Materials then open it and right click,then scroll up to create . When you click create you have to click on materials because we want to make a material . The F key on the keyboard focouses on the material or object on the scene view . To duplicate the object,you press Ctrl + D . Zedfighting is when the graphics card is trying to render surfaces in the same location on one plane and it does not know which to pick .
Enter fullscreen mode Exit fullscreen mode

PREFABS

What is a prefab?

A prefab is a prefabricated game object . To create a prefab in your game,you go to the project window to create another folder and rename it "Prefabs" . If you click on the 3D object you have already created and drag it to the prefabs folder,then you have made your first prefab . Then after dragging the object to the prefab folder,it would turn blue on the hierarchy . That is how Unity would tell you that a prefab has been made created . Then you drag the prefab to the scene view to create another of the 3D object on the scene . When making a game,you have to reduce the number of colliders if you can,for two reasons :

  1. Performance

  2. It makes it less complex to work with

This article is written by Abdulmuqadim Abdulsalam. Abdulmuqadim is 13 years old and the assistant group head of Platinum I Tech group at IQ Academy Bodija Ibadan. He is an aspiring Game Developer.

Edited by Rasheedah Obabunmi. Rasheedah is a Professional IT Instructor and the Head of Schools at IQ Academy. This project is powered by #OneAppADay.

Top comments (0)