wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Chapter 18 - 21 Video Game Programming

Total questions: 80

Worksheet time: 40mins

Name
Class
Date
1.

Which of the following best describes a sound file that is smaller in size and may have less sound quality?

a)

Mini-sound

b)

Compressed

c)

Uncompressed

d)

Compromised

2.

Which of the following file formats is most likely to be used to hold short, uncompressed sounds of the highest quality?

a)

WAV

b)

MP3

c)

PNG

d)

MP4

3.

Some online sound effects can be freely downloaded, as long as you do what?

a)

Charge your users a royalty

b)

Use sounds that are shorter than 10 seconds

c)

Obey the licensing terms

d)

Only download in MP3 format

4.

What kind of law protects authors from misuse of their original, creative works?

a)

Creative Law

b)

Tax Law

c)

Copyright Law

d)

Download Law

5.

What term is used to describe a small fee you must pay each time you distribute software that contains someone else's licensed work?

a)

Royalty

b)

Creative Common Fee

c)

Tax Fee

d)

Per Diem

6.

Which of the following is an advantage to creating your own sound files?

a)

No fees or licensing restrictions

b)

The sounds will take up less disk space and memory

c)

The sounds will be of higher quality

d)

The sounds can be much longer than normal

7.

Which approach will allow you to create your own sound files?

a)

All of these will work

b)

Create sounds using free, online websites

c)

Use your own musical talent and instruments

d)

Record sounds through your smart-phone

8.

What do you normally look for when trying to find background music?

a)

A file that can be seamlessly looped from the end back to the beginning

b)

A song that includes vocals (words)

c)

A file that has especially up-tempo music

d)

A file that is uncompressed for highest quality

9.

How are sound files stored in a Unity project?

a)

As a Component attached to a GameObject by a script

b)

As a GameObject in the Hierarchy

c)

As a file in an asset folder

d)

All of these will work

10.

Which of the following things acts like the game's speaker and is limited to one per scene?

a)

Audio Speaker

b)

Audio Source

c)

Audio Clip

d)

Audio Listener

11.

Which of the following things represents a single sound source and is limited to one per GameObject?

a)

Audio Source

b)

Audio Listener

c)

Audio Clip

d)

Audio Speaker

12.

Which of the following would be the best choice to hold an Audio Listener?


a)

A Sprite Renderer component

b)

Main Camera object

c)

An audio asset

d)

A prefab object

13.

Which of the following is NOT a common Audio Source setting?

a)

Volume

b)

Loop

c)

Duration

d)

Play on Awake

14.

Where might you attach an Audio Source to most effectively play continuous background music?


a)

To an Audio Listener component

b)

Main Camera object

c)

A controller script

d)

A prefab object

15.

Which of the following combinations of Audio Source settings should be used for background music?

a)

Play on Awake = true, Loop = true

b)

Play on Awake = false, Loop = false

c)

Play on Awake = false, Loop = true

d)

Play on Awake = true, Loop = false

16.

What type of variable do you declare in a script in order to manage a sound attached to a GameObject?

a)

AudioAsset

b)

SoundFile

c)

AudioSource

d)

AudioListener

17.

What Audio Source setting should you make in order to play a sound only under script control?

a)

Volume = 0

b)

Loop = true

c)

Play on Awake = false

d)

Play on Awake = true

18.

Which of the following is NOT a function we described on an AudioSource component?

a)

Pause()

b)

Stop()

c)

Mix()

d)

Play()

19.

How do you check and see if an Audio Source is currently playing any sound?

a)

Review the "volume" setting in the Inspector panel

b)

Call the isOn() function

c)

Read the "isPlaying" property

d)

There is no way to see if an Audio Source is currently playing a sound

20.

What Audio Source property do you set if you want to change the current sound that can be played?

a)

wav

b)

sound

c)

audio

d)

clip

21.

Which of the following mathematical terms best describes something that has a magnitude and a direction?

a)

X-coordinate

b)

Vector

c)

Point

d)

Y-coordinate

22.

How would you create a vector that starts at (X1, Y1) and ends at point (X2, Y2)?

a)

(X2 / X1, Y2 / Y1)

b)

(X2 - X1, Y2 - Y1)

c)

(X1 * X2, Y1 * Y2)

d)

(X1 + X2, Y1 + Y2)

23.

If a Vector2 variable named "result" is initialized with the point (6, 3), what is the value in the vector after the following line of code is run?

 

result /= 3.0F;

a)

(2, 1)

b)

(0.5, 1)

c)

