Railguns are not just the stuff of science fiction and videogames.

The U.S. Navy announced Tuesday that it's testing a prototype of an electromagnetic railgun that can fire a 40-pound projectile at 5,600 miles per hour, which is more than seven times the speed of sound, the Associated Press reports.

VIDEO OF RAILGUN TEST ABOVE

Unlike conventional guns, railgun shells are not propelled by gunpowder. Instead, rapidly charged electromagnets force the shell out of the barrel, AOL Defense's Otto Kreisher explains.

According to the Office of Naval Research, railguns mounted on ships would not only provide support for land missions, but also defend against missile strikes and deter adversaries.

The Navy said earlier this month that the railguns will initially have a range of between 57 and 115 miles, but the Navy is hoping to extend the range up to around 250 miles.

Currently, Navy warships are equipped with guns that can reach targets at a range of about 15 miles, according to AOL Defense.

The Navy has been testing various versions of the railgun for at least seven years at a cost of around $240 million. While the latest prototype, which was delivered in January, is the closest to an actual weapon, it will be in testing for at least five more years before being used in the field, according to Wired's Spencer Ackerman.

The 32-megajoule prototype railgun built by defense contractor BAE Systems packs a punch that would make any conventional gun jealous.

According to the Office Of Naval Research, "One megajoule of energy is equivalent to a 1-ton car being thrust at 100 mph."

Watching the above video, one might wonder why a gun that uses electromagnetic energy instead of gunpowder or rocket fuel still produces flames. InnovationNewsDaily explains:

The flames that appear in the new video of the test firing come from a combination of electricity arcing across the launcher, shavings of aluminum reacting with the air, and the bullet's hypersonic flight, said Tom Boucher, test director for the railgun at the Naval Surface Warfare Center in Dahlgren, Virg.

Read more about the railgun at AOL Defense, and for a detailed history of the railgun -- and the legislation surrounding it -- click over to Wired's Danger Room.