You might wonder where the acceleration comes from. That's a good question with many answers. The acceleration of a car comes from its engine. The engine applies a force to the car that causes it to accelerate. But that's not all. Our car will also accelerate toward the center of earth due to gravity. The only thing that keeps it from falling through the center of the earth is the ground it can't pass through. The ground cancels out this gravitational force. The general idea is this:
force = mass x acceleration
We can rearrange this to the following equation: acceleration = force / mass
Force is given in the SI unit Newton (guess who came up with this). If we specify acceleration as a vector, then we also have to specify the force as a vector. A force can thus have a direction. For example, the gravitational force pulls downward in the direction (0,-1). The acceleration is also dependent on the mass of an object. The more mass an object has, the more force we need to apply to make it accelerate as fast as an object of less weight. This is a direct consequence of the preceding equations.
For simple games we can, however, ignore the mass and force, and just work with velocity and acceleration directly. In the preceding pseudocode, we set the acceleration to (0,-10) m/s per second (again, not a typo), which is roughly the acceleration an object will experience when it is falling toward earth, no matter its mass (ignoring things like air resistance). It's true, ask Galileo!
Was this article helpful?