Given yesterday’s announcement from CERN that they have found a particle that is ‘probably’ the Higgs-Boson. By ‘probably’ I mean science never likes to assume certainty but we’re down to a one in two hundred million chance that it could be an error. As the resident science nerd in my group of friends, I have been fielding questions about it for the past day or so and it got me thinking about physics in games, which is what I’d like to talk about today even if the discovery doesn’t really pertain to games. If we can learn to manipulate the Higgs field we could get some Mass Effect style technology in theory, I think. My quantum mechanics is pretty sketchy…
As you’re probably aware, the physics in game worlds are most often controlled by a piece of software called a physics engine. A physics engine is a piece of ‘middleware’ software that is often licensed from an external company and used for one specific part of the game. A prime example here being the Havok engine, which handles physics and animation in Skyrim, amongst many other games. No really, just go check how many of your games have Havok listed in the credits. I’ll wait… Quite a lot wasn’t it?
Due to its popularity, I am going to use Havok as an example of how a physics engine functions in a game and the benefits this often underappreciated piece of software brings to the table. It allows for somewhat accurate modelling of rigid body physics, such as movement of singular ‘rigid’ shapes like bullets, as well as the ever famous ragdoll physics, which are achieved through the linking of several rigid elements. For characters in games, this acts to animate death animations or any time a character would otherwise fall to the ground to give a more realistic feel as opposed to a pre-animated fall. Through the use of ‘Dynamical Simulation’, which is to say simulation that follows Newton’s laws. The game world becomes more realistic as objects behave as they would in the real world.
Another very important aspect handled by the physics engine is collision detection, which is quite obviously the detection of collisions between objects. Without collision detection you can wave goodbye to almost every kind of in-game combat as well as most other things, like moving. Naturally the constant detection can take a toll on the overall performance of a game and so detection is usually allowed to slip into an ‘acceptable’ category as opposed to completely physically sound. Recent advances in computational power have allowed in-game physics to progress by leaps and bounds in the past few years. Soft body dynamics have become common in the modelling of ‘soft’ materials such as clothes (think animated cloaks) as well as limited use of fluid dynamics to accurately animate liquid and fire amongst other things.
As I mentioned, such things are now only possible due to the advance of computers in the past few years. Some of you (myself included) may remember the release of the AGEIA PhysX card, a separate card dedicated to processing advanced physics calculations in some PhysX enabled games, one of the earliest being Ghost Recon Advanced Warfighter in 2005 (wow that makes me feel old). Once the technology had been proven to work and to enhance the gaming experience, the company was bought by nVidia in 2008 and they began to support the technology on their graphics cards. Since the GeForce 8 series, CUDA GPUs (short for Compute Unified Device Architecture) allowed the GPU to process the physics calculations, thus freeing up the CPU to do other things. This resulted in an all-around smoother gaming experience. Currently AMD cards are not compatible with PhysX technology but the general consensus appears to be that it doesn’t really add much to a lot of games, just the heavily publicised PhysX sponsored ones.
So that is a rough overview on how physics work in the games we all know and love. If you’ve got anything to add, just go ahead and leave it in the comments, even corrections! I’m aware that my knowledge may have some holes in it, take care!