A run-time error will occur

d)

(9, 6)

24.

Which of the following Vector2 functions will change the length of the vector to 1 while keeping it pointing in the same direction?

a)

Normalize()

b)

Reduce()

c)

Magnify()

d)

Unity()

25.

If the following line of code already exists, which answer contains the next line of code that will successfully apply a force to the object in the "up" direction?

 

Rigidbody2D rb = GetComponent<Rigidbody2D>();

a)

rb.Transform(0, 1.0F);

b)

rb.Rotate( new Vector3 (0, 0, 1.0F) );

c)

rb.AddForce( new Vector2(-1.0F, 0) );

d)

rb.AddForce( new Vector2(0, 1.0F) );

26.

If the following line of code already exists, which answer contains the next line of code that will successfully rotate the object around the Z-axis?

 

Rigidbody2D rb = GetComponent<Rigidbody2D>();

a)

rb.Rotate(1.0F);

b)

rb.Spin(1.0F);

c)

transform.Translate(1.0F);

d)

rb.AddTorque(1.0F);

27.

Which of the following tasks would you most likely want to perform in FixedUpdate() instead of Update()?

a)

Game logic to track player health

b)

Spawning prefabs

c)

Apply a force to an object over a period of time

d)

Draw the very top-most sprites in the sorting order

28.

What other component is required on a GameObject that wants to use a Joint 2D component?

a)

Script

b)

Rigidbody2D

c)

Effector2D

d)

Collider2D

29.

Which of the following components will allow an object to rotate around a specific point?

a)

Fixed Joint 2D

b)

Hinge Joint 2D

c)

Area Effector 2D

d)

Spring Joint 2D

30.

How is the Anchor point visually represented on the sprite when inspecting a Hinge Joint 2D component?

a)

A small, empty rectangle

b)

A solid blue circle

c)

A green "X"

d)

A yellow triangle

31.

What default "Break Force" and "Break Torque" value means the joint can never be broken no matter how much force is applied?

a)

0

b)

Hulk

c)

Infinity

d)

100%

32.

Which of the following objects would best be simulated with a Fixed Joint 2D?

a)

A door

b)

A diving board

c)

A conveyor belt

d)

A wheel

33.

Which of the following Joint 2D settings will control how long an object bounces or vibrates before returning to a neutral (still) position?

a)

Damping Ratio

b)

Connected Anchor

c)

Limits

d)

Distance

34.

Which two Spring Joint 2D properties will you set to position both ends of the spring?

a)

Anchor and Connected Anchor

b)

Break Force and Break Torque

c)

Distance and Frequency

d)

Use Motor and Use Limits

35.

If a GameObject wants to use an Effector 2D component, what other component is also required on that GameObject?

a)

ForceCalculator

b)

LineRenderer2D

c)

Rigidbody2D

d)

Collider2D

36.

Which of the following types of Effector2D components should have the "Is Trigger" setting checked (true) in order to function properly?

a)

Area Effector 2D only

b)

Area Effector 2D, Point Effector 2D, and Surface Effector 2D

c)

Area Effector 2D and Point Effector 2D

d)

Surface Effector 2D only

37.

What Effector 2D property would you set to add some randomness to the force applied by the effector?

a)

Force Variation

b)

Force Angle

c)

Force Magnitude

d)

Randomizer

38.

Which of the following components will apply a constant force in one certain direction to any object passing within its collision boundary?

a)

Area Effector 2D

b)

Point Effector 2D

c)

Buoyancy Effector 2D

d)

Surface Effector 2D

39.

Which of the following components would be best used to build a treadmill or conveyor belt?

a)

Point Effector 2D

b)

Path Effector 2D

c)

Surface Effector 2D

d)

Moving Pad 2D

40.

If you are using a Point Effector 2D to simulate a magnet, where would you most likely draw a circular collision boundary?

a)

Inside (smaller than) the magnet image

b)

As near to the edge of the magnet image as possible

c)

No collision boundary is actually used with this component

d)

Outside (larger than) the magnet image

41.

In Unity, what do all GameObjects belong to?

a)

A scene

b)

Another GameObject

c)

A script

d)

A component

42.

How are Unity scenes stored?

a)

As an entry in the Hierarchy

b)

As an asset

c)

In a script file

d)

As a separate project

43.

Which panel shows you a list of all the contents within a scene?

a)

Animator tab

b)

Assets

c)

Inspector

d)

Hierarchy

44.

If you load multiple scenes into your Hierarchy panel, what will you see on the Scene tab?

