“Brigsby Bear” is a lesson in world building.

The dark comedy — about a man who was kidnapped as a baby and raised by his abductors in a remote bunker — has a massive invented world within the real world, a complicated fiction meant to keep him in the dark.

When we meet James (Kyle Mooney), he’s living in this bunker with his abductor parents Ted (Mark Hamill) and April (Jane Adams). He has a regimented life doing chores, studying and, most important to him, getting immersed in his favorite TV show, “Brigsby Bear Adventures.”

The show means everything to him. He wears Brigsby shirts, plays with Brigsby toys and even hosts a Brigsby videocast.

The thing is, “Brigsby Bear” isn’t real, rather it’s an elaborate fabrication of Ted and April, who have been making new episodes and all the show’s merchandise for years. It’s an impressive production, with more than 700 episodes and a dense back story that would intrigue any sci-fi or fantasy fan.

When the police show up one day, the 20-something James is rescued, Ted and April are arrested and James is soon reunited with his real family, parents (Matt Walsh and Michaela Watkins) and sister (Ryan Simpkins).

Mooney, working off a script he co-wrote with Kevin Costello, makes James a lovable outsider immersed in a world he doesn’t understand. Most alarming is the lack of new “Brigsby Bear.” The series is unfinished, and in order to give it an ending, he enlists his sister and her friends to make a “Brigsby Bear” film using the old props from his captors.

The film gives Hamill a great meaty role and he turns out a powerful performance, while getting to flex his skills as a voice actor. Greg Kinnear also stands out, playing the caring detective who reunites James with his parents.

“Brigsby Bear” is a fascinating and funny story of an outsider finding — and creating — his place in the world. It’s a funny, touching and emotional tale you can’t bear to miss.