In the movie "The Martian," which hits theaters in October, Matt Damon plays astronaut Mark Watney, who is mistaken for dead and left behind on the Red Planet.

In the sci-fi film "The Martian," which hits theaters in October, astronaut Mark Watney (played by Matt Damon) is stranded by himself, and presumed dead, on the Red Planet.

Watney must figure out a way to survive on the inhospitable planet, and somehow alert NASA that he is still alive so a rescue mission can be mounted. Fortunately, Watney is an engineer and knows how to adapt technology to fit his needs.

But how much of the technology at Watney's disposal actually exists today, or should exist in the near future? Read on to learn about the tech NASA is developing as part of its effort to put real boots on Mars in the 2030s. [See more photos from 'The Martian']

1. Human habitats on Mars

The habitat portrayed in "The Martian." (Image credit: 20th Century FOX)

In "The Martian," Watney uses pieces of his habitat to construct other things on the Red Planet. The living space also serves as a sanctuary from the harsh Martian environment.

NASA hasn't built a real Mars habitat yet, but the agency is simulating one using the two-story Human Exploration Research Analog at the Johnson Space Center in Houston. The facility can host astronauts for 14 days, and simulated mission times will soon be bumped up to 60 days.

2. A Mars farm

. The Martian's Mark Watney grows potatoes in his habitat. (Image credit: 20th Century FOX)

Watney has a nutrition problem on Mars that he attempts to solve by growing a lot of potatoes in his habitat.

In space, astronauts are starting to grow crops of their own. For example, astronauts aboard the International Space Station recently harvested the first lettuce leaves from the "Veggie" experiment, which is intended to help NASA learn how to establish and maintain off-Earth farms.

3. Water recovery

NASA astronaut Kevin Ford plays with a water bubble on the International Space Station in 2013. (Image credit: NASA)

Watney also faces problems trying to conserve water on Mars. This same challenge confronts astronauts on the International Space Station, who recycle their urine, sweat and more for drinking water and other purposes. For future missions, NASA is trying to improve the filtration system so that astronauts will need fewer spare parts from Earth.

4. Oxygen generation

NASA astronaut Doug Wheelock in 2010 with Sabatier, a system that creates water from byproducts of the International Space Station's oxygen-generation system and carbon dioxide removal assembly. (Image credit: NASA)

Watney obtains oxygen on the Red Planet using a system called the "oxygenator," which creates oxygen from the carbon dioxide used in his Mars Ascent Vehicle's fuel generator.

Astronauts aboard the space station use an oxygen-generation system that splits water molecules into hydrogen and oxygen. The oxygen flows into the atmosphere for breathing, while some of the hydrogen is used for water.

5. Mars spacesuit

Mark Watley (portrayed by Matt Damon) in his Mars spacesuit. (Image credit: 20th Century FOX)

Watney spends much of his time on Mars in a spacesuit repairing his habitat and performing some long-distance treks.

NASA is working on some real spacesuit technologies that could be used on Mars, such as the Z-2 and Prototype eXploration Suit. Astronauts climb into these suits from the rear, and can therefore leave the suits outside their Mars habitats, minimizing dust entry. [NASA's Z-2 Spacesuit in Pictures: Futuristic Astronaut Suit]

6. Mars rover

The rover used by astronaut Mark Watney in "The Martian." (Image credit: 20th Century FOX)

Watney's rover on Mars is designed to perform short sorties, but he introduces several modifications to allow him to trek much more ambitious distances.

For its part, NASA is creating a six-wheeled Multi-Mission Space Exploration Vehicle (MMSEV) that is flexible enough to work in the reduced-gravity environment of an asteroid or Mars. The vehicle can even recover from a flat tire just by lifting the affected wheel up and continuing on the other five wheels.

7. Ion propulsion

NASA's Evolutionary Xenon Thruster (NEXT) Project is developing a 7-kilowatt ion thruster that could improve on systems used in the Dawn spacecraft, for example. (Image credit: NASA)

The rest of Watney's crew is aboard a spacecraft called Hermes, which uses ion propulsion to move back and forth between Earth and Mars. Ion-propulsion systems electrically charge molecules of gases such as argon or xenon, then accelerate these molecules out of the spacecraft at high speed to generate thrust.

NASA has already used ion propulsion in real-life spacecraft, such as the Dawn spacecraft that is currently orbiting the dwarf planet Ceres. The space agency is also working on the NASA Evolutionary Xenon Thruster to improve on the technologies used in Dawn.

8. Solar power

Some of the solar panels on the International Space Station. (Image credit: NASA)

Watney has more solar panels than he needs, and he decides to use some of them for unconventional purposes to help him survive. NASA has used solar panels on many robotic spacecraft over the years, and the International Space Station has four sets of them. NASA's Orion crewed spacecraft, which is currently in development, is also solar powered.

9. Nuclear power

A self-portrait of the Curiosity rover at the "Windjana" drilling site in 2014. (Image credit: NASA/JPL-Caltech/MSSS)

The Mars Ascent Vehicle in "The Martian" is powered by a radioisotope thermoelectric generator (RTG), which converts the heat of the radioactive decay of plutonium-238 into electricity. This RTG is buried a safe distance away from the pioneers' living quarters.

NASA has used RTGs on numerous missions, including the crewed Apollo voyages to the moon, the robotic Mars rover Curiosity and the New Horizons mission to Pluto.

The agency's supplies of plutonium-238 are a bit low since the U.S. Department of Energy (DOE) stopped producingthe material in 1988 and the last shipment from Russia came in 2010. However, the DOE recently restarted plutonium-238 production and should be able to make about 3.3 lbs. (1.5 kilograms) of the stuff annually in the near future, NASA officials have said.

Follow Elizabeth Howell @howellspace, or Space.com @Spacedotcom. We're also on Facebook and Google+. Originally published on Space.com.