GP Assign 01
GP Assign 01
CS-304
Answer:
Following are the most popular kinds of software a game programmer might produce in a video game
production:
Go dot
Adobe Animate
Unity
Android Studio
Pygame
Adventure game Studios
Unreal Engine
In the beginning of computer games (from the mid-1970s to mid-1980s), a game developer additionally
assumed the employment of an architect and craftsman. This was by and large in light of the fact that
the capacities of early PCs were restricted to the point that having particular work force for each
capacity was superfluous. Game ideas were commonly light and games were just intended to be played
for a couple of moments all at once, however more significantly, craftsmanship substance and varieties
in ongoing interaction were obliged by PCs' restricted force.
Afterward, as particular arcade equipment and home frameworks turned out to be all the more
remarkable, game designers could create further storylines and could incorporate such highlights as
high-goal and full shading illustrations, material science, progressed man-made consciousness and
computerized sound. Innovation has progressed to such an extraordinary degree that contemporary
games as a rule brag 3D designs and full movement video utilizing resources created by proficient visual
craftsmen. These days, the disdainful term "software engineer craftsmanship" has come to infer the sort
of brilliant tones and blocky plan that were common of early computer games.
Answer:
The term Indie stands for ‘Independent.’ Indie Game development is how small teams create a game,
and there is no specific financial support from leading publishers.
◦ On the console side, digital distribution allows publishers to release titles without meeting
minimum quantity requirements from first parties and without having to pay first party royalties
for those quantities upfront.
Digital distribution has opened the door for many small indie developers to reach a much wider
audience.
◦ The biggest change in gaming in the last several years has been the meteoric rise
of mobile gaming
◦ Major feature of mobile games is the lower development costs because mobile
games are typically more limited in scope than console
◦ This low cost has also allowed for more development outside of the United States
and Japan. Mobile development studios can be found all across the globe: South
Korea and Eastern Europe have become hotbeds of mobile development.
◦ Independent games
◦ Seeks Innovation and explore new aspects in game design and storytelling and even art
forms
Answer:
Artificial intelligence plays very important role in game development, if we observe a game we think that
there is two characters in game one is human who is playing game and on other side the computer plays
as his opposition. In modern game technology, the computer side actions are performed on the basis of
artificial intelligence, like in fighting game the enemies are working on AI principles.
If we see the previous techniques, we think there is hard coded rules written by the programmer to run
the game, this make the game less interesting and boring because all the time everything is happening
in same manner. Then the techniques of path finding and decision tree arises which makes the games
interesting because the games are running on a proper algorithm and game works on their intelligent,
they find their own path and follow the algorithm.
Here we also discuss the NPCs, to make the NPCs better we should use the AI techniques to make the
NPCs intelligent and working on the basis of environment. We should use random forest and path
finding techniques and other machine learning algorithms to make them authentic to work better.
T1: Understanding two C# data types: value type and reference type
1) what’s the operator ‘using’ used for? what are the Unity Engine and
System.Collections?
Answer:
‘Using’ imports namespace. Namespaces are a collection of classes and other data
types that are used to categorize the library. Unity Engine we can say that is a collection
of all the classes related to Unity that are imported by ‘using’ keyword.
System.Collections is all the classes in .Net related to holding groups of data such as
hash table and array list. It is required whenever you use a class in that namespace. For
example, if you want to write to files then you need "System.IO."
2) When we create a new C# class in Unity, it automatically inherits from
the MonoBehaviour class, which is Unity's base class for components.
Answer:
When we create a new C# class in Unity, it automatically inherits from
the MonoBehaviour class, which is Unity's base class for components.
Question 4 T1 (a):
What is the printout in the Console window? Does the sphere change its
position? Why? Is the Vector3 a value type or reference type? When we amend
‘v1’, does the ‘transform.position’ change as well? Analyze the code and explain.
Answer:
In console window there is no change in the position of all three axis. It prints the same
position. Sphere do not change the position because due to value type datatype the
original value is not updated it only changes the variable so that’s why it prints out same
position and the sphere’s position does not change. On amending v1 the original value
of transform.position does not change because in this case it is a value type variable.
Question 4 T1 (b):
What is the printout in the Console window? Does the sphere change its
position? Why? Is the variable ‘trans’ with the type ‘Transform’ a value type or
reference type (of data)? When we amend ‘trans’ (by changing its ‘position), does
the ‘transform.position’ change as well? Analyze the code and explain.
Answer:
In console tab, there is a change in the position of all three axis. It prints the updated
position of the cube. Sphere changes the position due to reference type datatype the
original value is updated it changes the reference so that’s why it prints out updated
position and the sphere’s position is changed. On amending trans the reference to the
value of transform.position changes because in this case it is a reference type variable.
Question 4 T2
1) Define a new class called GameObject2D in the script ‘CSharpDemo.cs’ as
below: using UnityEngine; using System.Collections; class GameObject2D
{string name;} public class CSharpDemo : MonoBehaviour { … } Answer the
questions: what’s the accessibility of the attribute ‘name’? public, protected or
private?
Answer:
As the scope is not defined by the programmer so by default it will be treated as private
variable.
2)
using UnityEngine;
public class GameObject2D
{
string name,va lue;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
public class CSharpDemo : MonoBehaviour
{
void Start()
{
}
void Update()
{
}
}
3)
using UnityEngine;
public class GameObject2D
{
string name,value;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
void createGameObject2D()
{
4)
using UnityEngine;
public class GameObject2D
{
string name,value;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
5)
using UnityEngine;
public class GameObject2D
{
string name,value;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
class Rectangle : GameObject2D
{
int width, height;
string name;
public Rectangle (string n, int w, int h)
{
name = n;
width = w;
height = h;
}
}
6)
using UnityEngine;
public class GameObject2D
{
string name,value;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
class Rectangle : GameObject2D
{
int width, height;
string name;
public Rectangle (string n, int w, int h)
{
name = n;
width = w;
height = h;
}
Rectangle Rec1 = new Rectangle("Rectangle1", 60, 30);
Rectangle Rec2 = new Rectangle("Rectangle2", 20, 40);
Rectangle Rec3 = new Rectangle("Rectangle3", 90, 50);
}
void Start()
{
createRectangle();
}
void createRectangle()
{
var arraylist1 = new ArrayList()
{"Rectangle1",60, 30};
7)
using UnityEngine;
public class GameObject2D
{
string name,value;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
class Rectangle : GameObject2D
{
public
int width, height;
string name;
public Rectangle (string n, int w, int h)
{
name = n;
width = w;
height = h;
}
void Start()
{
reference_DataType();}
void reference_DataType()
{
Rectangle Rec1= new Rectangle("Rec1",30,50);
Rectangle Rec2= Rec1;
Debug.Log(“Rectangle one:”);
Debug.Log(Rec1.name);
Debug.Log(Rec1.width);
Debug.Log(Rec1.height);
Debug.Log(“Rectangle two:”);
Debug.Log(Rec2.name);
Debug.Log(Rec2.width);
Debug.Log(Rec2.height);
}
}
b.
using UnityEngine;
public class GameObject2D
{
string name,value;
void setName()
{
name = value;
}
string getName()
{
return name;
}
}
class Rectangle : GameObject2D
{
public
int width, height;
string name;
public Rectangle (string n, int w, int h)
{
name = n;
width = w;
height = h;
}
void Start()
{
reference_DataType();
}
void reference_DataType()
{
Rectangle Rec1= new Rectangle("Rec1",80,20);
Rectangle Rec2= new Rectangle("Rec2",40,50);
Debug.Log(“Rectangle one:”);
Debug.Log(Rec1.name);
Debug.Log(Rec1.width);
Debug.Log(Rec1.height);
Debug.Log(“Rectangle two:”);
Debug.Log(Rec2.name);
Debug.Log(Rec2.width);
Debug.Log(Rec2.height);
}
}