Joseph Gordon-Levitt in Brick. Photo: Focus Features

Which contemporary director has done the most to resuscitate the mystery genre? It’s Rian Johnson, in Hollywood, with pitch-perfect pastiches like his high-school-gumshoe breakout, Brick; the time-travel noir, Looper; and the upcoming Knives Out, a cozy Agatha Christie whodunnit that thrilled audiences at the Toronto International Film Festival last month. What’s his secret? As Johnson explained recently, the success of these films comes from not approaching the detective genre with a Scream-style wink, but instead from largely playing it straight. “One thing I don’t believe in is the notion that this is a dusty old genre and you have to find a way to flip the old tropes on their heads,” he explained. “The basic machinery of it, the tropes of it, are why it works.”

For Vulture’s Mystery Week, it seemed fitting to ask Johnson about the film where he first showed off his facility with the genre. Brick made an appropriately powerful impact when it hit theaters in spring 2006, thrilling film nerds with how skillfully Johnson adapted the genre’s tropes, beats, and stylized dialogue (“Heel it now, dig?”) to a 21st-century setting. In a recent phone conversation, Johnson took the time to share with us the lessons he learned about movie mysteries on his debut, and how he applied them to Knives Out.

1. Go back to high school.

The conceit of Brick is simple: It’s a Dashiell Hammett–style detective story, ported over to a mid-’00s SoCal high school. Johnson had gotten into Hammett thanks to the Coen brothers, who frequently mentioned the author’s Continental Op stories as an inspiration for Miller’s Crossing. “Brick is really my attempt to capture the impact that reading Dashiell Hammett for the first time had on me,” he says. Our hero is Brendan (Joseph Gordon-Levitt), a bitter loner attempting to solve the murder of his ex, Emily (Emilie de Ravin). His investigation takes him on a tour of the school’s disparate social circles — violent jocks, stoner burnouts, and rich girls with secrets — and escalates into a violent gang war centering on a mysterious brick of drugs. In his own words, Johnson explains what the high-school setting adds to the mystery.

Part of what’s fun about watching Brick now is that I wrote it not that far out of high school. There was something that made sense about the mythologized emotional memories of high school, and there was something about the alienation of the genre. That type of antihero made a lot of sense in terms of what a lot of us felt we were in high school — people outside this sort of mystery box that we can’t quite get into.

I wrote the script right out of college, and I did a couple tweaks to it over the next eight years, but I didn’t change it that much. What I was really doing all that time was just trying and failing to get it made. I can tell you the things that we got over and over from people who had money: Everyone asked if we could set it in college. The fact that it was high school, with this amount of violence in it, was not appealing.

Hammett writes like Hemingway — not an ounce of fat, and no sentiment. That brutality of tone is something that I tried to get into in Brick. One thing Hammett does over and over in his books, is his main characters take a huge amount of punishment. They’re like the Terminator. The Continental Op gets the crap kicked out of him and just keeps getting up and walking forward and keeping on with his job.

2. Teach the kids to speak noir.

For a tiny indie, having every character speak in the genre’s distinctive patois was a way to add high style without bursting the budget. The dialogue in Brick is a mix of period jargon, detective slang, and Johnson’s own additions. Getting the cast to nail it required weeks of heavy rehearsals.

We got a lot of notes back asking if they had to talk like that, which I guess is a fair question.

We weren’t going to be able to create expressive sets. We weren’t going to be able to go to town with production design. It was just going to look like a high-school movie, until somebody opened their mouth. Once they did, you then knew this was something different. You had to prick up your ears and figure out what this world was. It was making sure that the audience felt secure in that disconnect of being in a fantasy land. This is more Blue Velvet than The River’s Edge.

We did hours of rehearsal, just saying the words over and over again. It was like learning a piano piece. You have to get the muscle memory of your fingers going, and then once you know it so well you could do it upside down in a tank of water, then that’s when you can start actually putting intent and feeling behind it.

There was one line, I remember Joe doing it on set and thinking, This movie might work. After Joe punches Noah Segan’s character, Dode, and there’s the tough guys who are supposed to be protecting Dode, he says, “Throw one at me if you want, hash-head. I’ve got all five senses and I slept last night, and that puts me six up on the lot of you.” That was the type of thing where it’s like, okay, we’re putting our cards on the table and just going for it. Joe said it’s the kind of line you have to earn with the rest of the movie.

