A physics engine is a program that contains information on physics and is used for many different digital purposes. The physics engine can be simple or complex, based on the purpose for which it is being used what the measurements for which it can account. One of the biggest users of this engine is the gaming industry, especially with three-dimensional (3D) games, because it provides a more realistic gaming experience. Another common user is the scientific community, which uses it to run simulations in categories ranging from molecular physics to bombs and other explosives.
Digital constructs often are made to mimic the real world, and a defining aspect of the real world is the use of physics in daily life. For example, when someone throws a ball, physics determines how far the ball can go, the angle at which it travels and other factors. A physics engine mimics this real experience in a digital environment. This type of program often contains many measurements and equations, based on how the program is used and what the programmer sought when making it.
Depending on how the physics engine is made, it can be advanced or very simple, but both can be useful. Simple engines usually have less realistic physics and may not account for all the common equations that dictate normal life, but they also are less memory heavy and typically easier to deploy and use. More advanced engines use a mass of physics equations and often require very powerful computers to use effectively.
Video games regularly use physics engine programs in 3D games to make the action realistic. Without a physics engine, the programmer can make solid objects through which players cannot pass and explosions with a certain blast radius, but that is about it. An engine enables the programmer to control knockbacks, how the player reacts when hitting certain objects and how bodies fly, contort or move based on certain actions. These engines normally are small so they can be more easily used, and gaming programmers rarely need engines that account for molecular movement and other advanced physics.
Scientific physics engines are much larger and have many complex equations that are needed for experiments. For example, in chemistry, a physics engine may be used as a simulation to show scientists how the molecules should move during an experiment. Real experiments often are needed to back up simulations, but this still helps scientists perform preliminary experiments before spending the money and time trying the real thing.