NEW
Font size
WorksheetsChapter 18 - 21 Video Game Programming
Total questions: 80
Worksheet time: 40mins
Which of the following best describes a sound file that is smaller in size and may have less sound quality?
Mini-sound
Compressed
Uncompressed
Compromised
Which of the following file formats is most likely to be used to hold short, uncompressed sounds of the highest quality?
WAV
MP3
PNG
MP4
Some online sound effects can be freely downloaded, as long as you do what?
Charge your users a royalty
Use sounds that are shorter than 10 seconds
Obey the licensing terms
Only download in MP3 format
What kind of law protects authors from misuse of their original, creative works?
Creative Law
Tax Law
Copyright Law
Download Law
What term is used to describe a small fee you must pay each time you distribute software that contains someone else's licensed work?
Royalty
Creative Common Fee
Tax Fee
Per Diem
Which of the following is an advantage to creating your own sound files?
No fees or licensing restrictions
The sounds will take up less disk space and memory
The sounds will be of higher quality
The sounds can be much longer than normal
Which approach will allow you to create your own sound files?
All of these will work
Create sounds using free, online websites
Use your own musical talent and instruments
Record sounds through your smart-phone
What do you normally look for when trying to find background music?
A file that can be seamlessly looped from the end back to the beginning
A song that includes vocals (words)
A file that has especially up-tempo music
A file that is uncompressed for highest quality
How are sound files stored in a Unity project?
As a Component attached to a GameObject by a script
As a GameObject in the Hierarchy
As a file in an asset folder
All of these will work
Which of the following things acts like the game's speaker and is limited to one per scene?
Audio Speaker
Audio Source
Audio Clip
Audio Listener
Which of the following things represents a single sound source and is limited to one per GameObject?
Audio Source
Audio Listener
Audio Clip
Audio Speaker
Which of the following would be the best choice to hold an Audio Listener?
A Sprite Renderer component
Main Camera object
An audio asset
A prefab object
Which of the following is NOT a common Audio Source setting?
Volume
Loop
Duration
Play on Awake
Where might you attach an Audio Source to most effectively play continuous background music?
To an Audio Listener component
Main Camera object
A controller script
A prefab object
Which of the following combinations of Audio Source settings should be used for background music?
Play on Awake = true, Loop = true
Play on Awake = false, Loop = false
Play on Awake = false, Loop = true
Play on Awake = true, Loop = false
What type of variable do you declare in a script in order to manage a sound attached to a GameObject?
AudioAsset
SoundFile
AudioSource
AudioListener
What Audio Source setting should you make in order to play a sound only under script control?
Volume = 0
Loop = true
Play on Awake = false
Play on Awake = true
Which of the following is NOT a function we described on an AudioSource component?
Pause()
Stop()
Mix()
Play()
How do you check and see if an Audio Source is currently playing any sound?
Review the "volume" setting in the Inspector panel
Call the isOn() function
Read the "isPlaying" property
There is no way to see if an Audio Source is currently playing a sound
What Audio Source property do you set if you want to change the current sound that can be played?
wav
sound
audio
clip
Which of the following mathematical terms best describes something that has a magnitude and a direction?
X-coordinate
Vector
Point
Y-coordinate
How would you create a vector that starts at (X1, Y1) and ends at point (X2, Y2)?
(X2 / X1, Y2 / Y1)
(X2 - X1, Y2 - Y1)
(X1 * X2, Y1 * Y2)
(X1 + X2, Y1 + Y2)
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;
(2, 1)
(0.5, 1)
A run-time error will occur
(9, 6)
Which of the following Vector2 functions will change the length of the vector to 1 while keeping it pointing in the same direction?
Normalize()
Reduce()
Magnify()
Unity()
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>();
rb.Transform(0, 1.0F);
rb.Rotate( new Vector3 (0, 0, 1.0F) );
rb.AddForce( new Vector2(-1.0F, 0) );
rb.AddForce( new Vector2(0, 1.0F) );
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>();
rb.Rotate(1.0F);
rb.Spin(1.0F);
transform.Translate(1.0F);
rb.AddTorque(1.0F);
Which of the following tasks would you most likely want to perform in FixedUpdate() instead of Update()?
Game logic to track player health
Spawning prefabs
Apply a force to an object over a period of time
Draw the very top-most sprites in the sorting order
What other component is required on a GameObject that wants to use a Joint 2D component?
Script
Rigidbody2D
Effector2D
Collider2D
Which of the following components will allow an object to rotate around a specific point?
Fixed Joint 2D
Hinge Joint 2D
Area Effector 2D
Spring Joint 2D
How is the Anchor point visually represented on the sprite when inspecting a Hinge Joint 2D component?
A small, empty rectangle
A solid blue circle
A green "X"
A yellow triangle
What default "Break Force" and "Break Torque" value means the joint can never be broken no matter how much force is applied?
0
Hulk
Infinity
100%
Which of the following objects would best be simulated with a Fixed Joint 2D?
A door
A diving board
A conveyor belt
A wheel
Which of the following Joint 2D settings will control how long an object bounces or vibrates before returning to a neutral (still) position?
Damping Ratio
Connected Anchor
Limits
Distance
Which two Spring Joint 2D properties will you set to position both ends of the spring?
Anchor and Connected Anchor
Break Force and Break Torque
Distance and Frequency
Use Motor and Use Limits
If a GameObject wants to use an Effector 2D component, what other component is also required on that GameObject?
ForceCalculator
LineRenderer2D
Rigidbody2D
Collider2D
Which of the following types of Effector2D components should have the "Is Trigger" setting checked (true) in order to function properly?
Area Effector 2D only
Area Effector 2D, Point Effector 2D, and Surface Effector 2D
Area Effector 2D and Point Effector 2D
Surface Effector 2D only
What Effector 2D property would you set to add some randomness to the force applied by the effector?
Force Variation
Force Angle
Force Magnitude
Randomizer
Which of the following components will apply a constant force in one certain direction to any object passing within its collision boundary?
Area Effector 2D
Point Effector 2D
Buoyancy Effector 2D
Surface Effector 2D
Which of the following components would be best used to build a treadmill or conveyor belt?
Point Effector 2D
Path Effector 2D
Surface Effector 2D
Moving Pad 2D
If you are using a Point Effector 2D to simulate a magnet, where would you most likely draw a circular collision boundary?
Inside (smaller than) the magnet image
As near to the edge of the magnet image as possible
No collision boundary is actually used with this component
Outside (larger than) the magnet image
In Unity, what do all GameObjects belong to?
A scene
Another GameObject
A script
A component
How are Unity scenes stored?
As an entry in the Hierarchy
As an asset
In a script file
As a separate project
Which panel shows you a list of all the contents within a scene?
Animator tab
Assets
Inspector
Hierarchy
If you load multiple scenes into your Hierarchy panel, what will you see on the Scene tab?
Only the objects in the currently highlighted scene
It is impossible to load more than one scene into the Hierarchy
The combined objects from all loaded scenes
Only the objects in the top scene
As you create multiple scenes, what kind of warning might you see?
Too many objects
Too many scenes
Too many AudioListener components
Too many Main Cameras
Which of the following game scenarios would most likely lead you to create multiple scenes?
Your game has multiple points of view
Your game has multiple levels
Your game has multiple players
Your game has different kinds of monsters
What panel would you use to set a default scene in a standalone game and place scenes under script control?
Build Settings
Hierarchy
Scene tab
Inspector
Which of the following "using" statements should be placed at the top of a script that wants to change scenes?
using UnityEngine.SceneManagement;
using Scenes;
using UnityEngine.UI;
using SceneManager;
Which of the following statements will successfully load a new scene named "SecretRoom"?
Load("SecretRoom");
SecretRoom.LoadScene();
SceneManager.LoadScene ("SecretRoom");
Scene.AddLevel("SecretRoom");
After a scene is loaded in "single" mode, what happens to the objects in the scene that was previously loaded?
Those objects are automatically destroyed
Those objects are automatically transferred to the new scene
Those objects are frozen until the old scene re-appears
Those objects are still alive but orphaned
Which of the following game events might cause a change in scene?
A collision occurs
A player dies
A timer expires
All of these, and more!
If you load a second scene in "additive" mode, which of the following statements is true?
Your game will display the combined results from both scenes
Your game will display the results from the second scene only
Your game will display the results from the first scene only
Your game will rapidly switch back and forth between scene viewpoints
What does it mean for a scene to be identified as "active"?
The active scene is the only one that will display results to the screen
The active scene is the only one that will display in the Hierarchy
The active scene is the one that will run the fastest
The active scene will receive any newly spawned objects
Which of the following approaches would allow you to save objects and data across multiple scenes?
Use the C# "static" keyword to share global variable contents between all copies of an object
Use the Unity GameObject.DontDestroyOnLoad() and SceneManager.MoveGameObjectToScene() functions to move objects between scenes
Keep a "manager" scene around through the game, and load other scenes in "additive" mode
All of these approaches will work, though Unity recommends one in particular
Which of the following code statements will successfully load a scene named "SecretRoom" in additive mode?
SecretRoom.LoadScene(LoadSceneMode.Additive);
Scene.AddAdditiveLevel("SecretRoom");
SceneManager.LoadScene ("SecretRoom", LoadSceneMode.Additive);
Load("SecretRoom", Additive);
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"?
Scene1 objects will continue behaving and displaying as normal
Scene1 objects will be automatically moved over to Scene2
Scene1 objects will be destroyed when Scene2 loads, and then created again when Scene2 unloads
Scene1 objects will be frozen as long as Scene2 is active
What will happen if you call SceneManager.UnloadScene() on the current scene from within an Update() function in Unity 5.4?
The scene will be safely unloaded immediately
The scene will be safely unloaded after the current frame is complete
The scene will not be unloaded at all
The game will freeze or crash
What will happen if you call SceneManager.UnloadSceneAsync() on the current scene from within an Update() function in Unity 5.5+?
The scene will be safely unloaded immediately
The scene will be safely unloaded after the current frame is complete
The game will freeze or crash
The scene will not be unloaded at all
Which of the following is a characteristic of the "manager" pattern for handling scenes and long-term data?
Keep a "manager" scene loaded the entire game
Load additional scene(s) in additive mode to display levels or other game content
Place objects with long-term data and logic on the "manager" scene
All of these correctly describe the "manager" pattern
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?
Delete the Main Camera and AudioListener from all scenes, both "manager" and additive
Keep the Main Camera and AudioListener on the additive scenes, and delete those objects from your "manager" scene
Keep the Main Camera and AudioListener on the "manager" scene, and delete those objects from your other additive scenes
All of these will work equally well
Which of the following best describes video game artificial intelligence?
A program that knows how to do many things better than a human
An algorithm that assume control from the player, allowing the player to relax and watch
An algorithm that focuses on specific tasks to make games more believable and fun
A learning algorithm that will eventually provide an unbeatable opponent for human players
Which of the following game features would reasonably be supported by an AI algorithm?
A monster that attempts to shoot or chase a player
A bird that flies in a believable way in the background scenery
A computer driving opponent in a racing game
All of these and more!
Which of the following AI characteristics refers to making your algorithm as realistic as possible?
Programmable
Challenging
Computable
Believable
Which of the following AI algorithm characteristics refers to making your algorithm provide an appropriate level of difficulty?
Believable
Challenging
Computable
Programmable
Which of the following AI characteristics refers to selecting an algorithm that is actually possible to code?
Computable
Challenging
Believable
Programmable
Which of the following AI characteristics refers to writing an algorithm that can be reasonably run with the available CPU and memory?
Believable
Challenging
Programmable
Computable
Why might you write an AI algorithm that cheats in small ways?
AI algorithms should never cheat
Because the goal of the AI is to win as many games as possible
Because the human player can't do anything about it
To help present a reasonable and enjoyable challenge
Which of the following best describes a flowchart?
A series of detailed comments in your code
A chart measuring the speed of program flow
A visual diagram of code decisions, actions and program flow
User documentation that describes how to work with your software
Which of the following flowchart shapes would most likely hold the phrase "Add 1 to index"?
Circle
Rectangle
Diamond
Arrow
Which of the following flowchart shapes would most likely hold the phrase "If (index > 1)"?
Circle
Rectangle
Arrow
Diamond
Which of the following flowchart shapes is used to connect other shapes together to show program flow?
Dashed line
Wavy line
Thin rectangle
Arrow
Which of the following kinds of algorithms does NOT require any decision-making?
Branching
Sequential
Iterative
All of these require decisions
When writing an algorithm to select a target, what is usually your FIRST step?
Return the target that you have found
Get a list of all possible targets
Calculate the distance between one target and the source object
Check to see if a particular target is within range
Which of the following steps would be part of an algorithm to follow a path with way-points?
All of these are true
Move towards current way-point
Get next way-point
Calculate direction to current way-point
Which of the following functions is most likely to be used in an algorithm that needs to find a list of possible targets?
GameObject.Find()
GameObject.FindTargets()
Targets.Find()
GameObject.FindGameObjectsWithTag()
If you form a vector between two objects, which vector property would you read to find the distance between those objects?
Normalize()
Magnitude
Distance
Z
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?
transform.Translate(new Vector(0.1F, 0, 0));
transform.Follow(waypoint);
transform.Translate(direction);
transform.Translate(target.position);
When writing an algorithm to find the next way-point in a list, which of the following cases do you need to handle?
There are no more way-points after the current one
There is a next way-point available
There is no previous way-point available
All of these must be handled
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?
transform.Follow(direction);
transform.Translate(direction);
transform.Translate(new Vector3(0.1F, 0, 0));
direction.Translate();
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?
Translate()
OnTriggerEnter2D()
Start()
Update()