a)

Only the objects in the currently highlighted scene

b)

It is impossible to load more than one scene into the Hierarchy

c)

The combined objects from all loaded scenes

d)

Only the objects in the top scene

45.

As you create multiple scenes, what kind of warning might you see?

a)

Too many objects

b)

Too many scenes

c)

Too many AudioListener components

d)

Too many Main Cameras

46.

Which of the following game scenarios would most likely lead you to create multiple scenes?

a)

Your game has multiple points of view

b)

Your game has multiple levels

c)

Your game has multiple players

d)

Your game has different kinds of monsters

47.

What panel would you use to set a default scene in a standalone game and place scenes under script control?

a)

Build Settings

b)

Hierarchy

c)

Scene tab

d)

Inspector

48.

Which of the following "using" statements should be placed at the top of a script that wants to change scenes?

a)

using UnityEngine.SceneManagement;

b)

using Scenes;

c)

using UnityEngine.UI;

d)

using SceneManager;

49.

Which of the following statements will successfully load a new scene named "SecretRoom"?

a)

Load("SecretRoom");

b)

SecretRoom.LoadScene();

c)

SceneManager.LoadScene ("SecretRoom");

d)

Scene.AddLevel("SecretRoom");

50.

After a scene is loaded in "single" mode, what happens to the objects in the scene that was previously loaded?

a)

Those objects are automatically destroyed

b)

Those objects are automatically transferred to the new scene

c)

Those objects are frozen until the old scene re-appears

d)

Those objects are still alive but orphaned

51.

Which of the following game events might cause a change in scene?

a)

A collision occurs

b)

A player dies

c)

A timer expires

d)

All of these, and more!

52.

If you load a second scene in "additive" mode, which of the following statements is true?

a)

Your game will display the combined results from both scenes

b)

Your game will display the results from the second scene only

c)

Your game will display the results from the first scene only

d)

Your game will rapidly switch back and forth between scene viewpoints

53.

What does it mean for a scene to be identified as "active"?

a)

The active scene is the only one that will display results to the screen

b)

The active scene is the only one that will display in the Hierarchy

c)

The active scene is the one that will run the fastest

d)

The active scene will receive any newly spawned objects

54.

Which of the following approaches would allow you to save objects and data across multiple scenes?

a)

Use the C# "static" keyword to share global variable contents between all copies of an object

b)

Use the Unity GameObject.DontDestroyOnLoad() and SceneManager.MoveGameObjectToScene() functions to move objects between scenes

c)

Keep a "manager" scene around through the game, and load other scenes in "additive" mode

d)

All of these approaches will work, though Unity recommends one in particular

55.

Which of the following code statements will successfully load a scene named "SecretRoom" in additive mode?

a)

SecretRoom.LoadScene(LoadSceneMode.Additive);

b)

Scene.AddAdditiveLevel("SecretRoom");

c)

SceneManager.LoadScene ("SecretRoom", LoadSceneMode.Additive);

d)

Load("SecretRoom", Additive);

56.

If "Scene1" is already loaded, and you load "Scene2" in additive mode, which of the following is true about the objects that belong to "Scene1"?

a)

Scene1 objects will continue behaving and displaying as normal

b)

Scene1 objects will be automatically moved over to Scene2

c)

Scene1 objects will be destroyed when Scene2 loads, and then created again when Scene2 unloads

d)

Scene1 objects will be frozen as long as Scene2 is active

57.

What will happen if you call SceneManager.UnloadScene() on the current scene from within an Update() function in Unity 5.4?

a)

The scene will be safely unloaded immediately

b)

The scene will be safely unloaded after the current frame is complete

c)

The scene will not be unloaded at all

d)

The game will freeze or crash

58.

What will happen if you call SceneManager.UnloadSceneAsync() on the current scene from within an Update() function in Unity 5.5+?

a)

The scene will be safely unloaded immediately

b)

The scene will be safely unloaded after the current frame is complete

c)

The game will freeze or crash

d)

The scene will not be unloaded at all

59.

Which of the following is a characteristic of the "manager" pattern for handling scenes and long-term data?

a)

Keep a "manager" scene loaded the entire game

b)

Load additional scene(s) in additive mode to display levels or other game content

c)

Place objects with long-term data and logic on the "manager" scene

d)

All of these correctly describe the "manager" pattern

60.

When using additive scenes and the "manager" pattern, what can you do with the default Main Camera and AudioListener component on each scene to remove possible display confusion and warning messages?

a)