There were some Southern California beach-kid turns of phrase that worked their way in there. There’s a reference to a They Might Be Giants song in there. Kara tells Brendan at one point, “Well, if you already have the world’s address …” That’s how big a nerd I am: Hammett was drawing from the hard-bitten criminal argot of his time, I was drawing from They Might Be Giants songs. And it’s not an obscure reference or anything, but Steely Dan has a song, “The Boston Rag,” where they say, “Lonnie was the kingpin back in 1965,” and that lyric had stuck in my head, and that’s why I called him the Pin.

I know I made up the name of the drug. It might shock you to hear this, but I had not and still have not been a drug user. There’s a scene where Brendan finds the brick of drugs lying out on plastic in the Pin’s basement. Jodie Tillen, who was our production designer, had worked as a costume designer on Miami Vice, and she was so upset. She was like, “You would never do that!” And I was just staring blankly at her.

3. Fail to cast James McAvoy.

In the eight years Johnson spent trying and failing to make Brick, high-school movies became one of Hollywood’s favorite subgenres. This wound up paying off when it came time to cast the film, but it also meant there was plenty of competition. Actors got snatched up, and other projects frequently came in and threatened to steal Brick’s shine. Funnily enough, it wasn’t Veronica Mars that kept Johnson up at night — though the two projects had extremely similar log lines, the film was far enough along that it wasn’t an issue — but Cruel Intentions. “My producer at the time said, ‘Have you heard? They’re doing a noir in high school.’ On paper, it was like ‘Oh shit!’”

There were a lot of high-school movies coming out when we were getting Brick together, which was one reason we were able to get such terrific young actors in it. There was a lot of work at the time for people in their early 20s who looked like they could still play teenagers. But I didn’t have anyone specifically in mind. In terms of the leading actors of that age during that timeframe, you name them, we tried for them. James McAvoy read for it at some point, then he went on to do Children of Dune and he blew up and we couldn’t get him.

But when I met Joe, I was completely committed to him being in the part. I grabbed onto him like a guy in the middle of the ocean grabbing a buoy. He had to push for a few months for his schedule, and we were in this terrifying, tenuous place that anyone who’s made a tiny movie can relate to, where we had just gotten a little bit of money together. By pushing for a few months, something could happen and the money could go away. I didn’t care. I was like, We gotta wait for Joe. He’s Brendan.

I got so lucky finding Joe. There’s half a handful of people in the world that probably would’ve worked for it. To find someone who ended up becoming a friend and collaborator, hopefully for life, that’s a pretty lucky roll of the dice.

4. Pick a different kind of coat.

Humphrey Bogart’s Sam Spade had his trench coat and fedora. In Brick, Gordon-Levitt’s Brendan has an olive-green army jacket.

We spent so much time searching for the jacket. It was less that it was something that had to be iconic, and more that that was actually something I did: I always wore the same jacket, all the way through high school, just because I thought it looked cool. There’s something about the shell-like aspect of shoving your hands in your pockets, hunching your shoulders over, and that becomes your protection. Joe had a thin frame, especially back then, and so a jacket was going to give him some bulk, give him this slightly hulking shape. It was something he could disappear into.

I was also really into the shoes defining the character. I think those were Joe’s grandfather’s shoes that he’s wearing in the movie. You can tell we shot out of order, ’cause there’s this scene at the beginning when he’s on the phone with Emily, and then the car goes by, and he looks at the cigarette on the ground, you can see the sole of his shoe is coming off. Which I like — he’s losing his sole! Wokka wokka wokka.

5. Don’t give your detective a plan.

While Hercule Poirot and Sherlock Holmes are legendary for trapping criminals in their organized intellectual schemes, Hammett’s detectives are more comfortable operating in a world of chaos. In structuring his mystery, Johnson took a few pages from the master’s playbook.

I knew I was going to do the flashback structure at the very beginning. You start with Brendan discovering Em’s body, and then you flash back a few days, and the entire first act is leading up to the point where we catch up with that moment.

The other big thing I had, and this is something that again comes from Hammett, is that Brendan makes a completely irrational move. He commits in a way where he’s in it beyond just casually investigating, and that’s when he picks up the body and decides he’s going to hide the body so that the police don’t get involved. But that also implicates him. It’s the point of no return.

