Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (1 vote)
798 views

Game Production Using Unity Editor

This project is based upon developing a soccer game in unity engine using the concept of UnityEngine.RigidBody. For more explanation visit the channel 'BullMark' on youtube.

Uploaded by

Ruhaan Choudhary
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
798 views

Game Production Using Unity Editor

This project is based upon developing a soccer game in unity engine using the concept of UnityEngine.RigidBody. For more explanation visit the channel 'BullMark' on youtube.

Uploaded by

Ruhaan Choudhary
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Game Production using Unity Editor (Genre: Sports)

By using the concept of UnityEngine.RigidBody

Ruhaan Choudhary
ruhaanchoudhary2004@gmail.com

Abstract
The 3D game development is more challenging than 2D game development.
Moving further we observe that working on 3D sport game development is even
more challenging. A developer needs to control all the players of the game using
AI (Artificial Intelligence). The research represents the soccer game development
using the Unity Engine. There are several methods for the development. This
project is based upon the application of the concept of ‘UnityEngine.RigidBody’.
The project results in a small game of shooting the penalties in the soccer.

Introduction
Environ
This project completes using four ment

factors:

(a)Environment: This comprises Soccer Building


Game
the
objects like skybox, the stadium, and Objects Game game
the materials.
(b)Game Objects: These include the
soccer ball, the goal post. Lines of
Code
(c)Lines of Code: The code is C#
based. The code is about moving the
ball and shooting it by adding a force
to the ball. Fig: 4 Factors of Soccer Game
(d)Building the game to executable This project also explains the
file: This step is done so that the
technique of using the conception of
game can be played on any of the
RigidBody in Unity Engine.
computers.
UnityEngine.RigidBody Property: Function:
A Rigid body is the main component
that enables physical behavior for cannot make the object stop
rotating just by setting its
a Game Object. With a Rigid body Angular Drag to infinity.
attached, the object will immediately
respond to gravity. If one or Use If enabled, the object is
Gravity affected by gravity.
more Collider components are also
added, the Game Object is moved by
incoming collisions.
.

Properties
Setting up the layout for
Property: Function: UnityEngine

Mass The mass of the object (in


kilograms by default).

Drag How much air opposition


affects the object when moving
from forces. 0 means no air
resistance, and infinity makes
the object stop moving
immediately.

Angular How much air resistance


Drag affects the object when rotating
from torque. 0 means no air
resistance. Note that you Fig: Unity Editor Interface.
Scene view is where we organize our environment. Inspector window is
where all the features are added to the game object. Project window is where we
import the objects into the environment.

Setting and organizing the Game Objects


The environment can be structured in any convenient way. Fig (a) and (b)
represents the Scene and Game tab view of the environment in which the Main
Camera is adjusted towards the goalpost and the inbuilt directional light has been
used.

Fig (a) Scene View Fig (b) Game View

A sphere game object is used as the soccer ball to which RigidBody is added to
(refer from above) and then the C# script has been incorporated in the game
object.

Adding the C# script and understanding the contents


The figure above represents the C# script added to the game object (the ball). The
detailed illustrations of this script are one of the purposes of this study.

These are the 1 – 5 lines of C# script in which the first line is written to inform that
all the functions are being used for unityEngine. The second line explains that all
the functions will be written in the class (the concept of the programming
language) of the name of the script. The code begins from the third line.
The statements from 3 – 5 represent the variables being assigned to some
constant values.

Type Description

int The integer data type stores positive or negative whole numbers eg. 5

The float data type stores floating point numbers (numbers with decimal places). The float data type is the
float
default number type in Unity eg. 5.25

The double data type stores floating point numbers but can hold larger size numbers than floats. It is not the
double
default number type in Unity though.

bool The bool (short for Boolean) data type stores true or false values only eg. true

The char data type stores a single character such as a letter, number, space or special character (eg. a, 1,
char
!). A char value is written in single quotes eg. ‘a’.

The string data type stores letters, numbers and other characters in the form of words or sentences. A
string
string value is written inside double quotes eg. “Hello World”.

Fig – Data types to assign values to variables


The figure represents the statements from 9 – 18 under void Update () {. All these
statements have been written using if statements (if following key is pressed,
then following should happen). Input.GetKeyDown (KeyCode.key) is the statement
used for receiving input from the keyboard and performing the function specified
under the if statements. Under if statements, AddForce is the function that is to
be performed by the rb (RigidBody). Inside the parenthesis are the variables and
constants of the vectors X ,Y and Z that are adjusted according to the force
needed to be applied. Magnitude of vector x are equal in all statements but the
direction is made opposite by inversing the sign to negative.
Building the game in Windows Platform

After the script been made, the game is ready to be built for windows platform.
To start, we’re going to open up your Unity project and configure the build
settings. To configure your settings in Unity, first click “File,” then “Build
Settings.”
Next, choose Windows Store in the Platform Window.

Next, click the Player Settings… button.

Enter your game details in the “Player Settings” window such as your
default icon and product name. Your build settings are now properly
configured in Unity3D to allow you to export.
Click on the Build button in the Build Settings window. You will be
prompted with a Build Windows Store dialog to select a folder for building
your game.

Once you have selected the folder, Unity will begin building your game,
targeting the platform you selected. This can take several minutes if you
have a lot of assets.

Summary

So the project and study on the concept of RigidBody has led to the development
of the soccer game in unity editor. There are many concepts that can be used to
develop such games with good gaming experience. There is futher scope of
making it a Virtual Reality game.
References
1. ^ "Download Archive". Unity. Retrieved June 26, 2019.
2. ^ "Unity 2019.3a". Unity. Retrieved June 26, 2019.
3. ^ "unity.com Traffic Statistics". Alexa Internet. Retrieved May 12, 2019.
4. ^ Jump up to:a b c Axon, Samuel (September 27, 2016). "Unity at 10: For better—or worse—game
development has never been easier". Ars Technica. Archived from the original on October 5, 2018.
Retrieved October 17, 2018.
5. ^ Takahashi, Dean (September 15, 2018). "John Riccitiello Q&A: How Unity CEO views Epic's
Fortnite success". VentureBeat. Archived from the original on September 17, 2018. Retrieved October
17, 2018.
6. ^ Jump up to:a b c McWhertor, Michael (October 22, 2014). "Former EA CEO John Riccitiello is now
head of Unity". Polygon. Archived from the original on December 5, 2018. Retrieved October
17, 2018.
7. ^ Smykill, Jeff (August 9, 2006). "Apple Design Award winners announced".
ArsTechnica. Archived from the original on January 19, 2015. Retrieved January 18, 2015.
8. ^ Jump up to:a b Brodkin, Jon (June 3, 2013). "How Unity3D Became a Game-Development
Beast". Dice Insights. Archived from the original on October 19, 2018. Retrieved October 30, 2018.

You might also like