Broderick then won the role of the charming, clever slacker in the 1986 film Ferris Bueller's Day Off. At the age of 23, Broderick played a high school student who, with his girlfriend and best friend, plays hooky and explores Chicago. The film is a 1980s comedy favorite, and is one of Broderick's best known roles (particularly with teenage audiences). Also in 1987, he played Air Force research assistant Jimmy Garrett in Project X. In 1988, Broderick played Harvey Fierstein's gay lover, Alan, in the screen adaptation of Torch Song Trilogy. In the 1989 film Glory, he received favorable reviews for his portrayal of the American Civil War officer Robert Gould Shaw, whom Broderick incidentally physically resembled at the time.