Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

A PROJECT REPORT

ON

CUBETRON
By

AMOUGH. DHIRAJ. DEVALIA

Towards the Partial Fulfillment of the

Bachelor of Computer Application SEM-VI

SHAILENDRA EDUCATION SOCIETY’S


COMPUTER CENTER (SESCOM)
Mumbai 400 068

Tilak Maharashtra Vidyapeeth, Pune


Department of Computer Science

2019-2020

1
CERTIFICATE

This is to certify that the project

CUBETRON

Has been satisfactorily completed by

AMOUGH. DHIRAJ. DEVALIA

Towards the Partial Fulfillment of the ‘Bachelor of Computer Application


SEM-VI’, For the Academic 2019-20 At Shailendra Education Society’s Computer
Center (SESCOM), Mumbai 400 068. Tilak Maharashtra Vidyapeeth, Pune
(Department of Computer Science), and it is approved.

Project Guide Examiner Head of Department


SESCOM-Mumbai 68

2
ACKNOWLEDGEMENT

With immense please we are presenting “Cubetron” Project report as part of the curriculum
of ‘Bachelor of Computer Application’. We wish to thank all the people who gave us unending
support.

We express our profound thanks to our head of department Mr. Bhushan Pimple, project
guide Prof. R. H. Gohel and project in-charges and all those who have indirectly guided and helped
us in preparation of this project.

AMOUGH. D. DEVALIA

3
INDEX
Chapter 1 – Introduction ........................................................................................................ 6
1.1 Game Overview ................................................................................................................ 6
1.1.1 Synopsis ......................................................................................................................... 6
1.1.2 Target Audience .............................................................................................................6
1.1.3 Game Description .......................................................................................................... 6
1.2 Game Objectives ................................................................................................................6
1.3 Why game as a project? .................................................................................................... 7
1.4 Methodology ......................................................................................................................7
Chapter 2 – Feasibility Study ...................................................................................................8
2.1 Financial Feasibility .......................................................................................................... 8
2.2 Technical Feasibility ..........................................................................................................8
2.3 Economic Feasibility ..........................................................................................................9
2.4 Legal Feasibility................................................................................................................. 9
Chapter 3 – System Design .....................................................................................................10
3.1 List of Scripts and Their Responsibility.............................................................................10
3.2 Overall Game Class diagram .............................................................................................11
Chapter 4 –Product Design Terms .......................................................................................... 12
4.1 User Experience ................................................................................................................ 12
4.2 Backend Programing ......................................................................................................... 12
Chapter 5-Key Resource Requirements of the project ............................................................ 13
5.1 Requirements of the Project ...............................................................................................13
5.2 Software Requirements of the Project ............................................................................... 14
5.3 Implementation Code Example ......................................................................................... 15
5.3.1 Player Movements .......................................................................................................... 15
5.3.2 Player Collision .............................................................................................................. 16
5.3.3 Menu Script .................................................................................................................... 16
5.3.4 Tryagain ......................................................................................................................... 17
5.3.5 Game Manager................................................................................................................ 18
5.3.6 Save Manager ................................................................................................................. 19
5.4 Testing ............................................................................................................................... 21
Chapter 6 – Game Design ....................................................................................................... 23
6.1 Game Rules ....................................................................................................................... 23
6.2 Game Structure .................................................................................................................. 24
6.3 Game Play .......................................................................................................................... 37
6.4 Camera ............................................................................................................................... 38
6.5 Enemies .............................................................................................................................. 38
6.6 Environment ....................................................................................................................... 38
6.7 Coins ................................................................................................................................... 39
Chapter 7 – User Interface ........................................................................................................ 39
7.1 Main Menu .......................................................................................................................... 39
7.3 Death Menu ......................................................................................................................... 39
7.4 Shop Menu........................................................................................................................... 39
4
7.5 Some Snapshots / Screenshots of game .............................................................................. 40
Chapter 8 – Conclusion .............................................................................................................. 45
8.1 The Obstacles.........................................................................................................................45
8.2 The Achievements ................................................................................................................ 45
8.3 Future Plans .......................................................................................................................... 45
8.4 Last Few Words .................................................................................................................... 46
Chapter 9 – Bibliography ............................................................................................................ 47

