Game Development with Unity

Published on . Written by

Game Development with Unity

In this tutorial, we are going to develop a simple 2D game using Unity. The best way to learn game design is just to start directly with it. By working on this game development project, you will learn to create scenes and levels for a game. And also to control players and enemies that are available in your game. 


Skyfi Labs Projects
Unity is a cross-platform game development engine used to develop 2D and 3D games. It is a powerful tool and provides an easy to use interface for users. You can also use C# programming, Java, Boo to develop games in Unity. Along with this unity also supports VR and AR thus you can develop various games for multiple platforms. 

Read more..

SLNOTE
Overview

In this game development project using Unity, we are going to develop Roll a Ball game. So you will set up the game environment using unity editor and its built-in capabilities. Next, you will create the game functionality by writing your own custom scripts. Finally, you will improve the game experience by creating a basic user interface and developing the game. 

Project Implementation:

Create a project - Open Unity 3D, Click File>New project. Select the location where you want to save the project and click create. 

If you want you can customize the layout based on your requirements. Before starting the project let's discuss some important windows. 

Scene window - This is the window where the game creation happens. Here you can see the game elements and where it is related to. You can also find the spatial orientation of the scene at the upper right corner. 

Game window - This window displays the main camera view while playing the game. You can test your game in this window by clicking on the play button.

Hierarchy - Here you can see all the listed elements that are added to the scene. By default, this is the main camera. You can also create elements using the Game object dropdown menu.

Project - It displays the files used in the game. Using the project window you can create scripts, folders, etc.

Inspector - Here you can customize the aspects of each element. You can do this just by selecting an object in the hierarchy window that displays the attributes in the inspector panel. 

Save the scene and set up build: 

Click file and save the scene. Now click file > build settings. Select the platform for which you want to develop the game. For example, Web players, PC, Linux, Mac, etc. 

At the bottom of the build settings window, you will see player settings. Use this option to change the company name, game name and the default icon. 


SLLATEST
Create the stage: 

You can easily create the stage in Unity by simply adding the cubes. 

Create the player:

Using Unity Store you can download the characters from online. But to develop this game we are going to use the built-in game objects.

Create physics for the player.

Make the player more around:

Clear up the workspace by minimizing the components. Use the CSharp language and write the code to move the ball. Now you are able to move the ball using the ASWD arrow keys. 

Add Lighting:

Using the hierarchy panel creates the lighting for your game. Also, correct the shadows.

Set the camera angle and make it follow the player: The camera should be angled down towards the platform. Add the script to follow the player. 

Create the game items, score and hazards: Create a new game object then name it as the item and place it around the platform. Next, write the script to score when a player collects an item. Also, write the script for hazards to instruct the player. Similarly, position the hazards around the platform and now the game is ready. 


SLDYK
Kit required to develop Game Development with Unity:
Technologies you will learn by working on Game Development with Unity:


Any Questions?