0% found this document useful (0 votes)
54 views

Complete Paper Solution s2 and f2

The document discusses game development and related concepts. It covers topics like types of games, goals of game development, stages of game development, programming languages used, roles in the gaming industry, and object-oriented programming concepts like polymorphism. It also provides code examples for bank account classes using polymorphism and a code sample to find prime numbers between 2-20. The document contains questions and answers on these topics related to game development and programming.

Uploaded by

Usama Bashir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Complete Paper Solution s2 and f2

The document discusses game development and related concepts. It covers topics like types of games, goals of game development, stages of game development, programming languages used, roles in the gaming industry, and object-oriented programming concepts like polymorphism. It also provides code examples for bank account classes using polymorphism and a code sample to find prime numbers between 2-20. The document contains questions and answers on these topics related to game development and programming.

Uploaded by

Usama Bashir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

PAPER 1 Spring 22

Q2) 1

The process of creating games is called game Development. It includes design, build, test and release of
a game.

Game Engine is a software framework primarily designed for the development of video games and
generally includes relevant libraries and support programs.

Q2) 2 (only do 1, ur choice)


Action games, RPG Games, Adventure games, Simulation games, Strategy games and Sports games are
some types of games.

OR

Computer Games, Professional Sports (games), Party Games.


OR
Multiplayer Games and Single player games

Goals of game development are to develop games and to enable students work with game development
tools like unity and build box.
Another goal is to develop creativity and individuality in problem solving and performing tasks.

Q2) 3 (do whatever u think is required, not all)

Seven Stages of Games Development are:

1. Planning
There has to be an idea for a video game. This is the very first part of the planning stage.
2. Pre-production
In this, we brainstorm how to give life to the many ideas laid out in the planning phase.
3. Production
Character models are designed and Developers write thousands-of-lines-of-source code.
4. Testing
Every feature and mechanic in the game needs to be tested for quality control.
5. Pre-launch
The pre-launch stage is a stressful time for gaming studios. A formal Beta copy is released, the
game will require some marketing.
6. Launch
This is the stage when the game is finally launched after fixing many bugs and crashes.
7. Post-production
The first few months during the post-launch stage are typically spent identifying and squashing
bugs and to provide regular software updates for the game.
Q2) 4

C#, Python , Java, JavaScript, C++, Swift, HTML S 5

Q2) 5

Action games.

Role-playing games.

Strategy games.

Puzzle games.

Simulation games.

Steps of Game Development


Introduction, Development, Twist, Conclusion

(The res t is same as Q3 Planning production and so on 8 steps in total)

Q2) 6

A development team includes these roles or disciplines:

 Designer.
 Artist.
 Programmer.
 Level designer.
 Sound engineer.
 Tester.

Q2) 7

Motherboard

Operating System and Drives

Input Devices (Controllers)

Output Devices

Processor, RAM, and Power Supply

Casing
Controllers

Q2) 8

Roles in gaming Industry


Games Designer

Game Developer

Games Animator

Professional Gamer

Games Publisher

They publish and market games and invest in projects and games developers.

Q3)

Polymorphism means "many forms", and it occurs when we have many classes that are related to each
other by inheritance

Example Function Overriding

class base_class
{

public void gfg();

class derived_class : base_class

public void gfg();

class Main_Method

static void Main()

derived_class d = new derived_class();

d.gfg();

}}

Example Function Overloading

using System;

namespace MethodOverload {

class Program {

// method with one parameter

void display(int a) {

Console.WriteLine("Arguments: " + a);

// method with two parameters

void display(int a, int b) {

Console.WriteLine("Arguments: " + a + " and " + b);

static void Main(string[] args) {

Program p1 = new Program();

p1.display(100);
p1.display(100, 200);

Console.ReadLine();

} }}

Q4)

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace A3Q1

class BankAccount

protected String cust_name;

protected long acc_nnumber;

protected double balance;

public virtual void setInfo()

Console.Write("Enter your Name: ");

cust_name = Console.ReadLine();

Console.Write("Enter you Account Number: ");

acc_nnumber = long.Parse(Console.ReadLine());

public virtual void withdraw()

{
Console.Write("Enter an amount to withdraw: ");

double amount = double.Parse(Console.ReadLine());

if (amount > balance)

Console.WriteLine("You don't have enough balance to withdraw this amount!");

else

balance = balance - amount;

Console.WriteLine("Amount taken: " + amount);

Console.WriteLine("Currrent Balance: " + balance);

} }

