Ben Affleck

Ben Affleck co-wrote, directed and stars in the film "The Town." (Jay L. Clendenin / Los Angeles Times)

la-et-ben-affleck-20100916

Some movie sets abound with producers and studio executives, others teem with entourages of dodgy hangers-on. Ben Affleck invited a slightly different class of visitors to his bank heist story "The Town" — a bunch of real-life criminals.

"Pretty much everyone on the set was an ex-con of some sort," says Jeremy Renner, who stars opposite Affleck in the drama, opening Friday, about a quartet of Boston holdup artists whose luck may be running out fast. "And there were probably a couple of guys there who were still robbing banks."

In adapting Chuck Hogan's novel " Prince of Thieves," Affleck (who directed and cowrote the film) believed that if "The Town" were going to achieve something unique, it would have to avoid the seen-it-a-million-times clichés of the genre. So he surrounded himself with people who actually knew how to break the law, and some of the crime fighters who try to catch them, hoping he could unearth some true stories that would give the fictional tale some fact-based weight.


Get breaking entertainment news, delivered to your mobile phone. Text ENTERTAIN to 52669.

Discovering a new way to tell a familiar story wasn't the only challenge the 38-year-old actor and filmmaker faced.

In just his second time behind the camera on a feature film (Affleck directed 2007's critically acclaimed but little-seen "Gone Baby Gone"), he needed to figure out how to direct himself, and not look like a scene-stealing prima donna in the process. He had to wrestle with the story's complex moral compass, which doesn't necessarily point in an upright direction at the film's conclusion. And he had to deliver enough of the genre's conventions — the shootout, the car chase, the betrayal — while leaving room for character development.

"I was afraid I couldn't do it — that it wouldn't work," Affleck says of his reservations before he agreed to make the movie. "I was afraid I would get to some hurdle and not know how to get over it."

As recognizable as "The Town's" story might be, it is precisely the kind of movie that most major studios don't make these days: a not altogether cheap (about $37 million) adult drama that is populated more with talented character actors (the ensemble includes "Mad Men's" Jon Hamm as an FBI agent, " Vicky Cristina Barcelona's" Rebecca Hall as a robbery hostage and "The Usual Suspects'" Pete Postlethwaite as a crime boss) than proven box-office stars.

After rolling out at the Venice Film Festival and the Toronto International Film Festival over the last two weeks, "The Town" so far has attracted some of the fall season's best notices. Affleck and financier/distributor Warner Bros. are going to need them. After a brief slowdown around Labor Day, the schedule is suddenly packed with readily marketable studio films, with "Wall Street: Money Never Sleeps" and "The Social Network" among upcoming releases. If "The Town" is going to haul off some of its own loot, its word of mouth needs to be stellar.

"This is not the kind of movie that makes a studio jump for joy," says the film's producer, "The Departed's" Graham King, who praised Warner's for backing the project. "Usually, they ask, 'Can you get Matt Damon? Can you get Mark Wahlberg?' "

Affleck wasn't the first choice to make "The Town" — the movie previously had been in development with "Fatal Attraction's" Adrian Lyne in the director's chair — and he wasn't sure he was the right choice, either. "But it was definitely a better script than I was getting as an actor," Affleck says.

King was among the handful who saw "Gone Baby Gone" (the film barely grossed $20 million), and appreciated Affleck's adaptation of Dennis Lehane's Boston-set kidnapping novel.

"I thought he told a really good story — and in a movie that could have been very slow, he kept it moving," King says. King knew that "The Town" had its own traps. Done poorly, it would be a disposable action movie, "the kind of B movie that they make six or seven times a year that you find in the video bin," the producer says.

Affleck didn't disagree about the potential pitfalls, and he had some additional worries. He was concerned about being typecast in only his second full-length directing assignment, making another gritty crime drama set in and around Boston, where he grew up. But he was intrigued by the material and wanted to star in the film, as long as he could rework the script, which is credited to Peter Craig and Affleck and his writing partner Aaron Stockard.

"I knew it had to deliver on some of the genre components — you have to have something that works in a trailer, or that someone who likes heist movies would feel there wasn't a bait and switch if they saw it," Affleck says.

So he took the novel and screenplay's core idea — the four hoods take a bank manager (Hall) hostage in one job, and honcho Doug MacRay (Affleck) falls for the possible witness he's supposed to shadow — and tried to make the tale a bit less fantastic.

"I felt I couldn't do anything that I didn't think felt real," Affleck says. "I could only direct it if I understood it on a gut level."

Over the course of four months, Affleck met with actual crooks, often in prison, and law enforcement officials, and based a scene in the film on a famous 1995 foiled armored car heist in Harvard Square.

"You get as specific as you can," says Hamm. "That's how you avoid being generic."

Renner's character and some of his dialogue were shaped by Affleck's interviews, as was a scene where the heavily armed quartet comes across a lone police officer who decides to look the other way.

"I asked one guy, 'What was the strangest thing that ever happened to you?' " Affleck says of chatting up one felon. "And he told me that story just as it's in the movie."

Affleck also had concerns about whether he could direct himself. Asked by Renner whether he was up to it, Affleck said, "I don't know." Says Renner: "He was slightly terrified. And I loved that."

Affleck sought out other actors who had done the same — a list that included Kevin Costner, Warren Beatty, Sean Penn and Mark Ruffalo — and asked for guidance.

"The majority said it was doable — and, granted, I was talking to some really talented guys — but here are some of the dangers," Affleck says. "They said, 'Don't shortchange yourself. There's a temptation to do that when you've been working all day and asking a lot of everyone. Be sure to get your own performance. Be self-confident of yourself enough so you can be the heel who does a Take 7 of yourself.' "

Affleck, King and the cast debated how the film should end, and what kind of message they would be sending if crime did indeed pay.

"It was a really difficult question, and one I don't think I ever answered wholly to myself," Affleck says. "For a while, I wanted a darker ending. But I couldn't figure out how to make it good."

Renner believes that whatever audiences think about the film's principles, they will grant it some leeway because of how they relate to its protagonists.

"If you don't care about the characters," Renner says, "then it's just a really interesting car chase."

john.horn@latimes.com