5
Chapter 1 – Introduction

In the fast-growing field of Software Engineering and Development and even more rapidly
growing sector of Game Development, the future is hard to predict. In a game project, the product
is a game. But here comes the point: A game is much more than just its software. It has to provide
content to become enjoyable. Just like a web server: without content the server is useless, and the
quality cannot be measured. This has an important effect on the game project as a whole.
This report describes the process involved in making a CUBETRON.
The Adventure journey with Unity3D. This game is for Android devices. This chapter discusses
the Game overview including the synopsis, target audience, description, then focuses on the game
design, describing how the game is implemented.

1.1 Game Overview:

This game involves a single player entering the game & heading forward by avoiding obstacles
which becomes challenging as the gamer moves further.

1.1.1 Synopsis
The underlying plot to the game is that the character, controlled by the player collects
coins on the road.

1.1.2 Target Audience


3D obstacle-oriented games are extremely popular especially in mobile devices.
I’m mainly targeting to casual gamers aged from 13-30.

1.1.3 Game Description


This game involves a single player entering the game & heading forward by avoiding
obstacle’s which becomes challenging as the gamer movies further.

1.2 Game Objectives:

The major objectives of this game project are:


• To create an RPG game that will have all the functionality of traditional RPG games.
• To add sound effects to player.
• To make a User-Friendly Interface that will be pleasant to look at.

6
1.3 Why game as a project?

• Video games are not just any computer software which are made to benefit user’s daily
life, games are rather made for user’s entertainment purpose, so more than anything we
need to pay attention to what the user wants from the game, how to make it more
entertaining, just making any game will not do, that is why it’s more challenging because
I always have to carefully consider if I’m making developing it correctly to entertain users.
• I also have to invest a lot of time on the proper game designing to make it visually accepted.
And to add that game requires a lot of scripts. The scripts are like pieces of a puzzle which
you need to put all of them together to make it work. Thus, I think game is a perfect project
to prove myself

1.4 Methodology:

• The software methodology I have used to develop this game is Agile methodology which
is an approach for developing products (in this case: games) using short iterations.

7
Chapter 2 – Feasibility Study

This chapter describes all the feasibilities that come as questions to both the developers and other
users during the development of software. The chapter contains financial feasibility, technical
feasibility, economic feasibility and legal feasibility.

2.1 Financial Feasibility:

• For the mobile game players, it is completely a free to play game, the only potential reason
that it may consume internet data even though it is an offline game is the ads that this game
may have in the near future which is considered to be relatively low.
• The points mentioned above indicate that the project is financially feasible.

2.2 Technical Feasibility:

The tools and technology that were used in the making of the CUBETRON.
Game Engine: Unity 2019.2.15.
Image Editor & Animation: Adobe Photoshop CC 2019.
Code Editor: Visual Studio 2019.
Programming Language: C#

• These mentioned above technologies are completely free for students. There were no other
additional tools required to make this game. Most of my time to develop the game was
invested in the game engine, Unity and the Code Editor, Visual Studio.
• Unity itself also has animation editor which can be used to make simple animations that is
related to moving objects, changing sprites, and sprite editor which can separate sprites
which is good enough for this game.
• The simplicity of the project along with the facts mentioned above proves that this software
is also technically feasible.

8
2.3 Economic Feasibility:

The resources that are required for this project are:


• Development machine. Any regular laptop/PC with a Quad Core CPU and Minimum Ram
of 8GB and a decent GPU can be used for the development of this game.
• Technical tools and software. As mentioned previously, the tools needed to develop this
software are available to developers at no charge.
• Game Developers and Graphic Designers.

Although for now I have used free assets to design the game, if I want to release the game for
monetizing purposes this project will also require graphic designers for the game to get proper
recognition. As these resources are largely free of cost, the only expenses lie in the payment of the
programming individual(s), graphic designers and the machine. Neither of these is scarce in
availability nor are they extremely expensive.

2.4 Legal Feasibility:

