While the Royal Shakespeare Company’s big new family musical The Boy in the Dress is, on the face of it, about a boy going to school dressed as a girl, the children book’s writer David Walliams hopes it resonates with everyone.

“Everyone feels different in some way or other,” he said before the opening night in Stratford-upon-Avon.

The Boy in the Dress tells the story of a 12-year-old Dennis, the star striker of the school football team, who feels different. “It is a story about celebrating difference and hopefully that speaks to everyone,” said Walliams. “It is very heartwarming and at the moment it feels like everyone is just shouting at each other all the time. It is quite nice to have something where people can just come out feeling happy.”

Robbie Williams, who wrote the show’s songs with his regular writing partner Guy Chambers, said it immediately resonated with him. “I’m eccentric and before you get to be eccentric you’re weird, which causes lots of internal dialogues to go off. One of your first memories of being on the planet is that you’re different, so this show speaks to the child in me and also the man-child in me. It is for the people who feel weird but they are not.”

Could that be everybody? “If they don’t then they are delusional,” Williams replied.

Walliams’ book, written 11 years ago, has been adapted by the playwright Mark Ravenhill and the show is directed by the RSC’s artistic director, Gregory Doran, who believes it captures a zeitgeist that may not have been there when it was first written.

“For me it really has a resonance with what’s going on in the world,” Doran said. “It isn’t about transgender, fluidity, transvestism or homosexuality or any of those things. It is a much simpler metaphor. To me it is just about being different, whoever you are and however you express that difference ... it is about celebrating individuality. It does it very brilliantly by being a play about fashion and football.”

Facebook Twitter Pinterest ‘To me it is just about being different, whoever you are and however you express that difference’ said the RSC artistic director, Gregory Doran. Photograph: Manuel Harlan

He said it was a show for everybody, although “it’s probably not great about teachers, but that’s because it’s from a 12-year-old’s perspective”. Nevertheless, teachers should see it, he added. “They have to come to see it, I think it’s required!”

Williams and Chambers wrote the the bulk of the show in a fortnight in Los Angeles, although he said there had been lots of rewrites and tweaking since. “There was a lot of prep before those two weeks,” said Chambers.

He said both he and Williams were big fans of the musical Oliver and had long wanted to tackle a musical “as a challenge and as a way of telling a story”.

“A rock show is a spectacle but it doesn’t have a story. What’s great about a musical is that you have a spectacle and you have a story. A theatre is like a magic box ... you’re transported away from the worries of your ordinary life, your troubles and frustrations, and this show really does do that. It celebrates difference and I’m a great believer in that, I think everybody should do what they want to do. It has a very positive, kind message.”

The Boy in the Dress was Walliams’ first children’s novel in what has become a stratospherically successful writing career. With books such as Mr Stink and Gangsta Granny, Walliams has for the last two years topped The Bookseller’s author rich list, with JK Rowling in second place both years.

It was Ravenhill who approached Walliams in 2013 and asked to adapt it, successfully pitching the idea to Doran. Everyone involved hopes it will have a life beyond Stratford and follow the example of the RSC hit musicals Les Misérables and Matilda the Musical.

They are important shows bringing much-needed income, with Matilda helping the RSC make a £3.45m profit this year, according to its annual review.

Doran said the commercial revenue allowed the RSC to do things it would not be able to do otherwise, although he said he had not gone into this project thinking it will be a money-spinner.

“You have no idea what’s going to land and what’s not going to land. From my point of view you have to do work that you believe in and that you think is important. If the show captures the audience’s imagination, it will last. If it doesn’t, it won’t.”