Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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 has to search the enemies on an amazing terrain map and kill the enemies using own wit and action.Project mainly deals with the development of a 3d game application with the Unity game engine for windows OS. In this game there are a few different kinds of enemies on the terrain and they possess many different kinds of Artificial Intelligence (AI) movements such as: 8 direction movement that helps player to move in directions like north-east, south-west, etc. rather than just north or west or south, Auto aiming that comes into play when player is in the line of sight of the enemy, Bullet/ spell/ Projectile shooting created using a muzzle flash that starts firing at the player when it comes in the range fixed by us, Wind which uses particle system to create wind and the force effects everything around it like blades of grass, leaf falling from the tree, hair of the player, etc. The player has to search for clues, solve them, kill enemies and explore places to gain 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. II. UNITY GAME ENGINE Unity 3D is a game engine and complete integrated development environment (IDE) with an integrated editor, asset workflow, scene builder, scripting, networking and more. It also has a vast community and forum where any person wanting to know and learn to use Unity can go and have all their questions answered. There are five main views used in the Unity editor to get all the work done, the project view, scene view, game view, hierarchy view and inspector view, all of which are explained in more detail below. III. THE SCENE VIEW The scene view is one of the most used views as this is where all the game objects are placed and scenes for the game are built. 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 years now. We have played them, created assets in the style of our favorites, and maybe even “moded” a few of them. However, until recently, the cost of licensing one of the premier game engines has ranged from several hundred thousand to several million dollars per title, relegating the dream of creating one’s own 3D game to an unattainable. R. Raguman, UG Student, Dept., of CSE, Paavai Engineering College, Namakkal. M. Santhakumar, UG Student, Dept., of CSE, Paavai Engineering College, Namakkal. X.P. Thomas, UG Student, Dept., of CSE, Paavai Engineering College, Namakkal. M. Revathi, Assistant Professor Dept., of CSE, Paavai Engineering College, Namakkal. DOI:10.9756/BIJSESC.9015 Figure 1: Unity Scene View In figure 1 the scene view is shown with a level from the Brick breaker game. The level is designed in 3D, although it is played more as a 2D game. “To create a 2D game in a 3D environment, the one degree of freedom is removed. The y axis is all but ignored and the camera is placed in orthographic mode looking down on the screen as though it were played on 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. IV. THE GAME VIEW The game view is what user will see when the game is started. There are several options for this window. Across the top of the window there are several button/drop down menus which can change things from the perspective, full screen, and gizmos shown in the game view. 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. V. THE HIERARCHY VIEW The hierarchy view is where all the objects in the game can be created, accessed, grouped and manipulated to make the game. When the project is saved, the objects are saved in a scene file. Figure 4: The Project 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 set of assets, scripts and scenes. The scenes will be different depending on the level of the game. For this project it was decided to create a folder for scenes, scripts, sounds, assets 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 Windows or Mac and allows creating files and folders to help organize the projects assets. ISSN 2277-5099 | © 2019 Bonfring Figure 5: Inspector View Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No. 2, April 2019 VIII. 18 XI. TERRAIN COMMON GAME MECHANICS 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 6: Toolbar The Transform tools afford functionality for manipulating and transforming. The button on the palmate tool, can also become transforming and scaling tools for manipulating and adjusting the Scene view. The user can change and move the view of the objects by clicking and dragging then in the Scene view. To zoom the view, hold the Alt key and the right-key of the mouse, at the same time slide the mouse UDLR (Up, Down, Left, Right). 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 textures. A terrain object would be created to the scene in both the Hierarchy and the Project views with the position at 0, 0, 0 when the user presses Create Terrain button. In the Inspector, when the Terrain object is selected in the Hierarchy, the user will see the properties and the tools which are available for developing it. The position, rotation and scale would-be set-in Transform section, and here the default value is ok. 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 automatically. In a game the camera provides the visible area on the screen, which means the camera provides the height and width of the view, also the screen, depth can be set. The whole visible space by a camera is called the view volume. If an object which is created to the scene is not placed inside the view volume, it cannot be seen on the screen. The shape of the view volume can be adjusted to orthographic or perspective. Figure 9: Skybox View The most general method for creating a sky with cloud textures and weather is to import a skybox. Actually this is an inside-out cube placed over the main camera with seamless images of the sky rendered on it. Because only six planes and six textures are required. It is a relatively cost-effective approach to create a convincing-visual sky. ISSN 2277-5099 | © 2019 Bonfring Bonfring International Journal of Software Engineering and Soft Computing, Vol. 9, No. 2, April 2019 XIII. CLOUDS XVII. Dynamic fog is a more complex technique than the prefabrication fog. However, the common standard fog applied in computer graphics required a faded out effect over all 3D assets such as terrain, prefabs in a scene, volumetric fog is include within a 3D space. XIV. 19 SCRIPTS IMPLEMENTATION The Player Starts of by searching for Clues leading to his friends murder. There are Booby traps that are activated when taking a wrong turn under extreme circumstances. The player has to destroy and outsmart each and every booby trap to collect resources, find hidden treasure, power and finally complete the game by killing the main boss using strategic 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 condition, and that is ‘Prefabs’. The designers can create game objects with the prefabs in the ‘project’ window. When the objects are used, the designers just need to drag the prefabs to the ‘Hierarchy’ window. XVI. HEALTH POINTS There are two Heal-points bar to be indicated. One HP is player and another HP is enemies. If the player enters into patrol range of the enemy, the hatred of the enemy is activated. The enemy makes damage to the player with a 5% rate. The damage which the player got from the enemy is 1 HP every hit. If the HP of the player is equal or less than 0, then the values ‘STATE_LOSE’ is assigned to the parameter ‘game State’, and finally the texture ’YOU DEAD’ is drawn. Figure 11: Flow Chart XVIII. COLLECTION AND DESIGN OF GAME ASSETS A completed game is normally made with the required game assets. The game asset consists of art assets and scripts assets. Art assets contain 3D models, textures, pictures, music and etc. They are usually used to make game objects and Graphics User Interfaces. Game objects are the objects which can be in sight and arranged in the game scene. It can be said that game objects are the essential elements which constitute whole game. And script assets are used to make all game objects to be performed. They are programmed with codes. Every script must be bonded with the suitable object. 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 Figure 10: Health Point Reduce A 3d game with the third person shooter with the unity 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 thinking how to create more new playabilities. There might be more possibilities for the game in the future. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] Penny de Byl. Holistic Game Development with Unity. Focal Press: 1 edition November 15, 2011. Xavier Borg. Understanding 2 dimensional spaces [Online]. Blaze labs research. URL: http://www.blazelabs.com/f-u-hds.asp . Accessed 10 September 2013. 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 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 Iuppa Nick, Borst Terry. End-to-end game development. USA: Elsevier, Inc.; 2010. 6 Sue Blackman. Beginning 3D Game Development with Unity: The World’s Most Widely Used Multiplatform Game Engine. New York, USA: Springer Science + Business Media, LLC; 2011. 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 20