Game Logic Flashcards

1
Q

What is one way to do ‘cheap’ collision checking?

A

Subtract the vectors from the two objects. If the value is less than a threshold, a collision has occurred.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Given one projectile, and three possible targets, which object should have the collision detection code on it?

A

The targets. Otherwise the function would have to be called manually for each target. Whereas if the targets have the code, it is only written once (but gets executed for each target).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where would you normally put your collision checks?

A

In the update method of one of the objects (the ones that are going to be doing all the checks).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly