It’s boy vs. middle school. The live-action adaptation of James Patterson’s bestselling novel Middle School: The Worst Years of My Life, which stars Griffin Gluck, Thomas Barbusca, and Andy Daly, opens on October 7. The story’s protagonist is an aspiring artist, Rafe Khatchadorian (Gluck), who transfers to a stifling middle school that abides by a rigid code of conduct. Encouraged by his best friend Leo (Thomas Barbusca), Rafe decides to challenge the system by breaking every single rule and facing off against the nefarious Principal Dwight (Daly). The film is directed by Steve Carr and produced by Leopoldo Gout and Bill Robinson of James Patterson Entertainment.

Patterson’s Middle School: The Worst Years of My Life (Little, Brown) is the first in a series of middle grade novels that are co-written with Chris Tebbetts and illustrated by Laura Park. The book has sold more than 2.5 million copies worldwide and it is Patterson’s most reprinted title of all of his books, children’s or adult.

The series is still going strong: the eighth book, Middle School: Dog’s Best Friend, releases on October 31 from the Jimmy Patterson imprint of Little, Brown. The publisher will publish a movie tie-in edition of the novel, featuring cover art from the film, on August 23. Though Patterson is no stranger to having his books for adults adapted to screen, Middle School is the first of his titles for children to make the leap. Patterson was very involved in the process: writing the first draft of the script, being involved in subsequent cuts, and serving as the film’s executive producer. According to a statement from his publisher, , “The movie has tested extremely well for the first two screenings.... It was a very positive partnership with CBS Films and he [Patterson] thinks it is by far the best movie adaptation that he’s done.”

More stories about Rafe Khatchadorian may be on the way: a script has also been greenlit for a second film, to be based on the fourth book in the series, Middle School: How I Survived Bullies, Broccoli, and Snake Hill. The story takes the protagonist from the perilous halls of middle school to the trenches of summer school camp.