• The game assets that were used to make this game are completely free with either CC0 or
CC3 licenses so I can use them as long as I properly credit them which I already did by
uploading the project to GitHub.
• And as mentioned in the previous sections this game uses freely available software and
tools which are intended for the use of game developers everywhere.
• There cannot be any conflict regarding plagiarism of any other game, because I have
already followed the rules of the licenses to make this game.

9
Chapter 3 – System Design

3.1 List of Scripts and their Responsibilities:

SR. NO. SCRIPT NAME RESPONSIBILITY


1 AudioManager.cs Responsible for play and shuffle background music, play various sound effects.
2 Back.cs Responsible for Changing Scenes
3 Coninscript.cs Responsible for Managing Coins
4 Credits.cs Responsible for The End Screen
5 Directions.cs Responsible to For Moving Obsticals
6 EndTrigger.cs Responsible for Displaying CompleteLevel
7 Exit.cs Responsible for Exit Game From Device
8 FollowPlayer.cs Responsible for Camera to Follow Player
9 GameManager.cs Responsible for Managing Gaming
10 Helper.cs Responsible for Helping System To Organzie the data in game
11 LevelComplete.cs Responsible for Completeing Level
12 Lockpos.cs Responsible for Lock the Position of the Obstacles
13 Manager.cs Responsible for Managing Skin For Player
14 Menu.cs Responsible for Menu Screen
15 PlayerCollision.cs Responsible for Obstacles Collision
16 PlayerMovements.cs Responsible for Player Movements
17 Preloader.cs Responsible for PreLoading Screen
18 Rotatecoin.cs Responsible for Rotating Coins
19 SaveManager.cs Responsible for Saving Data
20 SaveState.cs Responsible for Saving Data
21 Score.cs Responsible for Displaying Score
22 Shop.cs Responsible for Managing Shop
23 Sound.cs Responsible for Creating Sound
24 TryAgain.cs Responsible for Restarting the Game

10
3.2 Overall Game Class Diagram:

11
Chapter 4 - Product Design Terms

For every enterprise product two key terms of design are very important. They are:
• UX (User Experience)
• Backend Programming

4.1 User Experience (UX):

• To avoid unnecessary product features, simplifying design documentation and customer-


facing
• Technical public at, incorporating business and marketing goals UX design is must.
• User experience design (UXD or UED) is any aspects of a user's experience with a given
system,
• Including the interface, graphics, industrial design, physical interaction, and the manual in
most cases.
• User Experience Design fully encompasses traditional Human-Computer Interaction (HCI)
• Design, and extends it by addressing all aspects of a product or service as perceived by
users.
• UX stands for mainly relevant access of usability, accessibility and HCI.
• UX defines user experience as “a person’s perceptions and responses that result from the
use or anticipated use of a product, system or service”.

4.2 Backend Programming:

• The "Back End" is the code supporting that front end (Responsible for database access,
Business logic etc).
• In simple term, Application front end is what you see (i.e. the User Interface) and
application back end is the application engine that you do not see. The "Back End" is the
code supporting that front end (Responsible for database access, Business logic etc).
• For efficient implementation, to increase user acceptance both two are very important in
software industry.

12
Chapter 5 - Key Resource Requirements of the Project

5.1 Requirements of the Project:

Major
Skill/Expertise Internal External
Project Issues/Constraints
Required Resources Resources
activities

All three
members
Ability to
made the Ideas from
translate aspects Conflicting ideas per
Level Design decision existing
of the story into level
about game games
playable levels
levels
together

Knowledge of
functions Amough
Unity Ability to angle
available in worked on
game interactive portions
Physics Engine Unity game
Unity and the
engine of levels
ability to change engine

them as needed

13
5.2 Software Requirements of the Project:

Software Product of Tool Usage Work exp.

Unity
Unity3d Game Engine Backend activity
Technologies

Textures&
Adobe Photoshop Picture Edit
Cropping

14
5.3 Implementation Code Example
5.3.1 Player Movements: Responsible for Player Movements
using UnityEngine;

public class PlayerMovement : MonoBehaviour

