Vous êtes sur la page 1sur 5

Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No.

2, April 2019 16

3D Adventure Game Using Unity


R. Raguman, M. Santhakumar, X.P. Thomas and M. Revathi

Abstract--- 3D game with a First Person Shooting as well


as Third Person Shooting mode available in which the player II. UNITY GAME ENGINE
has to search the enemies on an amazing terrain map and kill Unity 3D is a game engine and complete integrated
the enemies using own wit and action.Project mainly deals development environment (IDE) with an integrated editor,
with the development of a 3d game application with the Unity asset workflow, scene builder, scripting, networking and more.
game engine for windows OS. In this game there are a few It also has a vast community and forum where any person
different kinds of enemies on the terrain and they possess wanting to know and learn to use Unity can go and have all
many different kinds of Artificial Intelligence (AI) movements their questions answered.
such as: 8 direction movement that helps player to move in There are five main views used in the Unity editor to get
directions like north-east, south-west, etc. rather than just all the work done, the project view, scene view, game view,
north or west or south, Auto aiming that comes into play when hierarchy view and inspector view, all of which are explained
player is in the line of sight of the enemy, Bullet/ spell/ in more detail below.
Projectile shooting created using a muzzle flash that starts
firing at the player when it comes in the range fixed by us, III. THE SCENE VIEW
Wind which uses particle system to create wind and the force
effects everything around it like blades of grass, leaf falling The scene view is one of the most used views as this is
from the tree, hair of the player, etc. The player has to search where all the game objects are placed and scenes for the game
for clues, solve them, kill enemies and explore places to gain are built.
extraordinary power.The video game market is not just
serviced for PC and Xbox. It is adaptive to mobile platforms
like IOS, Android and Windows Phone.

I. INTRODUCTION

T HIS project mainly deals with the development of a 3D


game application with the Unity 4 game engine for
Windows OS.
Recently, the video game market appears to be of an
unprecedented stage, which means the springing up of more
platforms lead to more competition. The video game market is
not just serviced for PC, PS3 and Xbox. The mobile platforms
basis on iOS, Android and Windows Phone rise sharply. As a
result, “cross-platform” come into people’s eyes.
Real time 3D games have existed for approximately ten Figure 1: Unity Scene View
years now. In figure 1 the scene view is shown with a level from the
We have played them, created assets in the style of our Brick breaker game. The level is designed in 3D, although it is
favorites, and maybe even “moded” a few of them. However, played more as a 2D game. “To create a 2D game in a 3D
until recently, the cost of licensing one of the premier game environment, the one degree of freedom is removed. The y
engines has ranged from several hundred thousand to several axis is all but ignored and the camera is placed in orthographic
million dollars per title, relegating the dream of creating one’s mode looking down on the screen as though it were played on
own 3D game to an unattainable. the top of a table.” [1] In the project the view was turned to
give it a 2D feel which is used for all the games built during
this project. The level looks very different in this view as it
would in the game.
R. Raguman, UG Student, Dept., of CSE, Paavai Engineering College,
Namakkal.
IV. THE GAME VIEW
M. Santhakumar, UG Student, Dept., of CSE, Paavai Engineering The game view is what user will see when the game is
College, Namakkal.
X.P. Thomas, UG Student, Dept., of CSE, Paavai Engineering College,
started. There are several options for this window. Across the
Namakkal. top of the window there are several button/drop down menus
M. Revathi, Assistant Professor Dept., of CSE, Paavai Engineering which can change things from the perspective, full screen, and
College, Namakkal. gizmos shown in the game view.
DOI:10.9756/BIJSESC.9015

ISSN 2277-5099 | © 2019 Bonfring


Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No. 2, April 2019 17

The character for this game shows up and can launch the
ball to destroy the brick castle in the distance. Also the pause
menu and score system can be seen. Unlike in the scene view
the player cannot see that there is

Figure 2: The Game View


