Final Gaming Report1
Final Gaming Report1
on
FRUITKING
Submitted to
Submitted by Supervised by
PUNJAB
[Dec, 2018]
TOPIC APPROVAL PERFORMA
2 Project Feasibility: Project can be timely carried out in-house with low-cost and available resources in 6.67
the University by the students.
3 Project Academic Inputs: Project topic is relevant and makes extensive use of academic inputs in UG 5.33
program and serves as a culminating effort for core study area of the degree program.
4 Project Supervision: Project supervisor’s is technically competent to guide students, resolve any issues, 6.67
and impart necessary skills.
5 Social Applicability: Project work intends to solve a practical problem. 6.00
6 Future Scope: Project has potential to become basis of future research work, publication or patent. 6.33
PAC Member 1 Name: Balraj Kumar UID: 11004 Recommended (Y/N): Yes
PAC Member 5 Name: Pawan Kumar UID: 11522 Recommended (Y/N): Yes
DAA Nominee Name: Anuj Sharma UID: 20592 Recommended (Y/N): Yes
Final Topic Approved by PAC: Fruit King Game: should be more creative and complexity
11/15/2018 12:22:03 PM
CERTIFICATE
This is to certify that K. Manideep, G. Shashidhar Reddy, Lanka Naga Sai deep, Jyotishman
Rout has completed their project titled Fruit king under my guidance and supervision. To the
best of my knowledge, the present work is the result of his original study. No part of the report
has ever been submitted for any other degree or diploma. The report is fit for the submission and
the partial fulfilment of the conditions for the award of B.Tech.
It is a pleasure to find myself penning down these lines to express my sincere thanks to all my
teammates to give me this opportunity of preparing this project. This project required hard work
that I tried my best to put in this project and in turn gained a lot of knowledge and confidence
from this project. We are grateful to our Project Guide Ms. Pooja Dhiman for the inspiration
and the constructive suggestions that helped me in preparation of the project Survival of the
fastest.
Table of Contents
CHAPTER 1. INTRODUCTION AND OBJECTIVE .............................................................. 1
Abstract ...................................................................................................................................... 1
Introduction to Unity3D ............................................................................................................ 1
Overview ..................................................................................................................................... 1
Objective ..................................................................................................................................... 2
CHAPTER 2. SYSTEM ANALYSIS .......................................................................................... 2
Selecting Features from Existing System ................................................................................ 2
Feasibility Study ........................................................................................................................ 3
Technical feasibility ................................................................................................................... 3
Economic feasibility ................................................................................................................... 4
Operational Feasibility .............................................................................................................. 4
Behavioural Feasibility.............................................................................................................. 5
CHAPTER 3. DFD ........................................................................................................................ 6
Level 0:........................................................................................................................................ 6
Level 1:........................................................................................................................................ 6
Level 2:........................................................................................................................................ 6
CHAPTER 4. S/W & H/W REQUIREMENT SPECIFICATION .......................................... 7
Unity (engine) ............................................................................................................................. 7
Windows-Based Requirements ................................................................................................. 7
Mac-Based Requirements ......................................................................................................... 8
IOS .............................................................................................................................................. 8
The Android SDK ...................................................................................................................... 8
For Windows 8.1 Mobile Devices ............................................................................................. 8
CHAPTER 5. SYSTEM DESIGN ............................................................................................... 9
CHAPTER 6. SCREEN SHOTS WITH CODING.................................................................. 11
Screenshots ............................................................................................................................... 11
Coding ....................................................................................................................................... 17
CHAPTER 7. VALIDATION CHECKS .................................................................................. 42
Score Validation ....................................................................................................................... 42
Restart Validation.................................................................................................................... 42
User Validation ........................................................................................................................ 42
On click Validation .................................................................................................................. 42
Game files Validation .............................................................................................................. 42
CHAPTER 8. IMPLEMENTATION AND MAINTENANCE .............................................. 43
Coding ....................................................................................................................................... 43
Testing....................................................................................................................................... 43
Installation................................................................................................................................ 43
Managing Programming ......................................................................................................... 43
Coordinating Activities ........................................................................................................... 43
Managing the Schedule ........................................................................................................... 44
DESIGNING TESTS ............................................................................................................... 44
Developing Documentation ..................................................................................................... 44
Maintaining information systems........................................................................................... 45
Platform Maintenance ............................................................................................................. 45
CHAPTER 9. TESTING (TESTING TECHNIQUES AND TESTING STRATEGIES) .... 46
Functional Testing ................................................................................................................... 46
Structural Testing .................................................................................................................... 46
Levels of Testing ...................................................................................................................... 46
Functional Testing ................................................................................................................ 47
Non-Functional Testing ....................................................................................................... 48
CHAPTER 10. SYSTEM SECURITY AND MEASURES ..................................................... 50
Theory and Method of Exploitation....................................................................................... 50
Practice and Methodology Step-By-Step ............................................................................... 50
CHAPTER 11. VARIOUS TYPES OF MODULES ................................................................ 51
CHAPTER 12. FUTURE SCOPE OF THE PROJECT.......................................................... 52
CHAPTER 1. INTRODUCTION AND OBJECTIVE
Abstract
Today, the computer games industry is one of the most profitable industries in the world. Games
are something which everyone loves to play on their computer. In fact, it is one of the most used
applications in a computer. Games help you relax, and they are a perfect way of killing time
when you are feeling bored. These factors have inspired us to make a project which aims at
creating games. Our project aims at using c# language to make games. Our project is titled
Game. In our project we will use graphics supported by C# to make the games. Through the use
of these graphics we will try to make the games interesting graphically. The games module
which we have included in our project are: -
1) Super Mario
2) Temple Run
3) Subway surfers
4) Pokémon
5) Super Sonic
Introduction to Unity3D
Unity is a cross-platform game engine developed by Unity Technologies, first announced and
released in June 2005 at Apple Inc.'s Worldwide Developers Conference as an OS X-exclusive
game engine. As of 2018, the engine has been extended to support 27 platforms. The engine can
be used to create both three-dimensional and two-dimensional games as well as simulations for
its many platforms. Several major versions of Unity have been released since its launch, with the
latest stable version being Unity 2018.2.13.
Overview
Unity gives users the ability to create games in both 2D and 3D, and the engine offers a primary
scripting API in C#, for both the Unity editor in the form of plugins, and games themselves, as
well as drag and drop functionality. Prior to C# being the primary programming language used
for the engine, it previously supported Boo, which was removed in the Unity 5 release, and a
version of JavaScript called Unity Script, which was deprecated in August 2017 after the release
of Unity 2017.1 in favor of C#.
1
Objective
The objective of this project was the creation of an easy to use, pick up and play game that could
be played by all ages as long as they have an android phone and a touch screen. The reason was
as stated above there are more casual gamers than traditional gamers meaning a larger potential
market. Developing on the Android platform will mean we have to program in JAVA or C# and
get to grips with the Android SDK. I should also learn the fundamentals of game programming
and stick to the lifecycle associated with developing games. The Android SDK does not provide
a comprehensive set of tools to create a game straight away. It does require a lot of extra work. I
could potentially create my own framework or perhaps use an existing one, to ease the process
and produce software that is appealing and efficient
The purpose of this document is to set up the requirements for the development of Android 2D
car racing game. The intended customer is really anyone with an android device. A car game is
simple and fun to play making it available to anyone.
• Physics - The character will have to be able to move using the front two feet for
control and depending on the drive of the system, whether power is applied to all feet.
This physics only needs to be simulated in 2D in a top down perspective. When a
character hits an obstacle, then the relevant actions should be applied to the character and
it should die. Appropriate collision detection also needs to be used to identify these
crashes.
2
• Attractive user interface - The interfaces of the games tested are very appealing;
each one also has a heads-up display showing various in-game parameters.
• Camera - All top down games have the same camera, the player in the centre and a
view of the world around it.
Feasibility Study
A Feasibility study is undertaken to determine the possibility or portability of either improving
the existing system or developing a completely new system. Feasibility is the measure of how
beneficial or practical the development of information system will be to an organization. The
feasibility study involves following criteria.
• Whether the identified user needs may be satisfied using current software and
hardware
• technologies.
• The study will decide if the proposed system will be cost-effective and if it can be
developed given existing budgetary constraints.
• The result should inform the decision of whether to go ahead with a more detailed
analysis.
2. Economic feasibility
3. Behaviour feasibility
Technical feasibility
It is measure of the practicality of specific technical solution and the availability of technical
resources and expertise. Technical feasibility is computer oriented. The “Profile Manager”,
“Flappy Bird” and “Nightmare” and is technical feasible because of the following reasons
3
To check whether the module technically feasible or not we have to give the following
two question answer.
Economic feasibility
It is a measure of the cost-effectiveness of a project or solution. This is often called a cost-benefit
analysis. Economic feasibility deals with the cost and benefits of the information system.
In the economic feasibility, the development cost of the system is evaluated weighing it
against the ultimate benefit derived from the new system. It is found that the benefit from the
new system would be more than the cost and time involved in its development.
Operational Feasibility
Operational feasibility covers two aspects. One is the technical performance aspect and other
is the acceptance. Operational feasibility determines how the proposed system will fit in the
current operations and what, if any job restructuring and retraining may be needed to
implement the system.
In the system operational feasibility checks, whether the user who is going to use the system is
able to work with the software’s with which the system is coded and also the mind of the user
4
going to use the system. If the user does not understand or is able to work on the system further
development is of waste
Behavioural Feasibility
Behaviour feasibility determines how much effort will go in the proposed information
system and in education and training efficiency on the new system.
It is a measure of how well the solution will work in the organization. It is also a measure of
how people feel about the application. Behaviour feasibility is people oriented. Some question
arises in the behaviour feasibility, we discuss on this question.
Q-1 Is the problem worth solving or will the solution to the problem work?
Ans. Yes, the problem is off course worth solving because the system existing today is more
time consuming and full of extra content like advertisement, other application link etc. so, the
problem is worth solving.
5
CHAPTER 3. DFD
Level 0:
Level 1:
Level 2:
6
CHAPTER 4. S/W & H/W REQUIREMENT SPECIFICATION
The project is being developed in Unity engine. Unity engine is used as front end. And for back
end C# is used. We use Android SDK to switch the platform to Android in Unity. C# is used for
event Handling.
Unity (engine)
A 3D engine of course, is a physics engine that handles the laws and behaviors of various game
objects.
C#
It also handles the rendering of graphics, lighting and physics like gravity and momentum and
may even have some gameplay elements included.
If you want to create a 3D engine from scratch, you’ll need to code everything from the way a
glass falls off a table down to the way it bounces and refracts light on the way down.
Unity3D is one of the simplest and has an interface that makes it almost ‘game maker’ like. It
also has the advantage of being truly cross platform.
The hardware and software requirements for building apps in Unity3D vary depending on your
operating system and the digital platforms for which you are developing. Click from the
following list to find out more.
• Windows-based requirements
• Mac-based requirements
• Additional requirements by platform
• iOS
• Android
• Windows Mobile
Windows-Based Requirements
Computers running Microsoft Windows must meet the following minimum hardware and
software requirements.
Dual-core 64-bit processor
8 GB of memory
Up to 24 GB of internal storage (Unity3D: 4GB, Android SDK: 2GB, Windows SDK: 4GB, plus
ample space for multiple complex projects) Network interface card Windows 10, Windows 8.1
Update, Windows 8, and Windows 7
7
Mac-Based Requirements
Apple computers must meet the following minimum hardware and software requirements.x86-64
processor (64-bit Mac with an Intel Core 2 Duo, Intel Core i3, Intel Core i5, Intel Core i7, or
Xeon processor)
8 GB of memory
150 GB of internal storage (Unity3D: 4GB, Storage for multiple, complex projects: 10GB, Apple
XCode: varies, depending on the features and simulators you install, and the number of earlier
versions of iOS your app needs to support) Network interface card Mac OS X version 10.7 and
above Java SE 7 runtime (Required by Eclipse. You are prompted to install Java SE 7 runtime
the first time you launch Konya Visualizer.) Additional Requirements by Platform Along with
those previously listed, each development platform has additional requirements. Detailed
information on how to meet these requirements is provided in the procedures for installing each
platform's respective software development kit (SDK) and emulator.
IOS
Developing apps for iOS includes the following requirements. IOS-related code and applications
can only be developed on a Mac OS computer the latest version of XCode, the Apple SDK for
creating iOS apps Android Developing apps for Android includes the following requirements.
8
• Windows Phone 8.1 Update 1 Emulators
• For Windows 8.0 Mobile Devices
• A processor that supports Second Level Address Translation (SLAT)
• Windows 8 Pro edition or greater
• 8 GB of internal storage
• 4 GB memory
• Windows Phone SDK 8.0
• Visual Studio Express 2013 for Windows
Systems design is simply the design of systems. It implies a systematic and rigorous approach to
design—an approach demanded by the scale and complexity of many systems problems. The
purpose of System Design is to create a technical solution that satisfies the functional
requirements for the system. At this point in the project lifecycle there should be a Functional
Specification, containing a complete description of the operational needs of the various
organizational entities that will use the new system. The challenge is to translate all of this
information into Technical Specifications that accurately describe the design of the system, and
that can be used as input to System Construction.
9
The following diagram shows the system design of our project
Game Activity
GameView
Game
Command
Tile Map
Sprite
Input Objects
Control
10
CHAPTER 6. SCREEN SHOTS WITH CODING
Screenshots
11
12
13
14
15
16
Coding
Chest.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.Collectables
{
[SerializeField]
protected Animator m_Animator;
[SerializeField]
protected Collider2D m_Collider2D;
[SerializeField]
protected SpriteRenderer m_SpriteRenderer;
[SerializeField]
protected bool m_UseOnTriggerEnter2D = true;
[SerializeField]
protected int m_MinimumCoins = 5;
[SerializeField]
protected int m_MaximumCoins = 10;
[SerializeField]
protected CoinRigidbody2D m_CoinRigidbody2D;
[SerializeField]
protected Transform m_SpawnPoint;
[SerializeField]
protected ParticleSystem m_ParticleSystem;
[SerializeField]
[Range (-100f, 100f)]
protected float m_RandomForceYMinimum = -10f;
[SerializeField]
[Range (-100f, 100f)]
protected float m_RandomForceYMaximum = 10f;
[SerializeField]
[Range (-100f, 100f)]
protected float m_RandomForceXMinimum = -10f;
[SerializeField]
[Range (-100f, 100f)]
protected float m_RandomForceXMaximum = 10f;
17
}
}
18
public virtual float RandomForceYMinimum {
get {
return m_RandomForceYMinimum;
}
set {
m_RandomForceYMinimum = value;
}
}
19
}
Coin.cs
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.Collectables
{
public class Coin : Collectable
{
[SerializeField]
protected ParticleSystem m_ParticleSystem;
[SerializeField]
protected SpriteRenderer m_SpriteRenderer;
[SerializeField]
20
protected Collider2D m_Collider2D;
[SerializeField]
protected Animator m_Animator;
[SerializeField]
protected bool m_UseOnTriggerEnter2D = true;
21
m_ParticleSystem.Play ();
m_SpriteRenderer.enabled = false;
m_Collider2D.enabled = false;
Destroy (gameObject, m_ParticleSystem.main.duration);
AudioManager.Singleton.PlayCoinSound (transform.position);
}
}
}
Eye.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.Enemies
{
[SerializeField]
protected float m_Radius = 1f;
[SerializeField]
protected Transform m_Pupil;
[SerializeField]
protected Transform m_Eyelid;
[SerializeField]
protected float m_MaximumDistance = 5f;
[SerializeField]
protected Character m_LatestCharacter;
[SerializeField]
protected Vector3 m_InitialPosition;
[SerializeField]
protected float m_Speed = 0.01f;
[SerializeField]
protected float m_DeadSpeed = 0.005f;
[SerializeField]
protected Vector3 m_DeadPosition;
protected Vector3 m_PupilDestination;
22
get {
return m_Pupil;
}
}
23
float speed = m_Speed;
Vector3 distanceToTarget = m_LatestCharacter.transform.position - m_Pupil.position;
if ( m_LatestCharacter.IsDead.Value )
{
speed = m_DeadSpeed;
distanceToTarget = Vector3.ClampMagnitude ( m_DeadPosition, m_Radius );
Vector3 finalPupilPosition = transform.position + distanceToTarget;
m_PupilDestination = finalPupilPosition;
}
else
{
float distance = Vector3.Distance ( m_LatestCharacter.transform.position, transform.parent.position );
if ( distance <= m_MaximumDistance )
{
distanceToTarget = Vector3.ClampMagnitude ( distanceToTarget, m_Radius );
}
else
{
distanceToTarget = Vector3.ClampMagnitude ( m_InitialPosition, m_Radius );
}
Vector3 finalPupilPosition = transform.position + distanceToTarget;
m_PupilDestination = finalPupilPosition;
}
m_Pupil.position = Vector3.MoveTowards ( m_Pupil.position, m_PupilDestination, speed );
}
}
Mace.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
using RedRunner.Utilities;
namespace RedRunner.Enemies
{
[SerializeField]
protected Collider2D m_Collider2D;
[SerializeField]
protected Animator m_Animator;
[SerializeField]
protected PathFollower m_PathFollower;
[SerializeField]
24
protected float m_MaulSpeed = 0.5f;
[SerializeField]
protected float m_MaulScale = 0.8f;
[SerializeField]
protected ParticleSystem m_ParticleSystem;
void Reset ()
{
m_Animator.SetTrigger ("Reset");
m_PathFollower.Stopped = false;
}
25
Vector3 scale = character.transform.localScale;
scale.y = m_MaulScale;
character.transform.localScale = scale;
}
Kill (character);
}
// Camera.main.GetComponent<CameraControl> ().Shake (3f, 30, 300f);
}
Saw.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.Enemies
{
[SerializeField]
private Collider2D m_Collider2D;
[SerializeField]
private Transform targetRotation;
[SerializeField]
private float m_Speed = 1f;
[SerializeField]
private bool m_RotateClockwise = false;
[SerializeField]
private AudioClip m_DefaultSound;
26
[SerializeField]
private AudioClip m_SawingSound;
[SerializeField]
private AudioSource m_AudioSource;
void Start ()
{
if (targetRotation == null) {
targetRotation = transform;
}
}
void Update ()
{
Vector3 rotation = targetRotation.rotation.eulerAngles;
if (!m_RotateClockwise) {
rotation.z += m_Speed;
} else {
rotation.z -= m_Speed;
}
targetRotation.rotation = Quaternion.Euler (rotation);
}
27
}
m_AudioSource.Play ();
}
}
Spike.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.Enemies
{
[SerializeField]
private Collider2D m_Collider2D;
[SerializeField]
private FixedJoint2D m_FixedJoint2D;
28
Kill (character);
}
}
}
Water.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.Enemies
{
[SerializeField]
private Collider2D m_Collider2D;
29
ParticleSystem particle = Instantiate<ParticleSystem> (target.WaterParticleSystem, spawnPosition,
Quaternion.identity);
Destroy (particle.gameObject, particle.main.duration);
AudioManager.Singleton.PlayWaterSplashSound (transform.position);
}
Collectible.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RedRunner.Collectables
{
[RequireComponent (typeof(SpriteRenderer))]
[RequireComponent (typeof(Collider2D))]
[RequireComponent (typeof(Animator))]
public abstract class Collectable : MonoBehaviour
{
Backgroundblock.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Utilities;
30
namespace RedRunner.TerrainGeneration
{
[SerializeField]
protected float m_MinWidth = 1f;
[SerializeField]
protected float m_MaxWidth = 10f;
Backgroundlayer.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RedRunner.TerrainGeneration
{
[System.Serializable]
31
public struct BackgroundLayer
{
Block.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RedRunner.TerrainGeneration
{
[SerializeField]
protected float m_Width;
[SerializeField]
protected float m_Probability = 1f;
32
{
TerrainGeneretor.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedRunner.Characters;
namespace RedRunner.TerrainGeneration
{
33
[SerializeField]
protected float m_DestroyRange = 100f;
[SerializeField]
protected float m_GenerateRange = 100f;
[SerializeField]
protected float m_BackgroundGenerateRange = 200f;
[SerializeField]
protected Character m_Character;
protected Block m_LastBlock;
protected BackgroundBlock m_LastBackgroundBlock;
protected float m_RemoveTime = 0f;
protected bool m_Reset = false;
34
}
35
}
else if ( m_GeneratedMiddleBlocksCount < m_Settings.MiddleBlocksCount ||
m_Settings.MiddleBlocksCount <= 0 )
{
isMiddle = true;
block = ChooseFrom ( m_Settings.MiddleBlocks );
}
else if ( m_GeneratedEndBlocksCount < m_Settings.EndBlocksCount || m_Settings.EndBlocksCount <=
0)
{
isEnd = true;
block = ChooseFrom ( m_Settings.EndBlocks );
}
if ( m_LastBlock != null )
{
newX = m_CurrentX + m_LastBlock.Width;
}
else
{
newX = 0f;
}
if ( block != null && ( m_LastBlock == null || newX < m_Character.transform.position.x +
m_GenerateRange ) )
{
if ( isStart )
{
if ( m_Settings.StartBlocksCount > 0 )
{
m_GeneratedStartBlocksCount++;
}
}
else if ( isMiddle )
{
if ( m_Settings.MiddleBlocksCount > 0 )
{
m_GeneratedMiddleBlocksCount++;
}
}
else if ( isEnd )
{
if ( m_Settings.EndBlocksCount > 0 )
{
m_GeneratedEndBlocksCount++;
}
}
CreateBlock ( block, current );
}
}
for ( int i = 0; i < m_BackgroundLayers.Length; i++ )
{
int random = Random.Range ( 0, 2 );
bool generate = random == 1 ? true : false;
if ( !generate )
36
{
continue;
}
Vector3 current = new Vector3 ( m_BackgroundLayers [ i ].CurrentX, 0f, 0f );
BackgroundBlock block = ( BackgroundBlock )ChooseFrom ( m_BackgroundLayers [ i ].Blocks );
float newX = 0f;
if ( m_BackgroundLayers [ i ].LastBlock != null )
{
newX = m_BackgroundLayers [ i ].CurrentX + m_BackgroundLayers [ i ].LastBlock.Width;
}
else
{
newX = 0f;
}
if ( block != null && ( m_BackgroundLayers [ i ].LastBlock == null || newX <
m_Character.transform.position.x + m_BackgroundGenerateRange ) )
{
CreateBackgroundBlock ( block, current, m_BackgroundLayers [ i ], i );
}
}
}
37
foreach ( KeyValuePair<Vector3, Block> block in m_Blocks )
{
blocksToRemove.Add ( block.Value );
}
List<BackgroundBlock> backgroundBlocksToRemove = new List<BackgroundBlock> ();
foreach ( KeyValuePair<Vector3, BackgroundBlock> block in m_BackgroundBlocks )
{
backgroundBlocksToRemove.Add ( block.Value );
}
for ( int i = 0; i < blocksToRemove.Count; i++ )
{
RemoveBlock ( blocksToRemove [ i ] );
}
for ( int i = 0; i < backgroundBlocksToRemove.Count; i++ )
{
RemoveBackgroundBlock ( backgroundBlocksToRemove [ i ] );
}
}
38
public virtual bool CreateBackgroundBlock ( BackgroundBlock blockPrefab, Vector3 position,
BackgroundLayer layer, int layerIndex )
{
if ( blockPrefab == null )
{
return false;
}
blockPrefab.PreGenerate ( this );
position.z = blockPrefab.transform.position.z;
position.y = blockPrefab.transform.position.y;
BackgroundBlock block = Instantiate<BackgroundBlock> ( blockPrefab, position, Quaternion.identity );
float width = Random.Range ( block.MinWidth, block.MaxWidth );
m_BackgroundLayers [ layerIndex ].PreviousX = m_BackgroundLayers [ layerIndex ].CurrentX;
m_BackgroundLayers [ layerIndex ].CurrentX += width;
block.Width = width;
m_BackgroundLayers [ layerIndex ].LastBlock = block;
m_BackgroundBlocks.Add ( position, block );
blockPrefab.PostGenerate ( this );
if ( m_BackgroundLayers [ layerIndex ].CurrentX > m_FathestBackgroundX )
{
m_FathestBackgroundX = m_BackgroundLayers [ layerIndex ].CurrentX;
}
return true;
}
39
for ( int i = 0; i < blocks.Length; i++ )
{
if ( randomPoint < blocks [ i ].Probability )
{
return blocks [ i ];
}
else
{
randomPoint -= blocks [ i ].Probability;
}
}
return blocks [ blocks.Length - 1 ];
}
TerrainGeneraorSettings.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RedRunner.TerrainGeneration
{
[SerializeField]
protected float m_LevelLength = 200f;
[SerializeField]
protected int m_StartBlocksCount = 1;
[SerializeField]
protected int m_MiddleBlocksCount = -1;
[SerializeField]
protected int m_EndBlocksCount = 1;
[SerializeField]
protected Block[] m_StartBlocks;
[SerializeField]
protected Block[] m_MiddleBlocks;
[SerializeField]
protected Block[] m_EndBlocks;
[SerializeField]
protected BackgroundLayer[] m_BackgroundLayers;
40
public int StartBlocksCount {
get {
return m_StartBlocksCount;
}
}
41
CHAPTER 7. VALIDATION CHECKS
Score Validation
When player collides with fruit the score board should maintain the consistency of score.
ex: score=3 on collides with fruit the score should incremented by 1 i.e.; score=4;
Restart Validation
when Player drowned in water or player collides with danger obstacles the game should not end
it should give the option Restart to user.
User Validation
User Can play by login/guest mode so that it would be easy to access game in a less runtime;
On click Validation
It should give the option to user like exit home and restart and it should redirect as per
the choice.
42
CHAPTER 8. IMPLEMENTATION AND MAINTENANCE
System Implementation Six major activities
• Coding
• Testing
• Installation
• Documentation
• Support
The Process of Coding, Testing and Installation
Coding
Physical design specifications are turned into working computer code
Testing
Tests are performed using various strategies
• Testing can be performed in parallel with coding
Installation
Process during which the current system is replaced by the new system
Managing Programming
Project Manager’s Tasks during Programming
1. The Programmer Paradox
• More is not always better than less!
• After the “right” number of people are assigned to a programming task, adding more
people slow down rather than speeds up completion of the project.
• Projects requiring a large team should be broken into a series of independent, smaller parts.
Coordinating Activities
• Weekly (hopefully brief) meetings
• Create and follow standards
• Organize programmer’s work areas
• Development area
• Testing area
• Production area
• Implement change control mechanisms
43
• Use program log to monitor program changes
DESIGNING TESTS
System Testing
• Requirements Testing
– Ensures that integration did not cause new errors
• Usability Testing
– Tests how easy and error-free the system is in use
• Security Testing
– Assures that security functions are handled properly
• Performance Testing
– Assures that the system works under high volumes of activity
• Documentation Testing
– Analysts check the accuracy of documentation
Acceptance Testing
• Alpha Testing
– Performed by users to assure they accept the system;
frequently repeats earlier tests
• Beta Testing
– Uses real data, not test data. Actual users monitor for errors or needed improvements.
Developing Documentation
• User Documentation
– Intended to help users operate the systems
Producing Documentation
• High quality documentation takes about 3 hours per page or 2 hours per screen.
• The task should not be left to the end of the project.
44
• Time required to develop, and test user documentation should be built into project plan.
• On-line documentation is growing in importance.
Platform Maintenance
• Special considerations (continued)
– Re-registration
• When content significantly changes, site may need to be re-registered with search engines
– Future Editions
• Consistency is important to users
• Post indications of future changes to the site
• Batch changes
45
CHAPTER 9. TESTING (TESTING TECHNIQUES AND TESTING
STRATEGIES)
Functional Testing
Function testing verifies that each function of the software application operates in
conformance with the requirement specification. The testing mainly involves black box
testing and it is not concerned with the source code. The functionality of the system by
providing appropriate input, verifying the output and comparing the actual result with
expected result.
Functional testing can be performed on survival of the fastest to check that the appropriate output
is coming from the input provided. Each Activity in Survival of the fastest include validation in
which the next activity is depend upon the user choice.
Structural Testing
The structural testing is the testing of the structure of the system or component. Structural testing
is often referred to as ‘white box’ or ‘glass box’ or ‘clear-box testing’ because in structural
testing, testing is done to check what is happening inside the system. In structural testing the
testers are required to have the knowledge of the internal implementations of the code. Here the
testers require knowledge of how the software is implemented, how it works.
In Survival of the fastest structural testing is done to check how the loops in the software are
working. Different test cases may be derived to exercise the loop once, twice, and many times.
This may be done regardless of the functionality of the software. Structural testing checks
whether the code written is correct or not. The code in tour and travel is written correctly and is
error free. It checks that the menu option is working properly or not. And all the menu Items
including the correct link to the correct from.
Levels of Testing
There are different levels during the process of Testing. Levels of testing include the different
methodologies that can be used while conducting Software Testing. Following are the main
levels of Software Testing:
• Functional Testing.
• Non-Functional Testing.
46
Functional Testing
Functional testing can be performed on survival of the fastest to check that the appropriate output
is coming from the input provided. Each Activity in Survival of the fastest include validation in
which the next activity is depend upon the user choice.
• Unit Testing
Is this testing is done by the developers on the individual units of source code assigned
area. The developers use test data that is separate from the test data of the quality
assurance team. The goal of unit testing is to isolate each part of the program and show
that individual parts are correct in terms of requirements and functionality.
In this we have tested every module separately just to know that they are working
properly and giving the desired output.
• Integration Testing
In this phase of testing we are emphasizing on how two or more applications or functions
are working with each other. like how they are activities are depending upon each other,
which activity is come under which module.
• System Testing
This is the next level in the testing and tests the system as a whole. Once all the
components are integrated, the application as a whole is tested rigorously to see that it
meets Quality Standards.
This type of testing is performed by a specialized testing team.
System testing is so important because of the following reasons:
System Testing is the first step in the Software Development Life Cycle, where the
application is tested.
The application is tested thoroughly to verify that it meets the functional and technical
specifications.
The application is tested in an environment which is very close to the production
environment where the application will be deployed.
47
System Testing enables us to test, verify and validate both the business requirements as
well as the Applications Architecture.
• Alpha Testing
This test is the first stage of testing and will be performed amongst the teams
(developer and QA teams). Unit testing, integration testing and system testing when
combined are known as alpha testing. During this phase, the following will be tested in
the application:
▪ Spelling Mistakes
▪ Broken Links
▪ Cloudy Directions
▪ The Application will be tested on machines with the lowest specification
to test loading times and any latency problems.
• Beta Testing
This test is performed after Alpha testing has been successfully performed. In beta
testing a sample of the intended audience tests the application. Beta testing is also
known as pre-release testing. Beta test versions of software are ideally distributed to a
wide audience on the Web, partly to give the program a "real-world" test and partly to
provide a preview of the next release. In this phase the audience will be testing the
following
• Getting the feedback, the project team can fix the problems before releasing the software
to the actual users.
• The more issues you fix that solve real user problems, the higher the quality of your
application will be.
• Having a higher-quality application when you release to the general public will increase
customer satisfaction.
Non-Functional Testing
This section is based upon the testing of the application from its non-functional attributes.
Non-functional testing of Software involves testing the Software from the requirements which
are non-functional in nature related but important a well such as performance, security, user
interface etc. Some of the important and commonly used non-functional testing types are
mentioned as follows:
48
i. Performance Testing
It is mostly used to identify any bottlenecks or performance issues rather than finding the bugs in
software. There are different causes which contribute in lowering the performance of software:
• Network delay.
• Client-side processing.
• Data rendering.
Performance testing is considered as one of the important and mandatory testing types in terms
of following aspects:
49
CHAPTER 10. SYSTEM SECURITY AND MEASURES
Games are a great way to kill the time and most of you probably already played video games.
Some of you have already been tempted to cheat in video game because somehow, they find it
funnier like this. There is a lot of kind of games over internet. Some of them are even playable
under your browser. To speak about the most famous technologies used right now, we have
Flash, Html5 and Unity3D. Today, we’ll be talking about scoring games. More exactly, we’ll be
talking about scoring game made with the game engine Unity 3D.
Let’s find a web player game made with unity on the internet. We've found a scoring game
named “Rookie Jump” over the internet, graphics looks cool, but something is wrong. When we
look at the scoreboard, two peoples are over 1 million points and others player from the top 100
can't pass the cap of 100000.
The website is asking me to create an account in order to save my progress and score on the
scoreboard. Let’s do so... Ok, the account is made now let’s open your browser developer tools
(F12) and look for a file with an extension of “. unity3d”. We’ve found the file
WebPlayer.unity3d.
50
CHAPTER 11. VARIOUS TYPES OF MODULES
Modules
• play
• pause
• restart
• exit
• home
• share
• loading
• jump
• move forward and backward
• collect coins
• display score
Play: -
The modules/function in which user can play the game that includes move jump etc;
Pause:-
It is a module to pause the gameplay when user have some other work to do .
Restart:-
The module that restart the gameplay when user fails to play(Get out);
Exit :-
The module that exit the gameplay while playing the game in order to exit user first needs to
press Pause
and click Exit.
Home:-
The module that will redirect you to main menu/home in the game.
Share :-
It gives you an option to share the game with friends and play with them.
loading :-
It is the first phase in the gameplay that loads the required files to play the game.
Move forward backward and Jump :-
The module that in which user can play as per the gameplay by moving forward and backward
and jump to escape from the obstacles.
Collect Coins and display score:-
In these the player collects the coins and score should be displayed in the screen.
51
CHAPTER 12. FUTURE SCOPE OF THE PROJECT
• Add different skins/color to the player. Customize player outfit and background of the
game like Normal mode, Night mode.
• Add differ obstacles to the game.
• Implement Multiplayer gaming to play with friends.
• Add different levels to the game.
• Implement weapon to player to attack from obstacles.
• Add different outfit(buy) to user. Add super power like skateboard to the player when it
consumes the special power.
• Add Challenges/Achievements to complete those.
52