Practice question · Multiple choice
A game's physics behaves differently on a fast machine than a slow one, with objects tunnelling through walls at low frame rates. What is going wrong?
Hints
- At 10 fps, how far does a fast object move between two collision checks?
- Ask what the collision test actually checks: a path, or a position?
Show the answer
D. The timestep is tied to the frame rate, so a slow frame steps too far
Why
Discrete-position collision checks miss anything that jumps the wall between frames, and a long frame means a long jump. Fixed timesteps and swept-volume tests are the standard fixes, a numerical-integration problem surfacing as a gameplay bug.
Practise Kinematics: Describing Motion
The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.