So How Do They Do It?

Game developers use physics engines to simulate the physics effects in their games. What's a physics engine? A physics engine is a specialized piece of software specifically designed to integrate the laws of physics into a game. A physics engine deals solely with the physics aspects of the game, and has nothing to do with the actual gameplay. This is quite handy for developers, since once they have a good physics engine, they can use it for many of their games; for example, the same physics engine may be used for both a racing simulation and an action shooter.

Images courtesy of Rockstar Games

Many game developers are using mainstream physics engines licenced to a different company. This is handy, since it allows the developers to focus on creating a fun and exciting game, rather than having to divide their programmers between creating the game and creating the physics engine. One of the most prominent physics engines used today is Havok Game Dynamics SDK.

Physics engines are extremely complicated. Each engine features aspects of just about every application of real-world physics that we see every day. An engine has to recognize where objects are in the world, and what forces can interact with them and where they can or cannot fall/get pushed/get blown into. Gravity has to be simulated realistically, with objects steadily accelerating as they fall towards the ground. More advanced physics engines will simulate different types of matter as well. A bouncing rubber ball has to interact differently when thrown than a fragile china vase (and in most new games, the vase can shatter into tiny pieces that interact with the environment separately). Fluid dynamics are becoming more and more realistic in games. A billowing cape or the ripples in a pool of water are all part of a physics engine.

Image courtesy of WarCraftIII.net and Blizzard Entertainment