Red Dwarf star Robert Llewellyn has put the show's longevity down to the quality of the scripts and the fact they have "enormous fun" on set.
Robert, who plays Kryten in the sci-fi comedy, was speaking during a question and answer session at the Edinburgh International Television Festival.
The session followed a screening of the first episode of the 11th series, which is due to air next month.
Robert told an audience at the city's Filmhouse that the latest series gave him the most joy to film.
He said he later realised that most of the photographs taken of the cast on set showed them "laughing ourselves stupid".
Asked about the show's enduring appeal, the actor said: "It's hard work but we have enormous fun making it and I think there's that chemistry that you couldn't just create. And I've always said it's the writing. That is when it blows us away, when we're in the read-through.
"I actually think it was the happiest Red Dwarf (to shoot)."
Co-star Craig Charles, who also attended the screening, quipped that the show has lasted so long "because we're still prepared to do it".
He added: "None of us actually cracked Hollywood or anything."
Reflecting on the bond between the team, Craig said: "We've known each other longer than we've known our wives and children. I've grown up with them all, really."
Red Dwarf XI reunites the original cast of Chris Barrie (Rimmer), Danny John-Jules (Cat), Robert and Craig (Lister), along with guest stars. The series was recorded in front of a live audience at Pinewood Studios.
The first episode sees the Dwarfers find themselves in an alternative version of America where modern technology is prohibited, making Rimmer and Kryten illegal. The have to infiltrate the tech-savvy underground to try to bring down the authoritarian regime.
Craig said he was in awe of the sets used in the latest series.
Referring to one street scene, he said: "We built that street inside Pinewood. It was like being in a real movie.
"We were in awe of it. You'd go home at night and come back the next day and they'd built the whole street overnight. Why can't they do that in the real world?"
The actors were also joined at the Q&A by writer, director and Red Dwarf co-creator Doug Naylor, who explained the inspiration behind the first episode of the new series.
He said: "That idea came from what's going on at the moment. Science is refuted by a lot of people, which is scary. What would happen if there was a society where science wasn't allowed?"
The six new episodes will go out on Dave next month and in October, with the first episode being screened on September 22. Each episode will also be available on the online on-demand service UKTV Play a week before its broadcast transmission.