a huge 3D world that contains this little level they play in.
When the game is running, game testing happens in this view. Figure 4: The Project View
V. THE HIERARCHY VIEW The project view with a list of all the assets in the project
for one level of brick breaker. Most levels will share the same
The hierarchy view is where all the objects in the game set of assets, scripts and scenes. The scenes will be different
can be created, accessed, grouped and manipulated to make depending on the level of the game. For this project it was
the game. When the project is saved, the objects are saved in a decided to create a folder for scenes, scripts, sounds, assets
scene file. and textures. This is to help keep assets separate from each
other and make it easier to find assets for one particular game
if needed.

VII. THE INSPECTOR VIEW


The inspector view is where all the physics and properties
of the objects are stored and accessed from. Every game object
has a transform; this is what holds properties of the object
such as rotation, position and scale. Other properties are the
physics affecting the object, textures to load on the object and
sound.

Figure 3: Hierarchy View


The hierarchy views where are all the objects that make up
the first level of the brick breaker game. Any entry which has
an arrow next to it can be expanded to show more objects; the
arrow indicates a group of objects. This hierarchy view is
extremely helpful when there are many objects in a scene and
just one of them needs to be found in the scene. The object can
be double clicked in this view and it will be selected and
zoomed in on the scene view.

VI. THE PROJECT VIEW


The project view is where all the scripts and scenes are
accessible from. This view is exactly like the file explorer on Figure 5: Inspector View
Windows or Mac and allows creating files and folders to help
organize the projects assets.

ISSN 2277-5099 | © 2019 Bonfring


Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No. 2, April 2019 18

VIII. COMMON GAME MECHANICS XI. TERRAIN


Every game that is played today is composed of some very
common game mechanics: path finding, collision detection
and input. These game mechanics have been around now for
decades and have been improved on throughout the years.
Here a few very common game mechanics are explained in
more detail and how they pertain to the thesis project.

IX. TOOLBAR

Figure 8: Terrain View


Not only the users can sculpt their idea into being, but they
can develop it with flora from grass to shrub to forest via paint
Figure 6: Toolbar textures.
The Transform tools afford functionality for manipulating A terrain object would be created to the scene in both the
and transforming. The button on the palmate tool, can also Hierarchy and the Project views with the position at 0, 0, 0
become transforming and scaling tools for manipulating and when the user presses Create Terrain button. In the Inspector,
adjusting the Scene view. The user can change and move the when the Terrain object is selected in the Hierarchy, the user
view of the objects by clicking and dragging then in the Scene will see the properties and the tools which are available for
view. To zoom the view, hold the Alt key and the right-key of developing it. The position, rotation and scale would-be set-in
the mouse, at the same time slide the mouse UDLR (Up, Transform section, and here the default value is ok.
Down, Left, Right).
XII. SKYBOX
X. CAMERAS

Figure 7: Camera View


The camera in unity is created as a game object in the
Hierarchy view and indicated in the Scene window Figure 9: Skybox View
automatically. In a game the camera provides the visible area The most general method for creating a sky with cloud
on the screen, which means the camera provides the height textures and weather is to import a skybox. Actually this is an
and width of the view, also the screen, depth can be set. The inside-out cube placed over the main camera with seamless
whole visible space by a camera is called the view volume. If images of the sky rendered on it. Because only six planes and
an object which is created to the scene is not placed inside the six textures are required. It is a relatively cost-effective
view volume, it cannot be seen on the screen. The shape of the approach to create a convincing-visual sky.
view volume can be adjusted to orthographic or perspective.

ISSN 2277-5099 | © 2019 Bonfring


Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No. 2, April 2019 19

XIII. CLOUDS XVII. IMPLEMENTATION


Dynamic fog is a more complex technique than the The Player Starts of by searching for Clues leading to his
prefabrication fog. However, the common standard fog friends murder. There are Booby traps that are activated when
applied in computer graphics required a faded out effect over taking a wrong turn under extreme circumstances. The player
all 3D assets such as terrain, prefabs in a scene, volumetric fog has to destroy and outsmart each and every booby trap to
is include within a 3D space. collect resources, find hidden treasure, power and finally
complete the game by killing the main boss using strategic
XIV. SCRIPTS plans.
Scripts consist of four main types of components:
variables, functions, equations, and comments. Variable hold
values that can be anything from numbers to text. Functions
do something, generally with variables and equations.
Comments are ignored when the code is executed, allowing
the user to make notes about what the code is or should be
doing or even to temporarily disable the code. When the user
creates a new script with C#, a new script file would be
created in the area Assets>Scripts which is a folder that could
be named by the user double clicks this file, and them the new
script would be opened with Mono Develop as a new C#
programming file.