There’s this hermetically sealed social world, and you have this phase where the detective is trying different angles of pinging the outside trying to get in. The only visual representation I can think of is that it’s the sperm trying to get into the egg. He’s not gathering clues or doing anything clever with a magnifying glass; it’s going around annoying people until one of them says something that leads him to the next person he can annoy. There’s really no plan.

The process of that leads to the Pin. Having that meeting with the quote-unquote main boss partway through, the next step is to humanize the boss, like Gutman in The Maltese Falcon, who is built up as this mysterious character and then you meet him, and there’s something slightly comic about him, actually. You realize, this is not the supervillain who’s pulling the strings. There is a bigger game that he is also caught in the gears of, in a way that’s slightly tragic.

I knew I wanted to basically take a page from Red Harvest, where Brendan just blows it all up. He leads everything down the path where there’s this gang war, and he’s trying to keep it under control so it doesn’t explode, but when it is finally going to explode at the end, he kicks the gun back into the dark room so that it will. And then of course the last scene is The Maltese Falcon again, bringing it back to the femme fatale who was behind it the whole time.

6. Lean into the moral ambiguity.

What’s the difference between a detective story and a classical whodunnit? For Johnson, it all comes down to moral clarity, or lack thereof. He considers Brick and Knives Out emblematic of the divide between the two strains of literary mystery. “They’re chalk and cheese,” he says of the two films. “Besides the word ‘detective’ in the synopsis, there’s very little overlap between them.”

With Brick, the pleasure of the movie does not lie in, “Oh my god, it was her all along!” The pleasure of it is being on this journey as Brendan goes through this underworld, and all these complex layers reveal themselves. The more important thing was that Brendan’s character was gonna have real moral culpability at the end. We would get the scene where he lays it all on the lap of the femme fatale, but then there’s always the kicker at the end with the moral ambiguity of, Boy, he’s awful judgmental, and he’s letting himself off the hook to a large degree. He’s not a healthy character, Brendan.

And that’s another thing that is very appealing about Hammett, the way that he is both glamorizing but also eviscerating American masculinity — that kind of moral murkiness. Knives Out is also a detective thing, but it’s a whodunnit as opposed to a noir. I think at the soul of it, the difference between those two genres is moral ambiguity. Hammett’s books always had this queasy moral ambiguity in the antihero. Whereas there’s moral clarity in the whodunnit: There’s going to be a murder where moral chaos is created, but the detective, the good father, is gonna come in and sort out all the clues and set everything right.

7. Put away the graph paper.

Raymond Chandler famously wasn’t sure who murdered the chauffeur in The Big Sleep. Johnson doesn’t leave any equivalent loose ends in his own mysteries, but that’s not his highest priority. The context in which the story needs to make sense is the intuitive plane, not the logical one.

Every single person who does any kind of mystery — it was like this with Brick, it was like it with Knives Out — you’re on set living in a constant state of fear every time an actor comes up to you with a question. Because you’re 95 percent sure they’re about to ask something where you’re gonna blank and realize your entire story doesn’t make sense! The complexities of who’s where, when — there may be folks out there who would like to sit down with graph paper and work it all out, and that’s part of the pleasure. But the reality is, most people are going to experience it as a narrative. The main way the story has to make sense is in an intuitive way, where you get the journey of the main person. Then you try and work out the other stuff, and hopefully it all lines up and makes sense.

The sweet spot that you’re aiming for is the feeling of, Oh, I should’ve been able to figure that out. That’s the bull’s-eye, but it’s a bull’s-eye the size of a dime, and you’re throwing a dart from across the room. The hope is that you have figured out ways to hide your cards enough that you get to the end and it doesn’t seem like there’s any other way it could’ve gone down, and they still hadn’t guessed it. I am fundamentally in the Hitchcock camp: The thing that really matters during a movie is not this game of, “Are you going to guess it at the end or not?” Hitchcock had contempt for that, I don’t. But I do agree with him that the basic tension of a movie comes not from withholding knowledge from the audience, but from giving them knowledge and making them worry about a character, as opposed to making them do a puzzle in their head.

*This post originally misstated the project on which James McAvoy blew up.