Seasoned video game players used to laugh when beginners waved the controller up in the air, urging Mario to jump a little further, but now these frantic motions have become part of the game.

The new Nintendo Wii and Sony Playstation 3 gaming systems, just released for the holidays, both include motion-sensing controllers. Nintendo, in particular, has used its motion-sensing controller as the primary selling point of the Wii. But how are the controllers able to precisely and accurately measure physical movement?

At the heart of the controller technology are tiny accelerometers. Inside these chips, silicon springs anchor a silicon wafer to the rigid controller. As you wave the controller through the air at an attacking enemy, the wafer presses onto the springs, just as you are pressed against the seat of a car when you stomp on the gas pedal. The faster the controller accelerates, the more the wafer moves relative to the rest of the chip.

The accelerometer monitors the position of the wafer by measuring capacitance, or the ability to store electric charge, in different directions. When you move the controller forward in a punch, the capacitance increases at the back of the wafer and decreases at the front. Using capacitance to measure how far and in what direction the wafer moves, the system translates your real-life movements into the perfect jab to your opponent’s face.

Accelerometers were bulky and expensive when they were first used to guide real-life missiles and aircraft, but they became available for gaming when engineers began producing them the same way computer chips are made.

The accelerometers used in the Nintendo controller are thinner than a penny, small enough to fit twelve on a postage stamp, and sell for under $6 a piece. They can accurately measure forces more than three times stronger than the pull of gravity in three directions – up and down, side to side, and forward and back. The chips also use gravity to determine the orientation of the controller, whether you’re holding it vertically like a golf club or horizontally like a gun.

But accelerometers alone cannot provide complete control, because small positional errors add up over time, like when you need to re-center your mouse on a mousepad.

Nintendo addressed this problem by including a sensor bar that can be placed above or below the television. Each end of the bar emits a beam of infrared light like a television remote, which is monitored by a sensor on the controller that works like a digital camera: by seeing where the two spots of light fall on its grid of more than 750,000 pixels, the sensor can determine where the controller is pointing and translate it to a position on the television screen.

Even by combining technologies, game developers have yet to maximize the ability of motion sensing. The Wii ignores some of the motion sensing data it collects and simplifies the gameplay to compensate for different living rooms and players. In his Slate magazine review of the Wii, Erik Sofge, complained that a table-tennis flick of the wrist was just as effective as a proper baseball swing.

As gamers demand improved realism and accuracy in their video games, engineers will continue to push towards better motion-sensing technologies, and likely use more sensor combinations. But if you need to swing a real baseball bat right now your best bet is to go to the park.