public virtual void deposit()

Console.Write("Enter the amount to deposit: ");

double amount = double.Parse(Console.ReadLine());

balance = balance + amount;

Console.WriteLine("Current Balance: " + balance);

public virtual void display()

Console.WriteLine("Account Number: " + acc_nnumber);

Console.WriteLine("Customer Name: " + cust_name);

Console.WriteLine("Current Balance: " + balance);

} }
class CurrentAccount : BankAccount

long checkBookNumber;

public override void setInfo()

balance = 5000;

base.setInfo();

Console.Write("Enter your checkbook number: ");

checkBookNumber = long.Parse(Console.ReadLine());

public override void withdraw()

Console.Write("Enter your checkbook number: ");

long checkbook_number = long.Parse(Console.ReadLine());

if (checkbook_number == checkBookNumber)

Console.Write("Enter an amount to withdraw: ");

double amount = double.Parse(Console.ReadLine());

if (amount > balance)

Console.WriteLine("You don't have enough balance to withdraw this amount!");

else

balance = balance - amount;

Console.WriteLine("Amount taken: " + amount);


Console.WriteLine("Currrent Balance: " + balance);

if (balance < 1000)

balance = balance - (.01 * (1000 - balance));

} } }

else

Console.WriteLine("Enter a valid CheckBook Number!");

} }

public override void deposit()

base.deposit();

} }

class SavingAccount : BankAccount

public override void setInfo()

balance = 2000;

base.setInfo();

public override void deposit()

Console.Write("Enter the amount to deposit: ");

double amount = double.Parse(Console.ReadLine());

balance = balance + amount;


double interest = ((0.01) * amount);

Console.WriteLine("Interest on given amount: " + interest);

balance = balance + interest;

Console.WriteLine("Current Balance after applying interest: " + balance);

public override void withdraw()

Console.Write("Enter an amount to withdraw: ");

double amount = double.Parse(Console.ReadLine());

if (amount > balance)

Console.WriteLine("You don't have enough balance");

else

if (amount > 5000)

Console.WriteLine("You Don't Have Enough Balance");

else

balance = balance - amount;

Console.WriteLine("Amount : " + amount);

Console.WriteLine("Currrent Balance: " + balance);

}
class Program

static void Main(string[] args)

CurrentAccount currentAccount = new CurrentAccount();

SavingAccount savingAccount = new SavingAccount();

Console.Write("ENTER ACCOUNT TYPE! \nPress 1 for savings account\nPress 2 for current


account: ");

int choice = int.Parse(Console.ReadLine());

if (choice == 1)

savingAccount.setInfo();

else if (choice == 2)

currentAccount.setInfo();

else

Console.WriteLine("Invalid Input!");

int ch = 5;

while (ch != 0)

{
Console.WriteLine("Enter 1 to deposit.\nEnter 2 to withdraw.\nEnter 3 to Display.\nEnter 0 to
Exit.");

ch = int.Parse(Console.ReadLine());

switch (ch)

case 1:

if (choice == 1)

savingAccount.deposit();

else if (choice == 2)

currentAccount.deposit();

break;

case 2:

if (choice == 1)

savingAccount.withdraw();

else if (choice == 2)

currentAccount.withdraw();

break;

case 3:

if (choice == 1)

{
savingAccount.display();

else if (choice == 2)

currentAccount.display();

break;

case 0:

break;

default:

Console.WriteLine("Invalid Input!");

break; } } }}}

Q5)

using System;

class Program {

static void Main() {

bool non_Prime = true;

int i, j;

Console.WriteLine("Prime Numbers are : ");

for (i = 2; i <= 20; i++) {

for (j = 2; j <= 20; j++) {

if (i != j && i % j == 0) {

non_prime = True;

break;

} }

if (non_Prime) {

Console.Write("\t" + i);

}
non_Prime = true;

Console.ReadKey();

} }

Q6)

