You might want to block out some time for this episode of The Simpsons: On May 4, the long-running animated Fox comedy will journey into the world of Lego, as Homer finds himself transported into another yellow dimension. Will it be a snap for him to return to his old world? What happens when things like Kwik-E-Mart become the Brick-E-Mart? And how will this episode stack up against The Lego Movie, which has earned more than $250 million at the box office? “I think it’s just as good and it’s free,” quips executive producer Al Jean, who adds: “If anyone out there has an idea for a new material that the Simpsons can be made out of, please write to us. Cardboard? Yarn? Anything is up for grabs.” To learn more about the show’s 550th episode, titled “Brick Like Me,” read the following Q&A with Simpsons co-executive producer Brian Kelley, who wrote this unconventional installment, and executive producer Matt Selman, who oversaw the project.

How did the idea of a Lego-themed episode come about? You’ve had this in development for awhile. Did you know at the time that Lego was doing a movie too?
BRIAN KELLEY: We’re always looking for cool, visual things to do with the show that will surprise people. So Matt and I were trying to kick around ideas for a show and Matt suggested a Lego CGI episode.

MATT SELMAN: We didn’t know about the movie at that point. For the record, we still don’t know about the movie. [Laughs] Brian and I had been dreaming of doing a Simpsons Lego episode for as long as we could remember, and in early 2012 we started seriously talking about making it happen. Then we found out that Lego was into doing a Simpsons couch gag. So it was a magical coming-together of pretend yellow people.

You’ve done segments featuring the Simpsons as puppets and a 3-D Homer. Is this the most ambitious episode of the show ever?
KELLEY: If the ambition of a Simpsons episode can be measured by how much sleep I lost, this is the most ambitious episode ever.

SELMAN: We’re spending more time in another animation universe than any other episode. … Instead of more ambitious or less ambitious, I would say it’s a different kind of ambitious in that it’s not a Halloween episode, but the concept of it is more science-fiction and surreal than any non-Halloween episode we’ve done that I can think of.

KELLEY: I would say the challenge was to come up with a story that could conceivably take place in our reality and that isn’t what we call a non-canonical show, like the Halloween shows, which are purely for fun and everyone knows that. This had to be semi-plausible, so it was a lot of work crafting a story that met that criterion.

What was the toughest part of the process?
KELLEY: It was the front-loaded nature of the writing process. We had to get it right from the get-go, because it’s a very expensive animation process. There’s just a certain amount of time you need for the computers to churn out the rendering, and you can’t mess with it.

SELMAN: Once we wrote the roughly three-quarters of the show that is animated in CG, we really couldn’t change it that much and we were going to be stuck. … Having two years to work on something also means you have two years to obsess about something. So we did way more obsessing about the rules of the Lego world versus the rules of the real world. But for the sake of this episode, we have to believe that the Simpsons live in the real world – at least they believe they do. And when they’re in the Lego world, there are different rules. So, a lot of jokes, we were like, “Oh, that’s funny, but it doesn’t make sense because they don’t have fire.” When your readers see the episode, they’ll see why we put so much work into that.

KELLEY: At the same time, it opened up new areas because someone can fall into pieces and then be put back together. It was really just adjusting your brain to that new set of rules and being careful to follow them.

What were some of the fun debates you had over these rules?SELMAN: It’s like unpacking an old suitcase of sadness…. Some of them we can only say in spoiling the episode, but let’s just say: Does a fantasy have a B-story?

KELLEY: A question was: Does plastic feel pain? And the answer was: No. But what was cool was those limitations opened up new jokes. We could have something happen to a character that would kill them or cause them great pain, but in the Lego word, there are no consequences.

SELMAN: In the movie, if you exploded, you were dead. We have different rules in our Lego world than they did. They did have more consequences.

How different does the Simpsons’ Lego universe look from The Lego Movie’s?KELLEY: It’s quite different. The Lego Movie looked very different than the Lego CGI cartoons. I would say our look is maybe between the two, where there’s realistic lighting. It was a really cool choice to make the movie look like stop-motion, and there’s focus in the camera so things in the background are out of focus…

SELMAN: We consciously said: We’re not going to do rack focus stuff, where it’s blurry in the background and clear in the front. There’s semi-realistic lighting, but there isn’t artificial camera focus. Tricks like that worked so well in The Lego Movie, but we felt they would not work as well for our toy universe.

KELLEY: Also, we don’t do that on the show, so it felt more natural to have everything be in focus. And we wrote a ton of background jokes, where there is so much going on in every frame.

Are there any winks to the movie? Is everything awesome in your episode?SELMAN: Um, some of the time. I think the episode is about: What is awesomeness? Is a universe that is awesome all the time a universe you truly want to live in?

KELLEY: [to Selman, impressed] Oh my God – that was good.

SELMAN: It will be very clear at one point that the episode knows about the movie.

Let’s talk about the plot. So Homer wakes up in a land of Lego and has to find his way back somehow?SELMAN: We thought it was cool to start off in the world of Lego and have all the characters think that this was their normal life. Then through a series of bizarre flashbacks, Homer starts to suspect that the Lego world isn’t where he belongs. So he starts tearing away at the fabric of what he thinks is reality, which is never a great idea. At the end of the day, he has to choose between the world of plastic and the world of meat. … And there’s the best Advent Calendar joke I’ve ever seen in a half-hour show.

KELLEY: We worked really hard to put as many of our regular characters in there as we could and have them appear as Lego figures, mainly because it was just really fun for us.

SELMAN: If you doubt our commitment to the complete Lego-ification of Springfield, we even wrote Lego versions of the ratings on the Love Tester in Moe’s bar.

What are the stakes in this episode?KELLEY: As dads, Matt and I have probably spent thousands of dollars on Legos in our lives – let’s say hundreds of dollars. And we face the terrible knowledge that one day our children might outgrow them, and part of the story of this episode comes from that place.

SELMAN: It could be argued that the plot of The Lego Movie is about a kid that wants to play with dad’s toys. So it could be argued that we are in fact a sequel to The Lego Movie, in that, what happens when the kid doesn’t want to play with dad’s toys any more but the dad was liking it? So I would say this is the official Warner Bros.-approved sequel to The Lego Movie. I’m pretty sure. [Laughter]

Lego helped pay for the episode. How much input did the company have into the creative side? I understand that there was a sex scene between Lego Homer and Lego Marge that they wanted to tone down.KELLEY: Let’s say we had a lot of fun with the Lego sex scene, and I’m not surprised that it was a little too risque. But we’ll always treasure the memory. [Laughs] They were good partners. Our audience is slightly older than their audience, so they would occasionally have concerns, but all the words in the episode are ours. If they had an objection, which they did on very rare occasions, we’d find a way around it.

SELMAN: And sometimes, as often happens, that made the episode better anyway. … Everyone agreed from the get-go that this episode would be aimed at parents and their younger kids, so we all worked together to make sure we had the right tone for that.

Oh, and does this mean that the Blockoland episode is no longer canon?SELMAN: Oh God! This interview is over!

KELLEY: I’m interested to hear what fans have to say about that! [Laughs] Hopefully, they can coexist.

Is there any talk of the next Simpsons movie being a Lego movie? I think you could break every movie theater if that happened.SELMAN: There aren’t any puns left! There aren’t that many words to make puns out of. Brick, block, element, piece, mini-fig, right? That’s it.

KELLEY: And element is really pushing it already. … I hope we’ve done every Simpsons-style joke you can make about Lego. I hope that well is dry and that it would be impossible for anyone to write one more joke. Having said that, I’m currently working on a young adult novel that features Lego and The Simpsons. I’m going to be rich.