Writing Actors and screenwriters
Ben Affleck and
Matt Damon met in their hometown of
Cambridge, Massachusetts, becoming friends at a young age. Years later, Damon started writing
Good Will Hunting as a final assignment for a playwriting class that he attended in his fifth year at Harvard, turning in a script of around 40 pages instead of the one-act play requested by his professor. Damon said that only the scene of Will and Sean's first meeting survived verbatim from the first script. In Los Angeles, the duo secured small roles in films and commercials, sharing their earnings to sustain themselves while trying to break in the film industry without much success. {{Quote box| Affleck and Damon were inspired by the resentful feelings experienced in their childhood toward students who came to Cambridge to attend Harvard and MIT, taking over the city uncaring of respecting its residents. Damon said: "It could have gone to
Meryl Streep, you know what I mean? We could have done some rewrites and it becomes more of a mother/son relationship. It could have gone to
Morgan Freeman... and then you bring in elements of
racial tension around Boston." In scenes inspired by
Martin Brest's
Beverly Hills Cop (1984) and
Midnight Run (1988), the young man and his friends lead the NSA agents in chases around the city, as Affleck and Damon felt they had to include an action
subplot to make the film commercially appealing. The duo improvised some of the scenes and recorded them on
tape while imitating Freeman and
Robert De Niro, who they envisioned playing the roles of the therapist and the professor. The duo then read a script named
Good Will Hunting written by their high school friend Derrick Bridgeman, to whom they promised $10,000 in exchange for using the title if they managed to sell the script. The duo decided to focus on the characters' interpersonal relationship and removed 60 pages of the NSA storyline from the 120-to-130-page script, ending up rewriting it almost entirely. Affleck asked
Kevin Smith if he would direct the film and bring it to
Miramax Films, as Affleck and Smith had worked together on the 1995 film
Mallrats and had been developing the 1997 Miramax production
Chasing Amy. Smith said he "wouldn't dare direct" it given its beauty, but brought the script to the attention of Miramax founder
Harvey Weinstein. Affleck and Damon suggested director
Gus Van Sant, whom they had come to know and admire through his work with Affleck's brother
Casey. The duo met with the
Braveheart (1995) director
Mel Gibson and began developing the film with him for a few months. Bender officially hired Van Sant as the director. The duo had originally ended the script with Will's death at the hands of the gang that Will fights at the start of the film, but Van Sant proposed to have Chuckie be killed in an accident on the construction site. Kleitman and mathematician
Tom Bohman gave them a brief lecture and suggested the computer science
P versus NP problem as one that Will could solve. {{Multiple image|total_width=350 In early 1997, Bender, Moore, and Van Sant began auditioning actors at the
Bowery Hotel in New York, casting
Cole Hauser as Billy but struggling to find performers for the roles of Skylar and Lambeau. Weinstein denied Driver's claim regarding the note, but stated that he had wanted to cast
Ashley Judd in the role at first. However, Casey initially refused the part to focus on making a documentary of the production, before accepting to appear in
Good Will Hunting. In Toronto, the production filmed several interior scenes at the University of Toronto, using Knox College, St Michael's College, Victoria College, Whitney Hall, McLennan Physical Laboratories and Faculty Club. Other scenes were shot at the
Central Technical School, the Upfront Bar and Grill, and other locations. In Boston, Affleck and his brother along with Damon and Hauser lived in the same apartment and often would hang out with Driver. The producers invited the
Boston Red Sox's representatives on set, trying to convince them to let the production use their logo and footage of
Carlton Fisk's
home run at the 1975 World Series.
Post-production and music Van Sant hired editor
Pietro Scalia for
Good Will Hunting, having liked his work with directors
Bernando Bertolucci and
Oliver Stone. Scalia used an
Avid Technology editing software on
Good Will Hunting. In the first version, Van Sant had cut out a scene in which Will uses the phrase "How do you like them apples?", but Affleck and Damon insisted to keep it in the film. Cutting Williams' performance, he chose to use the actor's first takes, finding that Williams' later cuts did not have "that early freshness, that insecurity, that fear". Surprised by the final result, Williams thanked him in person at an exclusive screening organized for him in San Francisco and in a letter after he won the
Academy Award for Best Supporting Actor, saying Scalia had done "the kindest cut". At that time, Van Sant had heard of singer-songwriter
Elliott Smith while searching for "raw" sounds, but decided that a
heavy metal artist would better fit the film. After wrapping production for
To Die For, he began listening to Smith's music, thinking it would be a better match with
Good Will Hunting. Elfman approved and began writing a score to match the songs. Elfman provided the orchestral arrangement for "Between the Bars" and later rearranged "Miss Misery" for Smith's performances at award shows, including the
70th Academy Awards. Elfman recalled it as "the best experience" he had working on music with an artist, adding: "After 110 films, or whatever, it's been one of the only two times I feel I collaborated with anybody". ==Themes==