While the concept of genre has lost favor among some artists, others adamantly embrace it. Filmmaker Rian Johnson considers himself to be the latter sort, pointing to his latest project as proof. “Knives Out,” released nationwide Wednesday, is a whodunit revamped for the modern era.

“I’ve always loved genre and working in it,” the writer-director recently told The Washington Post. “I find it gives me freedom, weirdly, an opportunity to work within that space. One of the obvious things genre gives you is a shared grammar with the audience. It gives you a chessboard to play on with the audience. … They know when you’re playing by the rules. They know when you’re breaking them.”

With “Knives Out,” Johnson broke the rules on multiple levels — perhaps not unexpectedly, given the inventive storytelling of his last feature, “Star Wars: The Last Jedi.” Not only did he subvert expectations of the genre by embedding reveals throughout, as opposed to a whopper at the end — which he described as “putting the engine of a Hitchcock thriller into a traditional whodunit” — but he also defied industry trends by writing his own mystery. There aren’t any other pieces of intellectual property at play here, though he credited the way Agatha Christie’s novels engaged with contemporary British society as inspiration for his decision to ground “Knives Out” in modern-day America.

The film, largely set in a gothic Massachusetts mansion, employs a double narrative: One takes place in the present, when private eye Benoit Blanc (Daniel Craig) and a local detective (Lakeith Stanfield) attempt to figure out who killed wealthy novelist Harlan Thrombey (Christopher Plummer) on his 85th birthday; the second explores the night of the crime, which Johnson continually revisits to highlight what each member of the quarreling Thrombey family — played by Jamie Lee Curtis, Don Johnson, Chris Evans, Michael Shannon and Toni Collette, joined by Ana de Armas — was up to at the time.

Rian Johnson would be the first to tell you that “Knives Out” is anything but subtle. Making an original film that “engages with the here and now” gave him the opportunity to weave droll social commentary throughout. While speaking to investigators, for instance, Harlan’s daughter-in-law Joni (Collette), a lifestyle guru clearly parodying Gwyneth Paltrow, mentions that she read a tweet that linked to a New Yorker profile of Benoit; Harlan’s daughter, Linda (Curtis), a savvy real estate mogul, unwittingly mentions in a separate scene that she had actually read the New Yorker article itself.

“I thought that would be cathartic for some of us, after this crazy, horrible year,” Johnson said of the film’s black comedy, which often delves into politics. One of the running gags concerns the fact that the Thrombeys, too consumed by their own self-interest, don’t seem to know which South American country Harlan’s loyal caretaker, Marta Cabrera (de Armas), hails from.

The uneasy dynamic between the Thrombeys and Marta, one of Harlan’s only confidants in the last few years of his life, makes “Knives Out” the latest film this year to explore class conflict. (The theme has also proved popular at the box office, given how well “Parasite,” “Hustlers,” “Joker” and “Ready or Not” all performed.) Though the family insists they will take care of Marta after Harlan’s death, they are quick to turn on her — even threatening the status of her undocumented mother — at the slightest inkling that her presence in the household could threaten their inherited wealth.

“It’s been really interesting, seeing movies like ‘Parasite’ come out, this chance to examine class today,” Johnson said. “It’s something that a whodunit is uniquely suited to and always has been, if you think about ‘Gosford Park.’ It’s just something the genre is good at.

“What’s interesting is using each one of these characters to dig into all these different facets in the power dynamic in this family, that kind of reflects society as a whole.”

This required assembling a cast adept enough to play the caricature-like figures without going too far. It began with Craig, whose star power Johnson credited with getting the movie made. Craig plays Benoit with a theatrical Southern accent, best displayed when he compares the investigation to doughnut holes — yes, for real — with a “mad gleam in his eyes.” Johnson could tell the James Bond actor was “salivating at the chance to chew on this part,” similar to how with Evans, who was fresh off playing Captain America, viewers will likely be able to detect “the relish with which he digs into playing a real jerk.”

“Once Daniel was on board, it made my life very easy because everyone wants to work with Daniel,” the director continued. “I think Michael Shannon was the next one that signed up, and everyone wants to work with him, and then Lakeith. It was like a snowball rolling down the hill.”

As someone who describes himself as a West Coast kid, Johnson considered New England to be an apt setting for a murder mystery because “there’s an exotic element to East Coast fall to me — it’s like a different planet.” Costume designer Jenny Eagan’s selections — such as Evans’s luxurious sweaters, which have already made a splash — reflect old money, a vibe set off-kilter by the strange set.

“The house did not look like that when we showed up,” Johnson noted. “The people who live there are not maniacs. Our production designer, David Crank, and our set decorator, David Schlesinger, they filled that house up with all this esoteric stuff. I gave them the references of one of my favorites, the 1970s version of ‘Sleuth’ with Michael Caine and Laurence Olivier.”

Paired with Marta’s economic background, these visual elements further her status as an outsider, an emotional anchor who often serves as a stand-in for the audience. De Armas has a few big Hollywood projects under her belt — “Blade Runner 2049” and, coincidentally, the upcoming Bond movie — but Johnson still marveled at her ability to join “this cast of mega-movie stars and take the movie on her shoulders.”

It helps that the cast had an absolute ball making “Knives Out,” reflected in their vivacious performances.

“There were no movie star egos,” Johnson said. “Don Johnson always said it felt like doing summer stock [theater]. In between takes, they wouldn’t go into trailers, they’d go into the basement of this house, this funky little rec room, and tell actor war stories and play games. It was like summer camp for movie stars.”