Sometimes the casting process really is about finding a group of friends who already have chemistry offscreen and then translating it to the TV screen.

Silicon Valley features a house full of guys who have improvised and performed together from Chicago to New York City to Los Angeles to HBO. Thomas Middleditch, T.J. Miller and Kumail Nanjiani go that far back together. Sullivan & Son, the TBS sitcom set in a Pittsburgh bar, stars stand-up comedian Steve Byrne and surrounds him with fellow stand-ups in Owen Benjamin, Roy Wood Jr. and Ahmed Ahmed. The Sullivan & Son guys have toured the nation multiple times as a group of stand-ups.

Undateable, which premieres with back-to-back episodes tonight on NBC, also packaged its four main leads in a stand-up tour with co-creator Bill Lawrence (Scrubs, Spin City, Cougar Town, Surviving Jack) this spring to drum up interest in the series before its launch. They’re pictured above (left to right: Chris D’Elia, Brent Morin, Rick Glassman, Ron Funches) in the green room backstage at Caroline’s on Broadway in New York City at the start of the tour in March.

Not only that, but also this! Lawrence told The Comic’s Comic that he and co-creator Adam Sztykiel specifically cast the lead characters as a group, looking for the immediate chemistry and back-and-forth dialogues that they’d provide to the set and onscreen. “Part of the battle in a sitcom is making it seem like people are friends and have chemistry,” Lawrence said. “And part of the idea behind this show is casting people that are friends in real life, you know, in the modern landscape, and you only have a couple episodes to establish that. It kind of helps that all these guys and girls hang out anyways, you know?”

I spoke with Lawrence and D’Elia on the phone more about this cohesiveness last week.

Bill, you mentioned wanting to have a cast that was already cohesive from the start. How did that reflect in the casting process and how you did this differently from past sitcoms?

“This is one of my favorite stories, I haven’t gotten a chance to tell this a lot. But it’s, you know, we went out and scouted comics,” Lawrence said. “And I love stand-up, I’m just an absolute fan. And the first two people we met were Brent and Rick — Rick Glassman and Brent Morin — two guys that not only have very specific voices comedically and different from each other, you know, so we could tweak the parts to them, but at the end of the show drive home together and live in the same apartment and had an easy chemistry that we’re like, ‘Wow, if those guys can act at all, it would be great to have them in the part.’ The funny part of that was, so we cast Brent and Rick and Ron Funches, who all knew each other first, and we didn’t have the lead of the show. And Chris D’Elia was still on the show Whitney at the time, and Brent made the mistake of saying, ‘My mentor in comedy is Chris D’Elia’ and we made the decision to go ahead and give Chris the part. He didn’t have to audition, we just offered it to him, you know, and had to wait and see if his other show kept going or didn’t keep going. It was going to be good for Chris either way. But the fun part of this story was, you know, this is Brent’s first job ever and there was about three days at the comedy store that Brent got to go up to Chris and say, ‘Hey, Chris, we’re kind of finally on equal footing. I’ve got a TV show now too,’ you know? And then we gave Chris the part of the lead and Chris, you know, we went out to the comedy store to see those guys and Chris was like, ‘Hey Brent, remember your TV show? It’s my TV show now.’ And then on the poster, it’s like Chris walking with Brent over his shoulder and just seeing Chris torture Brent that way immediately became the big-brother, little-brother dynamic on the show.

D’Elia added: “Yes, I said, ‘You’re not going anywhere without me.'”

So with Chris, you know, being the one with the experience, you didn’t have any kind of reservations in terms of hiring a bunch of stand-up comedians together regardless of their acting experience?

Bill Lawrence: “No, you know what, what I – I’ve been in the business for a long time and when I started out, there were comics in every show, you know? Because the multi-camera skillset involves first and foremost being funny, secondly being able to vibe off the audience and hold for laughs, and third, you know, acting. You know? And obviously none of these guys and girls would have gotten the parts if they couldn’t also act, but for some reason not only have we gotten away from that, but as there’s less and less multi-camera sitcoms, it’s a skillset that comics have more than most people, you know?

“You can cast a young actor or actress right now and most of them have not been in front of a live audience that way. Stand-ups are every night, so I had no reservations, you know. I was a fan of Home Improvement, of Seinfeld, Drew Carey Show, Roseanne, you know, those are the multi-cameras I grew up on. And, you know, one of the things I’ve noticed with the second you get comics, if the joke doesn’t work, they sense it and they just change it on their own, man. It’s the ultimate gift.”

The older examples you mentioned all take one central star comedian and then cast a whole set of experienced actors around them. Now with Undateable there’s also a recent trend with Undateable, Sullivan and Son, Silicon Valley, where you really have that sense of cohesiveness right from the start.

Bill Lawrence: “Well I think it involves a voice. You know what I mean, I look at the show Veep that way, too. And, you know, Veep is amazing comedy, it’s mostly UCB and improv folks and they have the ability to kind of riff and go off on tangents in ways that they understand each other’s language. Look, so the, you know, the one compliment that I would hope that we would get from this show is that the comedy, you know, doesn’t seem maybe as forced as it often seems on multi-camera sitcoms. It seems like these – this group is really just trying to crack each other up.”

Alright. And so Chris, what’s it like to get a job just because you’re another comedian’s mentor?

Chris D’Elia: “Just to be called mentor means I can retire. Pretty cool, you know? I’m 34. I’m a young mentor, that’s kind of cool.”

Bill Lawrence: “You’re a very young mentor, man. You’re a very young father figure.”

Chris D’Elia: “When I think of mentor, I think of like Professor X. He’s bald and in the wheelchair, you know what I mean?”

Bill Lawrence: “Well, of course. None of these guys know what I look like, that’s exactly what I look like.”

D’Elia also elaborated on his connections with Morin and the other comedians.

“I’ve known Brent for — I think Brent was – he was 19. We were at this club called the Ha Ha Café, and I…see him on stage. And I was — God, we’ve probably been doing stand-up — maybe I had been doing it a little bit longer than him. I was also taking it more seriously, then, when I was about 25…

“…So I just kind of — there was something I liked about him, and I thought that he was going to be good, and we just kind of became friends and we would hang out. He was still going to school, I think, then. And then — and then we, you know, I started doing bigger and better shows and so did he and then I took him on the road to open for me. You know, he would open for me for a while, so I have known Brent forever. Same with Rick, I mean…”

Bill Lawrence: “You met Rick early too, right? Because Brent and Rick worked together.”

Chris D’Elia: “Yes, I met Rick – I met Rick probably like four years ago when he first moved to LA. I met Rick first actually, before Brent met Rick, and now they live in the same apartment complex together. And so I have known Rick for four years. And then Ron I knew probably a year before the show. Just from the circuits, from running around.”

Here are two quick NBC videos from the set of Undateable that also tell you what you just read, but with moving pictures!

Undateable premieres tonight on NBC.

Related reading: Undateable co-creator Adam Sztykiel offers up five truly “undateable” sitcom characters from our favorite TV hits.