Android Game Development Getting Started with Uniity

Android Game Development: Getting Started with Unity

Unity is a game development platform that is developed by Unity Technologies. It can be used to create 2D and 3D games for Windows, Android, IOS, and Web. Unity is a powerful engine, easy to use and it is free. In order to learn Game Development, you need to have a good hold on C# Programming Language.

It is also used in Automotive, Transportation & Manufacturing, Film, Animation & Cinematics, Architecture, Engineering & Construction, Sales & Marketing. Everything you can imagine, unity can make it possible. However, we are going to discuss “How to create games” specifically “Android Games”. From 2D runner games to 3D FPS games, you can create any android game.

Facebook Gaming App Is Releasing Today

How To Download and Install Unity?

  • Click on Unity Store.
  • Choose between Individual and Business
  • Choose the plan that you can afford, if not just go for Personal-Free one in individual.
  • Click on Sign-up.
  • Click on Agree after reading their terms.
  • Download Software.
  • Install it, don’t forget to tick Android Build Support.
  • It is now installed on your system

Now that you have Unity installed on your system, we can get started. You need to create Unity ID, just sign-up using your Google or Facebook account.

How To Download and Install Unity?

Getting Started with Unity

After Signing-up, click on Create New Project. Choose 3D in the template section, randomly assign the project name and click Create.

Now you can see an empty scene on your screen. We are going to explain the basics.

Hierarchy

This section contacts every object that is present in your scene it could be a 3D object or a 2D object. Effects, Lights, and Cameras are also part of the Hierarchy when used in the scene. Basically everything that you are using in your game is present in Hierarchy.

Project

This section contains all the files/assets and packages present in your game folder, that is being used or that is yet to be used. If you import an asset from a store or from any other place, it is imported in this section.

Project in Unity

Inspector

It provides you editable details of a Game-Object, you can add features using this section to a Game-Object. For example if you create a plane, or a sphere, you can change it’s size, shape and placement using inspector, and can add components to that game-object.

Inspector in Unity

Console

Errors, warnings, and log can be seen in the console, you can find the errors, bugs, etc in the console. Messages generated by Unity are displayed here.

Importing Assets

If you are looking for already developed assets, like characters and environments, you can download and import them from Unity Assets Store. There are plenty of free assets on Unity Assets Store.

  • Login on Unity Assets Store using the same credentials on Unity.
  • Choose the asset you want to download.
  • Click on Add to my assets.
  • It will ask you to open Unity, click open Unity.
  • Click download and then import the asset.
Importing Assets in Unity

Creating and Moving an Object

First, you need to click create on the hierarchy section, then 3D, then choose plan from there. You will now be seeing a white surface in your scene. Now place a sphere on it. Change it’s material from the inspector so you can see the sphere more properly. Place it above the plane.

Unity 3D ball.

Now, click on Main Camera from Hierarchy, and drag it near the ball so you can watch the ball in Game Mode too. Click on Sphere and generate a script in C# using add component. Add another component “Rigid Body” to it.

using UnityEngine;
using System.Collections;
 
public class PlayerController : MonoBehaviour {
 
    public Rigidbody rb;
    public float speed;
 
    void Start ()
    {
        rb = GetComponent<Rigidbody>();
    }
 
    void FixedUpdate ()
    {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");
 
        Vector3 movement = new Vector3(moveHorizontal, 0, moveVertical);
 
        rb.AddForce(movement);
    }

Use the following script, and set the speed to 10.

You can learn about how to make Roll a ball game on Unity’s official Youtube channel.

Learning Game Development Basics

Unity provides its own free courses on their website. You can access those courses from Learn Unity. Personally, I prefer Brackeys, I learned the basics of Video Game Development from their youtube channel.

Masab Farooque
Masab Farooque is a Tech Geek, Writer, and Founder at The Panther Tech. He is also a lead game developer at 10StaticStudios. When he is not writing, he is mostly playing video games