Oil drips down the walls of the Old Red Lion theatre. It pools at the foot of a cheap black sofa, and stains the kitchen unit behind it. In Mark Weinman's debut play, the black stuff gets everywhere – but so does the black dog of depression. The two are very much connected.

Having taken a job on an offshore oil rig, 25 year-old James (Scott Arthur) moves into a flat in Aberdeen with the upbeat, overbearing Ryan (Laurie Jamieson). He works two weeks at sea, then spends two weeks sat on the sofa at home in his pants. He has a daughter back at home, Dyl, who he never sees, and an ex, Steph, to whom he never speaks. Increasingly, his job comes to look like an escape hatch, a hermetic existence far away from life's problems. It might even be a sort of self-imposed punishment: hard manual labour in harsh, miserable conditions.

Dyl's a flatshare comedy hounded by depression. It scores Odd Couple style laughs from two young men in their pants, shooting the shit, playing badminton over the sofa and fooling about in the wendy house meant for Dyl. What Weinman never lets you forget, however, is that they are, ultimately, cooped up. For all the fun, for all the bantz, these two men in their prime – boys, really, and lost – are wasting their lives eating Lucky Charms in front of endless repeats of One Born Every Minute.

For all that Jemima Robinson's unsightly design lays it on a bit thick, Weinman's play never lets you lose sight of the oil rig either. It ties a domestic drama to the environment, and, as James and Ryan sink into the sofa, their inactivity is all of ours. Just as they never act to affect personal change, neither do any of us on a global level. It's a nuanced spin on the subject of climate change, framing our attitude not as denial, but as a form of depression. It is, Weinman implies, born of hopelessness. Not knowing what to do, we do nothing.

Humanizing climate science has defeated many a playwright, and Weinman succeeds by tying it tightly into other sociological factors: the twin crises of masculinity and capitalism. These young men are familiar figures, stuck before they've even started, priced out of housing markets, squeezed out of secure jobs and pushed away from parenthood. Little wonder they retreat into childhood.

The Old Red Lion's new artistic director Clive Judd has said he wants to sidestep the drawn-out development processes that have become the norm elsewhere, presenting new plays more or less as they come. Ironically, Dyl could really use refining. There's a lot going on in there, much of it really astute, and it's teeming with tiny meaningful details, but at two and a half hours, it needs distilling. The story's strong, but the plotting's all off, and Weinman struggles to keep inactivity interesting. Too many scenes have nothing at stake; too many drive home the same point. There's an art to staging wasted time without wasting stage time. Dyl misses it.

Judd covers the lags with rich characterisation, and he's a top-notch actors' director – almost a Mike Leigh in waiting. Each performance is stuffed with offbeat observations: little, unthinking incidents that betray insecurities and reveal inner lives. Jamieson is flat-out superb as Ryan, a spritely Scottish chatterbox, as loveable as he is infuriating, who latches on whenever James' meek mother Wendy (Joyce Greenaway) comes to stay, and Arthur summons a wealth of pent-up anger beneath James' inexpressive surface. Everything else aside, it's an eloquent portrayal of depression – one with lessons for society as well as individuals.

Dyl runs at the Old Red Lion until 3 June