WHEN the forthcoming Scottish Independence Referendum was first mooted several years ago, John McCann wondered why no-one was talking about it.

If such a potentially epoch-making decision had been announced in the playwright's native Northern Ireland, he figured, there would have been what he describes as an explosion of a response. In Scotland, and in Dundee where he now lives, McCann was "gobsmacked at the silence."

For anyone caught in the crossfire of social media slanging matches between assorted flag-wavers from both the Yes and No camps that erupt with increasing force as the day of the referendum gets nearer, McCann's observation of an apparent silence might sound odd. Compared with Northern Ireland, however, where the volatility of political debate makes Scotland look positively kittenish, you can see his point.

"Even before anything was announced," says McCann, "in Northern Ireland it would've been on all the front pages, and people would be being really vocal about it. So it's been quite a learning experience for me in terms of discovering the differences between politics in Northern Ireland and politics here. Only now do I realise that I was looking at things through my Northern Ireland goggles."

Out of all this, McCann wrote Spoiling, one of the Traverse Theatre's flagship Edinburgh Festival Fringe productions, which imagines a future Foreign Minister of a newly independent Scotland who is about to give a speech about the country's relationship with the former UK. The trouble is, she doesn't agree with the script she's been given, and in an act of personal independence that may have bigger political ramifications, prepares to go seriously off-message. "I remember when Barack Obama was elected," says McCann, "and his entire campaign was swept along by hope. When he was elected, Jesse Jackson was in tears, and we thought the world had changed, but it hadn't.

"So I became interested in that gap between optimism and expectation, and the political reality, which is that nothing will really happen for quite a while, and there are maybe things which have been promised, which are suddenly very difficult to achieve. That no-man's-land really interested me.

"I also realise now that, in a way, I was writing the play as an act of decompression from leaving Northern Ireland and coming to Scotland."

McCann moved from Belfast to Dundee six years ago, and since then has worked in mental health. Spoiling was developed during McCann's time as one of the Traverse 50, Scotland's new writing theatre's year-long initiative to develop a fresh set of voices for the stage.

This year's Traverse programme shares the first fruits of the project, with six plays by Traverse 50 graduates forming the theatre's early morning programme of Breakfast Plays. It was Spoiling, however, that seemed ready for a full production directed by the theatre's artistic director, Orla O'Loughlin.

"It was an idea I'd had 18 months before the Traverse 50," McCann says, "but that whole year being part of it helped me to come to terms with what it was I was wanting to explore. It was great to be taken under the Traverse's wing, and let's face it, the Traverse has some mighty wings."

Despite a year's mentoring, McCann is far from a theatre rookie. Spoiling is his second professionally produced play, following on from The Cleanroom, which was staged earlier this year by the Belfast-based Tinderbox Theatre Company.

McCann has a long association with Tinderbox after working with them for 10 years, developing scripts with community groups across the city.

Prior to that, McCann studied drama at Birmingham University and worked in community drama. He first worked with Tinderbox on Convictions, a site-specific show presented in Crumlin Road Courthouse in Belfast during a period of unrest in the city. Other projects with Tinderbox included Vote Vote Vote, which was performed in the council chamber of Belfast City Hall, "one of the most divisive spaces in Northern Ireland," as McCann puts it.

He says: "I used to hate projects where you were parachuted into places, but Tinderbox would do things that allowed me to become embedded in communities for a couple of years."

Prior to the Traverse 50, McCann had already taken part in a writing workshop at the Traverse led by playwright Zinnie Harris.

A short piece that developed out of that received a reading by the Stellar Quines company in Edinburgh, as well as one in Belfast. McCann also sent various shorts to be performed as part of Words, Words, Words, the Traverse's regular night of script-in-hand scratch performances of new work.

McCann is the latest in an growing line of Irish artists working extensively in Scottish theatre. Tinderbox itself has been instrumental in this with True North, a triple bill of new plays by writers from Northern Ireland featuring work by McCann, fellow Traverse 50 graduate and stalwart of Edinburgh's Village Pub Theatre, Colin Bell, and David Ireland, who has worked frequently in Scotland as both an actor and writer.

In Ireland, meanwhile, McCann's colleagues at Tinderbox included former associate director of Dundee Rep, Michael Duke, who is now artistic director of Tinderbox. McCann has also worked on projects with Anna Newell, another former associate director of Dundee Rep who is now resident in Belfast. Newell will be opening a play for young people penned by McCann in Belfast shortly after Spoiling's Edinburgh run.

McCann won't be drawn on what he thinks might happen on September 18, nor what he would like the result to be. Either way, it will be what happens afterwards that counts.

"The play isn't a Yes/No play," he says, "and it is and isn't a referendum play. What lies at the heart of it is something else, and that seems to be about the characters wanting to do the right thing under pressure.

"For me, Spoiling is more about leaving Northern Ireland and acclimatising here. It's also back to the Obama 'hope' stuff compared to political reality, and resisting the temptation to be carried along on an optimistic wave. That will just come crashing in on you, and you'll find yourself stranded on a wee island, and it's not the island you thought you were going to be on. That's not about being Yes or No. That's a universal thing."

Spoiling is at Traverse Theatre to August 24. www.traverse.co.uk