THREE times Peter James's crime novels have been transferred on to the screen and three times he has not enjoyed the results.

Like the man in the Milk Tray ads, he always wears black, and his stories tend to be similarly dark, but Shaun McKenna's stage adaptation of The Perfect Murder is full of comedy and James is perfectly happy about that.

"It's much funnier than the book, and that works really well on stage ," he said in the interval at Monday's press night. "Shaun and Ian [director Ian Talbot] have changed the ending as well, and that's a good thing. It used to be like watching paint dry; now it's more theatrical."

It should be noted that Peter James is a lover of theatre, a live art form that he believes suits thrillers with their combination of mystery, intrigue, black humour and in this case hammer, not Hammer, horror.

Meet Victor and Joan Smiley; Smiley by name, but not by nature. They hate the sight of each other, especially on Sundays, and they could perfectly happily murder their other half. They are in a marriage of inconvenience, the inconvenience being the need to avoid each other to each conduct extramarital shenanigans.

Grouchy Victor (Robert Daws), an IT manager with itchy fingers, wants to run off with clairvoyant Croation call girl Kamila Walcak (Simona Armstrong); Joan (Scottish-accented Dawn Steele) works at a supermarket ten hours a week and talks of devoting herself to charity work, but would love to be a Scottish widow to spend more time with wide-boy Don Kirk (Gray O'Brien).

Mind you, Don is rapidly developing the kind of habits that annoy her: humming, just like Victor does, and speaking in Cockney rhyming slang despite not being born anywhere near London, let alone within the sound of the Bow bells.

The presence of two beds in Michael Holt's design – one at the Smiley's 1960s house outside Brighton, the other, Kamila's room in the Kitten Parlour brothel in Brighton – might suggest a bedroom farce, and certainly there is comedy aplenty that straddles sitcom and something more sinister in a play that puts the sex into Sussex and the fun into murder.

Victor loves watching old crime thrillers; Joan loves the CSI age of criminal investigation, but each feeds off their favourites to plot how to kill their partner after 20 years of marital inertia.

Victor might just be overcomplicating matters: "There are 53 rules for the perfect murder," he tells Kamila. Thankfully, the play is not that complicated but it is pleasingly clever, very assured, with twists aplenty and the stoic presence of Thomas Howes's Detective Constable Roy Grace in his first case, staying calm while all around him are plotting and taking all the comic lines in Talbot's delightful production.

Rather than murdering a Peter James novel, like those rotten screen versions, The Perfect Murder will surely be the first in a series of stage conversions.

Peter James' The Perfect Murder, Grand Opera House, York, until Saturday; performances at 7.30pm, plus 2.30pm today and Saturday. Box office: 0844 871 3024 or atgtickets.com/york