We have learnt many techniques for designing a game and its story in the game development class. We
were taught about the history of game development. In Class, we learnt C sharp language while in labs
we implemented that using gaming engines like Unity and Build Box. We built several 2d and 3d games
using unity and Build box. In Unity we used different types of scripts to move our players, and learnt
about the basic functionality of all its tools. Our teacher taught us about different Game styles and
gameplay options and in the end, all of us knew the basic Programming fundamentals and Game engine
principles. Now each and every one of us can decide whether to pursue game development as a career
or not, all thanks to our teachers and their hard work. I am interested in the designing aspect of game
development. From creating 3d character and environments to animating them and much more.

Paper 1 End
Paper 2 Start
Q2)

Unity is a professional game development platform. It is easier for those who are just getting started and
want to learn about game development as it is user-friendly for new people. It involves coding. (Games
made with these include in-Game Analytics and Multi-player Gaming Network)

Build Box is a development platform focused on game creation without programming. It is the easiest
drag and drop game maker software. We can make our own games without coding. Unity panels:
Q3)

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class CarController : MonoBehaviour

private bool move = false;

private bool isGrounded = false;

public Rigidbody2D rb;

public float speed = 20f;

public float rotationSpeed = 2f;

// Update is called once per frame

private void Update()

if (Input.GetButtonDown ("Fire1")) //Mosue left click button pressed

move = true;

if (Input.GetButtonUp("Fire1")) //Mouse right click button released

move = false;

} }

private void FixedUpdate()

if (move == true)

if (isGrounded)

rb.AddForce(transform.right * speed * Time.fixedDeltaTime * 100f, ForceMode2D.Force);


}

else

rb.AddTorque(rotationSpeed * rotationSpeed * Time.fixedDeltaTime * 100f,


ForceMode2D.Force);

}}

if (rb.position.y < -10f)

FindObjectOfType<GameManager>().EndGame();

}}

private void OnCollisionEnter2D()

isGrounded = true;

private void OnCollisionExit2D()

isGrounded = false;

}}

Q4) (easy just read)


An exception is a problem that arises during the execution of a program. A C++ exception is a response
to an exceptional circumstance that arises while a program is running, such as an attempt to divide by
zero.
Its keywords are try, catch, and throw.

C# interface limitations include mpq_class and Templated Reading, Subclassing and Templated


Expressions

An abstract class allows you to create functionality that subclasses can implement or override. An
interface only allows you to define functionality, not implement it.

An interface contains the abstract methods while inheriting classes contain code for each method.

OR
(The inheritance concept permits the subclasses to inherit the properties of the base class. On the other
hand, an interface is used to implement the abstract class and multiple inheritance.)

Q5)

Same as Question 3 In paper 1

Q6)

Alpha:

The Alpha is a version of the game that contains 100% of the basic features, the game interaction and
logic.

(It typically doesn’t have polished graphics and sounds nor all the “levels” but it should be possible to
play it and have a clear sense of the final game experience.)

The alpha phase usually ends with a feature freeze

Beta:

The Beta version of a game is basically the finished game, except for some visual and audio fixes and
polishing, tuning, and lots of bugs. The Beta is given to play testers and selected users (open beta), for
debugging, and usability test.

Gold:

The Gold phase, or release candidate, is the complete, ideally bug-free, game which is submitted for
release.

It may still have to pass certain certification tests that depend on the platform/console.

Post Mortem:

A post-mortem is where a team reflects on what went wrong with something they did, and documents it
and/or amends their process to stop it happening again.

Q7)

https://www.chegg.com/homework-help/questions-and-answers/c-1-create-class-rationalnumber-
fractions-see-problem-108-p490-following-capabilities-crea-q51121248
https://quizlet.com/explanations/questions/create-a-class-rationalnumber-tions-with-these-
capabilities-create-a-constructor-that-prevents-a-0-denominator-in-a-tion-reduces-or-simplifi-
86c9f8c8-64b7f4b6-4cee-435a-bdc3-3e1870d1ad07

Q8)

Same as Question 5 in paper 1 change (20 to 100)

You might also like