{
// This is a reference to the Rigidbody component called "rb"
public Rigidbody rb;

public float forwardForce = 2000f; // Variable that determines the forward force
public float sidewaysForce = 120f; // Variable that determines the sideways
force

void Start()
{
rb = GetComponent<Rigidbody>();
}

void Update()
{

// Add a forward force


rb.AddForce(0, 0, forwardForce * Time.deltaTime);

//Touch Controls

//Touch left
if (Input.GetMouseButton(0))
{
if (Input.mousePosition.x < Screen.width / 2)
rb.AddForce(-sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
else
Debug.Log("Left");
}
// Thouch right
if (Input.GetMouseButton(0))
{
if (Input.mousePosition.x > Screen.width / 2)
rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
else
Debug.Log("Right");
}
if(rb.position.y < -1f)
{
FindObjectOfType<GameManager>().EndGame();
}
}
}

15
5.3.2 Player Collision: Responsible for Collisions in Game
using UnityEngine;

public class PlayerCollision : MonoBehaviour {

public PlayerMovement movement; // A reference to our PlayerMovement


script

// This function runs when we hit another object.


// We get information about the collision and call it "collisionInfo".
void OnCollisionEnter (Collision collisionInfo)
{
// We check if the object we collided with has a tag called "Obstacle".
if (collisionInfo.collider.tag == "Obstacle")
{
movement.enabled = false; // Disable the players movement.
FindObjectOfType<GameManager>().EndGame();

FindObjectOfType<AudioManger>().Play("GameOver");
}
}
}

5.3.3 Menu Script: Responsible for Menu Screen

using UnityEngine;
using UnityEngine.SceneManagement;

public class MENU : MonoBehaviour


{
public void Gamestart()
{
SceneManager.LoadScene("Level01");
}

public void Gameshop ()


{
SceneManager.LoadScene("Shop");
}

public void Quit()


{
Application.Quit();
}
}

16
5.3.4 Tryagain: Responsible for Restarting the Game

using UnityEngine;
using UnityEngine.SceneManagement;

public class TRYAGAIN : MonoBehaviour


{

public void TryAgain ()


{
SceneManager.LoadScene("Level01");
}

public void GameMenu()


{
SceneManager.LoadScene("Menu");
}

public void Quit()


{
Application.Quit();
}

17
5.3.5 Game Manager: Responsible for Managing Gaming
using UnityEngine;
using UnityEngine.SceneManagement;

public class GameManager : MonoBehaviour {

bool gameHasEnded = false;

public float restartDelay = 8f;

public GameObject completeLevelUI;

public void CompleteLevel ()


{
completeLevelUI.SetActive(true);
}

public void EndGame ()


{
if (gameHasEnded == false)
{
gameHasEnded = true;
Debug.Log("GAME OVER");
Invoke("Restart", restartDelay);

SceneManager.LoadScene("Credits",
(UnityEngine.SceneManagement.LoadSceneMode)restartDelay);

}
}

void Restart ()
{
SceneManager.LoadScene("Credits");
}
}

18
5.3.6 Save Manager:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SaveManager : MonoBehaviour


{
public static SaveManager Instance { set; get; }
public SaveState state;

private void Awake()


{
// ResetSave();
DontDestroyOnLoad(gameObject);
Instance = this;
Load();
}

// save the hole sate of this savestate script to the player pref
public void Save()
{
PlayerPrefs.SetString("save",Helper.Serialize<SaveState>(state));
}

// load the previous saved state from playerprefs


public void Load()
{
// do we already have a saved state?
if (PlayerPrefs.HasKey("save"))
{
state = Helper.Deserialize<SaveState>(PlayerPrefs.GetString("save"));
}
else
{
state = new SaveState();
Save();
Debug.Log("No Save File Found , Creating a New One! ");
}
}

19
// check if the color was owned
public bool IsColorOwned(int index)
{
//check if the bit is set, if so the color is owned
return (state.colorowned & (1 << index)) != 0;
}

// Attempt buying color, return true/false


public bool BuyColor(int index, int cost)
{
if (state.gold >= cost)
{
// enough money removes from the stack
state.gold -= cost;
UnlockColor(index);
// Save progress
Save();
return true;
}
else
{
// not enough money, return false
return false;
}
}

// unlock a color in the "color owned"


public void UnlockColor(int index)
{
//toggle on the bit at index
state.colorowned |= 1 << index;
}

20
5.4 Testing

Here include some test cases for the game to check if the game works properly in various situations.
We are giving four test examples for four different situations here.

Test Case 1

Test Case : This test will check if the animation is working correctly.
Test Procedure : Import a character model with animation in unity. Place
character on the scene. Run the game.
Expected Result : Animation works perfectly in the environment.
Actual Result : Animation is not working.
Comment : Need to check character configuration on inspector window. The
appropriate animation was not selected. Select it.
Conditional Test : Again, run scene.
Expected Result : Animation is working now.
Actual Result : Yes, it is working.
Accuracy : Accuracy depends on hardware configuration.

Test Case 2

Test Case : This test will check if the interaction between objects is working
correctly.
Test Procedure : Add scripts of interaction in the objects that we want to
interact with each other. Run scene.
Expected Result : Objects are interacting.
Actual Result : Run time exception
Comment : Need to add checking in the scripts for the objects that have a
particular script.
Conditional Test : Run scene.
Expected Result : Interaction is ok now.
Actual Result : Interaction is ok now.
Accuracy : Perfectly accurate.

21
Test Case 3

Test Case : This test will check if the interaction between Coins and Saving in
Data is working.
Test Procedure : Add scripts of interaction in the objects that we want to
interact with each other. Run scene.
Expected Result : Objects are interacting.
Actual Result : Run time exception
Comment : Need to add checking in the scripts for the objects that have a
particular script.
Conditional Test : Run scene.
Expected Result : Interaction is ok now.
Actual Result : Interaction is ok now.
Accuracy : Perfectly accurate.

Test Case 4

Test Case : This test will check if the interaction between Materials on Player
is working correctly.
Test Procedure : Add scripts of interaction in the objects that we want to
interact with each other. Run scene.
Expected Result : Objects are interacting.
Actual Result : Run time exception
Comment : Need to add checking in the scripts for the objects that have a
particular script.
Conditional Test : Run scene.
Expected Result : Interaction is ok now.
Actual Result : Interaction is ok now.
Accuracy : Perfectly accurate.

22
Chapter 6 – Game Design

Game design is the study of how to make the game functional by setting game rules, game
mechanics, gameplay which I already briefly discussed in Chapter 1 but now I will go through
them thoroughly. I will also discuss more about what I did to make the game more fun rather than
visually accepted with the existing resources I have and that is part of game design because even
if we make a fancy game with good graphical work if the game design is not well enough it will
not attract the user. So, I invested a lot of time on doing this section, since without it the game is
incomplete.

6.1 Game Rules:

• The game starts with player entering the menu scene where player can select a Start,
he can also unlock skin during Shop if wish, in Chapter 1 scene the player can move
forward until he Collides with an Obstacle.
• There are multiple Obstacles. Initially player has to dodge all obstacles and complete
the chapter with collecting Coins for new skins
• If player successfully Completes the Previous Chapter then He can Enter The next
Chapter, and the Game Difficulty Increases as well.

23
6.2 Game Structure:

UML Diagrams
ACTIVITY DIAGRAM

New Game Activity Diagram

Go to Main Menu

Click Start

Level – 1 Loaded

24
Shop Activity Diagram

Go to Main Menu

Click Shop

Shop Loaded

25
Exit Game Activity Diagram

Go to Main Menu

Click Quit

Game Exited

26
Exit Game After Playing Activity Diagram

After Game

End Screen Appears

Click Quit

Game Exited

27
SWIMLANE DIAGRAM
New Game Swimlane Diagram

UX Backend Programming

Go to Main Menu

Click Start Level -1 Loaded

28
Shop Swimlane Diagram

UX Backend Programming

Go to Main Menu

Click Shop Shop Loaded

29
Quit Swimlane Diagram

UX Backend Programming

Go to Main Menu

Game Exited
Click Quit

30
STATE DIAGRAM

Top level State Diagram

Splash Screen Main Menu

Checking
Open Game If clicked

Start Shop Quit

Play Shop Close Game

Buy Back
Colors

31
SEQUENCE DIAGRAM

New Game Sequence Diagram

UX Backend

Open Game Click start Level 1 Loaded

32
Quit Game Sequence Diagram

UX Backend

Playing
Game Press Main Menu
Main Menu
Appears

Press Quit

Press Quit

33
Shop Sequence Diagram

UX Backend

Playing
Game Press Main Menu Taking Input

Main Menu
Press Shop
Shop
Loaded

OR

UX Backend

Open Game Click Shop Shop Loaded

34
Try again Sequence Diagram

UX Backend

Playing
Game Level Complete / Game over End Screen
loaded

End Screen Appears

Click Try Again


Level Loaded

35
USE CASE DIAGRAM

User Use Case Diagram

START

SHOP

QUIT
USER

36
6.3 Game Play:

The following figures illustrates the inputs to control the player. For Android we are using touch
to move the player.

• Mobile Inputs

37
6.4 Camera:

6.4.1 Game Camera


• Game camera does not have the fancy zoom in, zoom out effect like menu camera but it
follows the player more smoothly and this feature is also part of Attempts to Make the
Game More Fun which is the last section of this chapter.

6.5 Enemies:

• Obstacles on the road

6.6 Environment:

• Few of the game objects that were used to design environment have animations which only
have a single state. There is a single road Ahead
Filled with obstacles

6.7 Coins:

• Coins are available in game, so that player can collect them buy colors.

38
Chapter 7 – User Interface

7.1 Main Menu:

The Main Menu is the starting point of all the Games. A menu is a list of options
or commands presented to the user of a game. A menu may either be a system's entire user
interface, or only part of a more complex one. Menu simply start the game from which we can
play the game or can go to Shop or Quit.

7.2 Death Menu:

Death Menu is The Screen is the screen which appears aster Ending the Game or Losing the Game.
From Death Menu the player can restart game or can go back to Main Menu.

7.3 Shop:

Shop has a Collection of skins for Player which can be bought by using coins earned in game in
sort Shop lets buy skins for player from the coins you collect from the game.

39
7.4 Snapshots / Screenshots of game:

40
41
42
43
44
Chapter 8 – Conclusion

A software project means a lot of experience. In this section we summarize the experience gained
during development of “CUBETRON”.
This game is solely made for the user’s entertainment purpose and its principle objective was to
make a game that is similar to Obstacle based games but yet to have modern vibe.

8.1 The Obstacles:

• Working with game engine completely a new experience for me.


• We adopt these things by video tutorials, text tutorials, internet and learning materials given
by the tools themselves. It's a matter of time, patience and hard work.
• It is very sensible work and it demands much time.
• Creating a 3d model is very difficult because you need to work with each and every point
of the model.
• The Exists game engines demands vast knowledge about its properties, sections and sub-
sections.

8.2 The Achievements:

• Now we know much more about game engines.


• How it works? The properties, objects and others.
• We know how a model is constructed and how it is animated.
• Growing creative thinking and imagination capability.

8.3 Future Plans:

• This game is made for Android at the present. There are many scopes available for the
improvement of this game including the additions of other functionalities, level Extension,
Improve Graphical Representation, introduce new game features, Introduce new
environment and scenes.

45
8.4 Last Few Words:

• We learned a lot through this project. This project has sharpened our concept of Game
engine, animation and the software-hardware interface.
• We learned a lot about different documentation. The piece of software we developed is
intended to serve the gamers of the world. The success of this project may give pleasure to
billions of game lovers among the universe. This project not only tested my technical skills
but also my temperament.
• There were times that I had almost lost hope but had recovered through constant
concentration and hard work.
• If any kind of suggestion, improvements, more efficient development idea please feel free
to communicate with me.

46
Chapter 9 – Bibliography

General References:

https://docs.unity3d.com/Manual/index.html

Special Thanks To:

1. YouTube - http://www.youtube.com/
2. Google - https://www.google.com/
3. http://unity3d.com/
4. Unity Asset Store

47

You might also like