XV. FUNDAMENTAL FEATURES


Creation: The designers can click ‘Create’ button in
‘Hierarchy’ window to make new and rough game object,
such as ‘Cube’, ‘Sphere’, ‘Camera’ and etc.
Prefabs: Unity game engine supports a way to resolve this Figure 11: Flow Chart
condition, and that is ‘Prefabs’. The designers can create game
objects with the prefabs in the ‘project’ window. When the
XVIII. COLLECTION AND DESIGN OF GAME ASSETS
objects are used, the designers just need to drag the prefabs to
the ‘Hierarchy’ window. A completed game is normally made with the required
game assets. The game asset consists of art assets and scripts
XVI. HEALTH POINTS assets. Art assets contain 3D models, textures, pictures, music
and etc. They are usually used to make game objects and
There are two Heal-points bar to be indicated. One HP is Graphics User Interfaces. Game objects are the objects which
player and another HP is enemies. If the player enters into can be in sight and arranged in the game scene. It can be said
patrol range of the enemy, the hatred of the enemy is that game objects are the essential elements which constitute
activated. The enemy makes damage to the player with a 5% whole game. And script assets are used to make all game
rate. The damage which the player got from the enemy is 1 HP objects to be performed. They are programmed with codes.
every hit. If the HP of the player is equal or less than 0, then Every script must be bonded with the suitable object.
the values ‘STATE_LOSE’ is assigned to the parameter ‘game
State’, and finally the texture ’YOU DEAD’ is drawn. In this game, a few textures were collected and drawn to
make the Graphic User Interfaces. And the standard assets
packages were imported from Unity Assets Packages.
Actually they are Character Controller Package, Terrain
Assets, Skyboxes and Tree Creators.

XIX. CHARACTER CONTROLLER PACKAGE


This package contains a 3D character model which was
used to make prefab with enemy game objects, a third Person
Controller which can simulate the animation of player, and
few scripts which were used to make model and controller to
work. It is mentionable that the animations with “idle”,
“walk”, “run” and “jump” are achieved for the models.

XX. CONCLUSION
A 3d game with the third person shooter with the unity
Figure 10: Health Point Reduce game engine crested. Looking forward to more game features
in the future. The most important aspect of the game design is

ISSN 2277-5099 | © 2019 Bonfring


Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No. 2, April 2019 20

thinking how to create more new playabilities. There might be


more possibilities for the game in the future.

REFERENCES
[1] Penny de Byl. Holistic Game Development with Unity. Focal Press: 1
edition November 15, 2011.
[2] Xavier Borg. Understanding 2 dimensional spaces [Online]. Blaze labs
research. URL: http://www.blazelabs.com/f-u-hds.asp . Accessed 10
September 2013.
[3] Wikipedia. Three-dimensional space [Online]. Wikipedia, the free
encyclopedia.
URL:http://en.wikipedia.org/wiki/Threedimensional_space. Accessed 11
September 2013. Accessed 11 September 2013
[4] Patrick Congdon. Academic Word: Ten Maxims Every FPS Should
Follow [Online]. Website: GameCareerGuid.com; 26 February 2007.
URL: http://www.gamecareerguide.com/feature s/344/the_ academic_
word_ten_maxims_every_fps_should_follow.php?page= 1. Accessed 12
September 2013.
[5] 5 Iuppa Nick, Borst Terry. End-to-end game development. USA:
Elsevier, Inc.; 2010.
[6] 6 Sue Blackman. Beginning 3D Game Development with Unity: The
World’s Most Widely Used Multiplatform Game
[7] Engine. New York, USA: Springer Science + Business Media, LLC;
2011.
[8] Philip Chu. Game Development with Unity. [Online] Copyright ©
20032010 Technicat, LLC. URL: http://www.cocoachina.com
/downloads/v ideo/2010/0617/1698.html. Accessed 15 October 2013.

ISSN 2277-5099 | © 2019 Bonfring

Vous aimerez peut-être aussi