The Mind-Bending Logic and DIY Tech of Source Code

It's like Groundhog Day on steroids: In Source Code, out April 1, Army pilot Colter Stevens (Jake Gyllenhaal) must repeatedly relive, through a computer program called the "source code," the last 8 minutes of a dead man's life in order to discover who placed a bomb on a doomed commuter train. Popular Mechanics spoke with director Duncan Jones, who took us behind the scenes of his sci-fi thriller, the follow-up to Moon.

A man wakes up on the train with no idea where he is—or, as it turns out, who he is. With the help of a mysterious computer program called source code, Army pilot Capt. Colter Stevens (Jake Gyllenhaal) has accessed the last 8 minutes of a stranger's memories in order to accomplish a daunting mission: Find out who placed a bomb on the commuter train he's currently riding. When the 8 minutes are up, the train explodes, and Stevens wakes up—at least until he must go back in again, looking for more clues that will help him prevent a second tragedy that's yet to come. If Source Code, out April 1, sounds confusing, it's because the film is meant to be a challenge. "Source Code is a puzzle of a film," says director Duncan Jones. "Over the course of it we're discovering who Captain Colter Stevens is, and he is discovering what his circumstances are."

How much real science is in Jones' new thriller? Unlike in his sci-fi breakthrough Moon, which drew heavily from helium-3 mining on our lunar neighbor—an idea scientists have actually suggested as an energy source of the future—the director made a conscious decision not to focus on the science behind Source Code. "Although there were these scientific ideas in the film, I always thought, let's not get too bogged down in that," he says. "The science in Source Code sets up a more traditional thriller. I think there's a looseness of the explanation of how this thing works. If the audience buys into it—and I think it's a conceit that's fairly easy to buy into—you kind of go along for the ride."

But where Jones did dig into real-life science was in the psyche of his bomber. The look of the bombs and the behavior of the character were inspired by a documentary called The Nuclear Boy Scout, about a boy who—using radioactive radium-226 culled from the glow-in-the-dark paint of old alarm clocks—built a reactor in his backyard. "The thing was this amazing-looking homemade contraption," Jones says. "There's a real strangeness to him because he's so obviously intelligent to be able to do this on a technical level, but he has no apparent moral center or any kind of common sense, or moral standing on whether it's the right thing to do or not. In fact, in the documentary he says, 'I did it because I know how to do it.'"

The shooting of Source Code posed a myriad of challenges for the filmmakers. The first was the set. The bulk of the action takes place on a commuter train. Jones and his crew considered shooting on a real moving train, but realized it would limit the choice of camera angles. So the Montreal-based crew built half of a double-decker carriage and mounted it on a pneumatic platform programmed to mimic the movement of the real thing. "The downside was the noise of the compressor," Jones says. "But we kept it outside the studio." The set was designed for easy deconstruction and assembly. "When we wanted to shoot the other side of the train, we'd re-dress it," he says. "That allowed us to move the cameras in ways that wouldn't have been possible on a real train."

And because Stevens is accessing a memory over and over, the same things happen each trip into the computer program: A woman spills her soda. A man makes a rude remark. Time loops have inspired great sci-fi moves, but Jones admits that there was a risk of getting lost in the details. "There was a period at one point where we were trying to wrap our heads around exactly the mechanics and structure of the film, where we had to graph out a few things," Jones says. "You have to make sure your logic is continuous, because you don't want to have the audience say, 'Wait a second—that doesn't make any sense!'"

Jones, Gyllenhaal and co-star Michelle Monaghan spent a lot of time getting detail just right. "The first source code was the most challenging one," Monaghan says. "It was really, really important because everything was going to be set in stone from that point on, so working out the choreography for that for all the actors on the train was really hard." Unlike most films, which are shot out of sequence, the crew shot each source code chronologically. Once that first rhythm was established, the actors could change their performances subtly—in a nod to the idea of the multiverse, with each version of the 8 minutes on the train being slightly different—or even improvise entire scenes.

Despite the production challenges and the heady notions in the film, both cast and crew say that Source Code was a blast to film. But could Jones throw us science geeks a bone and tell us what, exactly, the source code is? "It is an attempt to tap into the electrical energy still in the brain at the time of death," Jones says carefully. "And then it also happens to be a dimension to another reality."