Polls
Here are all the polls we do during lecture, if you want to go over them gain for practice and/or review. (In some cases, you will have to find where the poll is in the slides to get the full context and understand what the poll is asking).
Week 1, Lecture 1
How much does the character move in 1 second if the game updates 60 times a second? (frame locked)
A. 5 pixels
B. 150 pixels
C. 300 pixels
D. 600 pixels
How much does the character move in 1 second if the game updates 60 times a second? (using delta time)
A. 5 pixels
B. 150 pixels
C. 300 pixels
D. 600 pixels
Week 2, Lecture 1
When can you use a forward declaration? (choose all that apply)
A. You should never #include a header inside another header
B. If all uses of the type in the header are pointers or references
C. As long as the type has no virtual functions
D. Always do it, or you’ll lose points for code quality
Week 2, Lecture 2
What is the vector from the rock to the treasure?
A. a + b
B. a - b
C. b - a
Week 3, Lecture 1
Which corner of the AABB corresponds to the “maximum” point?
A. Top Left
B. Bottom Left
C. Top Right
D. Bottom Right
E. It Depends
What is the equation for bottomDist in our lab?
A. player.max.y – block.min.y
B. player.min.y – block.max.y
C. block.max.y – player.min.y
D. block.min.y – player.max.y
Week 3, Lecture 2
What is the scalar projection of A onto B?
A. a • b / ||a||
B. a • b
C. a • b / ||b||
D. ||a|| * ||b|| * cos(θ)
Week 4, Lecture 1
An object at position (3, 5) has a velocity of (-2, 4) What is the object’s new position if the next frame takes 0.1 seconds?
A. (-0.2, 0.4)
B. (0.9, -0.6)
C. (3.2, 5.4)
D. (2.8, 5.4)
An object is located at position (1500, 400). The camera is located at (400, 0). What is the object’s screen position?
A. (400, 400)
B. (1100, 400)
C. (1900, 400)
D. (1100, 0)
Week 4, Lecture 2
A 30FPS animation has 12 sprites. AnimTimer is currently at 11.6 and deltaTime is 0.016 seconds. What frame should the animation be on after updating?
A. 12
B. 11
C. 0
D. 2
Week 6, Lecture 1
If a texture is 320 pixels wide and each tile is 32 pixels across, how do you figure out the column for tile #24?
A. col = 24/10
B. col = 24%10
C. col = 24%10 + 1
D. col = (10*24)/32
Week 7, Lecture 1
What is the correct order to draw a frame?
A. Draw to back buffer, Clear the back buffer, Present the display
B. Clear the back buffer, Present the display, Draw to front buffer
C. Clear the back buffer, Draw to back buffer, Present the display
D. Draw to back buffer, Present the display, Clear the back buffer, Draw to front buffer
Week 8, Lecture 1
What is the vector [x’ y’]?
A. [x y]
B. [ax by]
C. [ax+by cx+dy]
D. [ax+cy bx+dy]
What is the correct order to apply these matrices?
A. Scale * Translate * Rotate
B. Translate * Rotate * Scale
C. Scale * Rotate * Translate
D. The order doesn’t matter… multiplication is commutative
Week 9, Lecture 1
The correct order to combine the matrices for the World Transform is:
A. Rotation * Translation * Scale
B. Scale * Translation * Rotation
C. Scale * Rotation * Translation
D. Any order
Week 9, Lecture 2
How will you know when the enemy is “roughly” facing towards the target?
A. If the distance is less than a value
B. If dot product of enemy’s normalized forward and normalized enemy to target vector is equal to 1
C. If dot product of enemy’s normalized forward and normalized enemy to target vector is greater than 0 but less than 1
D. If the angle between the enemy’s forward vector and the enemy to target vector is less than a threshold
How can we use this to figure out turn direction? Cross forward with vector to target and then…
A. If the magnitude is > 1, turn right
B. If the magnitude is positive, turn right
C. If the sign of the z component is negative, turn right
D. Dot that with the forward vector
Week 10, Lecture 1
What does the “Bottom” side of the block correspond to in our 3D coordinate system?
A. min.x
B. min.y
C. min.z
D. max.x
E. max.y
F. max.z
Week 10, Lecture 2
If you have original facing and desired facing, how do you get the normalized axis of rotation?
A. original x desired
B. (desired - original)/(||desired - original||)
C. (original × desired)/(||original x desired||)
D. (desired × original)/(||desired x original||)
Week 11, Lecture 1
We calculated the intersection at: t = (-Start · n - d) / ((End – Start) · n) What would a divide-by-zero mean here?
A. There’s no way to tell if there’s an intersection or not
B. The line is pointing the opposite way from the wall
C. The wall and the line are parallel
D. Just replace the zero with a small number like 0.001
Week 13, Lecture 2
What does it mean if the discriminant is negative?
A. Just take the abs()
B. One sphere is inside the other
C. The swept spheres do not overlap
D. The swept spheres are coincident
What is the algorithmic complexity of our block collision checking?
A. O(1)
B. O(n)
C. O(n log n)
D. O(n^2)