There are plenty of things from the world of arts and entertainment that have contributed to the deep programming of my brain, forming an integral part of the mental DNA of what makes me me and without which I would probably be a different person. I've already written blogs about some of them - Toyah for instance, or Doctor Who. But there are many more. The works of Douglas Adams for instance. And - as I recently realised - a lot of the comedy of Robert Newman from the 1990s. It's all getting a bit tricky now...

And then browsing through Netflix I realised there was another TV show that had subtly and quietly wormed its way into my subconscious. It was comedy naturally. But it was also science fiction. Of course I am talking about Red Dwarf.

People who don't watch it probably have an idea of it as a bit laddish or puerile - toilet humour in space. There may be a grain of truth in that but it is mainly so much more...

I clearly remember when it started. Seeing trailers for a sitcom on BBC2 which looked as if it might be interesting - that poet guy from Saturday Live and the comedian who did voices for Spitting Image on some kind of spaceship in the future. That had to be worth a punt, so I tuned in expecting a Star Trek spoof.

And even though there were elements of that I was pleasantly surprised to find some nuggets of pure Science Fiction - and fairly original ones at that - in the script. The dead crew member George being revived as a hologram. The idea of the stasis booths.

There was a lot of well observed comedy in it as well - as someone who had recently left education Rimmer's exam anxiety stood out as something that was very familiar to me.

But it was twenty minutes in - with only a third of the episode left to run - that I realised I was watching something special, something that wasn't afraid to tell stories on an astronomical scale that might have given Olaf Stapleton pause for though.  And this was done with just two lines of dialogue.

"Everybody's dead Dave."

That alone was bold. The show had already killed off everyone we'd met aside from Lister and Holly. But that was just the appetiser.

"Three million years."

That was insane. That was fantastic. The resurrection of Rimmer as a hologram was  surprise too, although not as big a one thanks to the scene with George earlier on. All in all this was a very promising set up for a sitcom, a first rate first episode.

But wait, they hadn't finished yet.

What the...

A stylish dude in a salmon pink suit just popped out of a ventilation duct. I had absolutely NO idea what was going on now. Was this a dream, a hallucination? A malfunction of the ship's hologrammatic projection system? No, the Cat turned out to be something far more interesting and yet another mind stretchingly brilliant idea.

Everybody's dead.

Three million years.

A creature who evolved from the ship's cat.

When I'd sat down to watch half an hour previously I had no idea of the direction I'd be taken, but needless to say there was no question of me not tuning in again the following week.

And in general the series lived up to its promise. Given that these four characters were the only sentient beings in the universe some of the story-lines had to be quite inventive and also encouraged a lot of comedy where - despite the out of this world surroundings - the humour arose from people's relationships with each other and the anecdotes they'd tell. Their foibles, fear and failures and the rare occasions they overcame them.

This combination was a winning one and went on to spawn four novels (the first of which retold the beginning of the story in far more depth, explaining some of the odd things that there hadn't been time to cover in the TV series and allowing us into the thought processes of Lister and Rimmer) and so far ten TV seasons with more on the horizon.

But for me the show was at its most enjoyable around seasons five and six. Perhaps this is partly due to my own taste - at this point the stories contained the perfect balance of science fiction and comedy for me. We knew the characters well enough by now not to require any more two-handers or bottle shows (such as Marooned) and so the humour and the enjoyment could come purely from the plot and the characters' reactions to it. New character Kryten had added something to the dynamic as well, especially when he occasionally took on a Spock or Data role. Furthermore the emphasis seemed to have changed - no longer was the  funny scenario invented first and then a loose science fiction explanation added afterwards (see Backwards or Timeslides) - now a science fiction idea came first and foremost and the humour flowed naturally from that.

And what science fiction ideas. Being constrained by the rules of the universe they had created - the last human being alive, mechanoids, simulants, gelfs but no aliens or god-like beings - didn't put a dampener on the writers' imaginations whatsoever. Nowhere is this better illustrated than in my favourite Red Dwarf episode of all time - Back to Reality.

One of the first things that strikes me rewatching this episode is that there's no comedy in it whatsoever for the first two minutes. This could just as easily be an episode of Star Trek: The Next Generation albeit one that's skipped the Captain's Log and leapt straight into the action. And yet we don't notice. We're caught up in the story straight away.

And it moves fast. Within seven minutes the entire cast are killed and we're presented with another change in perspective as profound as the aforementioned "three million years".

Could it really be true that the entire series had been a total immersion video game?

The shift in perspective is radical and far reaching for the characters, but that doesn't stop it from being incredibly funny at the same time. Their initial reactions to their new personas is telling and hilarious. Craig Charles's character is lost and hopeless when he thinks he's not Lister but rather the kind of sad act who want to spend four years playing a computer game - and this is even before he finds out the truth about Sebastian Doyle. Chris Barrie's character is so relieved to not be Rimmer that he actually starts to relax until he discovers who Billy Doyle is. The underlying pomposity of Robert Llewellyn's Kryten comes to the surface when he starts to believe he's really Jake Bullet.

But one of the best comedy moments in the episode is achieved with no dialogue whatsoever - just a closeup on Danny John-Jules as he comes to the awful realisation that he is Duane Dibbley.

This is obviously such a traumatic experience for him that the alter ego returns to haunt him in the following season's Emohawk - because of course, no matter how much this episode felt like an ending the status quo would be restored by the close.

Watching for the first time though I wasn't so sure. I was caught up in the story and shared Lister's despair when he looks through the viewer at the Red Dwarf game in progress. This tiny scene perfectly reflected the disappointment felt upon waking from a wonderful dream, a disappointment that gets stronger and stronger the more the dream slips away.

And a little later the wonderfully edited cut at 21'15" when we suddenly see our heroes back on Starbug gives us the inverse of that feeling, the relief upon waking from a nightmare, the release of the knowledge that it was all only a bad dream. Of course the Starbug crew have yet to realise this and this reveal serves not only to pull the rug out from under the audience yet again but also as a cheeky wink to the fourth wall - far cheaper to have the four of them run around playing make believe on the Starbug set than film a car chase with helicopters, motorcycles, rocket launchers and a leap over a drawbridge...

And no matter how surprising the final reveal is, it all makes perfect sense. The scenes back at the beginning of the episode on the SS Esperanto - why would a haddock kill itself? - were a blatant clue to the resolution. We even saw the crew getting affected by the despair squid venom. But so well constructed was the group hallucination that they - and the audience - bought into it. For a while we all believed that it could be the end.

In season six there was an episode nearly as good as Back to Reality. Out of Time contained similar misdirection and again felt like it could well have been an ending. Finishing on a cliff-hanger was a genius move - it was just a shame that we had to wait so long for its resolution and (for me personally) that by the time we got there the show had started to change again from the season five and six shape that I'd found so appealing.

I still watch and enjoy of course. These characters are part of me but the show could no more go back to seasons five and six than I could go back to the age I was when I watched them. Or change what I had for breakfast this morning.