Delete the Main Camera and AudioListener from all scenes, both "manager" and additive

b)

Keep the Main Camera and AudioListener on the additive scenes, and delete those objects from your "manager" scene

c)

Keep the Main Camera and AudioListener on the "manager" scene, and delete those objects from your other additive scenes

d)

All of these will work equally well

61.

Which of the following best describes video game artificial intelligence?

a)

A program that knows how to do many things better than a human

b)

An algorithm that assume control from the player, allowing the player to relax and watch

c)

An algorithm that focuses on specific tasks to make games more believable and fun

d)

A learning algorithm that will eventually provide an unbeatable opponent for human players

62.

Which of the following game features would reasonably be supported by an AI algorithm?

a)

A monster that attempts to shoot or chase a player

b)

A bird that flies in a believable way in the background scenery

c)

A computer driving opponent in a racing game

d)

All of these and more!

63.

Which of the following AI characteristics refers to making your algorithm as realistic as possible?

a)

Programmable

b)

Challenging

c)

Computable

d)

Believable

64.

Which of the following AI algorithm characteristics refers to making your algorithm provide an appropriate level of difficulty?

a)

Believable

b)

Challenging

c)

Computable

d)

Programmable

65.

Which of the following AI characteristics refers to selecting an algorithm that is actually possible to code?

a)

Computable

b)

Challenging

c)

Believable

d)

Programmable

66.

Which of the following AI characteristics refers to writing an algorithm that can be reasonably run with the available CPU and memory?

a)

Believable

b)

Challenging

c)

Programmable

d)

Computable

67.

Why might you write an AI algorithm that cheats in small ways?

a)

AI algorithms should never cheat

b)

Because the goal of the AI is to win as many games as possible

c)

Because the human player can't do anything about it

d)

To help present a reasonable and enjoyable challenge

68.

Which of the following best describes a flowchart?

a)

A series of detailed comments in your code

b)

A chart measuring the speed of program flow

c)

A visual diagram of code decisions, actions and program flow

d)

User documentation that describes how to work with your software

69.

Which of the following flowchart shapes would most likely hold the phrase "Add 1 to index"?

a)

Circle

b)

Rectangle

c)

Diamond

d)

Arrow

70.

Which of the following flowchart shapes would most likely hold the phrase "If (index > 1)"?

a)

Circle

b)

Rectangle

c)

Arrow

d)

Diamond

71.

Which of the following flowchart shapes is used to connect other shapes together to show program flow?

a)

Dashed line

b)

Wavy line

c)

Thin rectangle

d)

Arrow

72.

Which of the following kinds of algorithms does NOT require any decision-making?

a)

Branching

b)

Sequential

c)

Iterative

d)

All of these require decisions

73.

When writing an algorithm to select a target, what is usually your FIRST step?

a)

Return the target that you have found

b)

Get a list of all possible targets

c)

Calculate the distance between one target and the source object

d)

Check to see if a particular target is within range

74.

Which of the following steps would be part of an algorithm to follow a path with way-points?

a)

All of these are true

b)

Move towards current way-point

c)

Get next way-point

d)

Calculate direction to current way-point

75.

Which of the following functions is most likely to be used in an algorithm that needs to find a list of possible targets?

a)

GameObject.Find()

b)

GameObject.FindTargets()

c)

Targets.Find()

d)

GameObject.FindGameObjectsWithTag()

76.

If you form a vector between two objects, which vector property would you read to find the distance between those objects?

a)

Normalize()

b)

Magnitude

c)

Distance

d)

Z

77.

If you have rotated an object to face the direction it will travel, which of the following function calls will move the object in that direction?

a)

transform.Translate(new Vector(0.1F, 0, 0));

b)

transform.Follow(waypoint);

c)

transform.Translate(direction);

d)

transform.Translate(target.position);

78.

When writing an algorithm to find the next way-point in a list, which of the following cases do you need to handle?

a)

There are no more way-points after the current one

b)

There is a next way-point available

c)

There is no previous way-point available

d)

All of these must be handled

79.

If the "direction" vector represents the angle towards the next way-point, and the object is NOT rotated at all, which of the following lines of code would take a step towards that way-point?

a)

transform.Follow(direction);

b)

transform.Translate(direction);

c)

transform.Translate(new Vector3(0.1F, 0, 0));

d)

direction.Translate();

80.

If using colliders to help detect when a way-point is reached, which of the following Unity functions would hold your code to switch to the next way-point?

a)

Translate()

b)

OnTriggerEnter2D()

c)

Start()

d)

Update()