Chapter 8. Motion in One Dimension


A video game is almost like a flipbook: As you loop through the program, all the objects move frame by frame. If you flip through fast enough, the motion appears to be smooth and realistic. But how does the computer know where to place objects in each frame? The laws of physics tell it exactly how the objects should move. Keep in mind that in the real world, so many factors influence motion that you can't possibly take all of them into account. Some factors must be sacrificed to achieve real-time physics, but the ones that are sacrificed are usually quite insignificant. This chapter introduces the world of game physics. It ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.