Railguns use magnetic fields to propel a conductive projectile, like a metal rod, to incredible speeds. Railguns do not rely on propellants or explosives, and instead make use of kinetic energy to destroy their targets. In most games, railguns tend to be some of the last weapons the player gains, and usually come in the form of advanced sniper rifles or instant-kill weapons.
Railguns have been used in gaming for at least a decade, and continue to see constant use, taking on many shapes, including vehicle and artillery mounted versions.
One of the the Quake II which fired a depleted uranium slug, producing a spiraling puff of blue smoke along the projectile's trajectory--an effect modeled after the railgun in the movie Eraser. Quake III, Quake 4, and Enemy Territory: Quake Wars include a similar weapon with certain aesthetic and functional differences.
Appearing as both a handheld rifle fielded by infantry and as a vehicle-mounted heavy weapon, the Crysis railgun is one of the most powerful weapons in the game. Able to shoot down alien hunter robots in two shots, the railgun rules the battlefield and is featured extensively as US Military armament.
A railgun appears in BF: 2142 as a stationary, anti-vehicle emplacement. The Rorsch Mk-S8 can destroy most vehicles in a few shots.
Lo Wang sports an extremely powerful version of the railgun in Shadow Warrior. Able to penetrate multiple enemies with a single shot, the railgun is often an instant-kill weapon.
Red Faction's rail driver is a late-game weapon that can fire through walls, and is equipped with a heat-sensing scope.
Metal Gear Solid
In Metal Gear Solid, Metal Gear REX is outfitted with a rail gun mounted as its right "arm" used to fire stealth nukes anywhere on the globe. In Metal Gear Solid 4, Liquid Ocelot steals the gun from REX and attaches it to his warship Outer Haven, which he plans to fire at a satellite to destroy the AI "JD".
Handheld railguns also appear in both Metal Gear Solid 2 and 4, in the hands of Fortune and Crying Wolf as well as Solid Snake should he pick one up.