The idea for the Homeless World Cup was dreamed up in a South African bar during the 2001 conference of the International Network of Street Papers.

The organisation's then president, Mel Young, and his Austrian colleague Harald Schmidt had been talking over a few beers, and realised they were both inspired and frustrated by what they'd heard at the conference. Despite listening to plenty of thoughtful and inspirational discussion by street newspaper editors and leading authorities on homelessness, they realised that the voices they hadn't heard were those of homeless people themselves.

"There were some incredible theories on how to lift people from poverty, remove the stigma of homelessness and help people back into mainstream society," explains Young, co-founder of the Big Issue In Scotland. "But we were all editors, social workers and economic development theorists. 'Where are the homeless people?' Harald and I wondered. 'What are their ideas? How do we give a voice to a section of society that feel so invisible? What's their common language?'"

As passionate football fans, Young and Schmidt found themselves talking in their own common language - and the idea was hatched.

The first Homeless World Cup took place in Schmidt's home town of Graz, Austria, in 2003, and the impact of the event on the players was immediately apparent. It continues to this day.

Before competing in the Homeless World Cup, players complete a year-long training programme in their individual countries. Although 42 nations have made it to the final tournament, there are actually 74 nations involved in running street soccer programmes, and the lives of more than 100,000 people are positively affected by them each year.

David Duke, founder of Street Soccer Scotland

David Duke lost his father while still in his early 20s. Unable to cope with the grief, he split with his girlfriend, lost his job and drank as a form of escape. He ended up homeless and living in hostels.

It was while living in Quarriers that he spotted an advert for try-outs for the Homeless World Cup. Duke soon found himself attending two training sessions per week: a routine that made him consciously pay attention his diet and his drinking habits. In 2004, he was selected to play in the tournament in Gothenburg, Sweden.

By 2007 he was managing the Scotland Team and they won in 2007 in Copenhagen in Denmark.

Duke would go on to set up Street Soccer Scotland, which today employs 20 people who run programmes across the country.

"If you do a job you love, you'll never have to go to your work another day in your life," reflects Duke.

David McKessie, 32

McKessie, from Renfrew, started drinking when he was 11. From the age of around 16, his addictions escalated.

"Having lost my job, I tried a lot of times to stop drinking but I could never stick out," he explains. "I finally got to 29 and my spirit was broken. I thought I was going to die when I was 29. I never thought I would play football again. I can't believe that I am here in Chile. It's amazing. But I'm here. I am fit. I feel reborn."

Toby McKilot, 38,

Scotland Team Captain

Originally from Fraserburgh, McKilot was homeless for a year after fighting a drug addiction on and off over a 20-year period. After enduring years he describes as "absolute hell", McKilot finally came out of a treatment programme in April and, thanks to his involvement Street Soccer Scotland, has remained drug free.

While he was training for the World Cup in Chile, McKilot managed to regain the trust of his ex-partner Lindsay and his parents, who, he says, have been "incredible".

Two weeks ago he achieved a major milestone, when his seven-year-old daughter, Molly, came to stay with him in Glasgow. McKilot's focus now is on building his relationship with her.

"Everything I do now - staying clean and living life - I do it for Molly," he says.

Ryan Murray, 23

Ryan Murray, who is originally from Glasgow, was, by his own admission, a show-off, a daredevil, "a total ned" who was out of control and made poor decisions. He's been in and out of jail, having received his first criminal charge shortly before his 16th birthday. Visibly scarred by stab wounds and an acid attack, he describes his youth as "an absolute, chaotic mess".

After serving time in his last sentence in May 2012, he looked around at fellow prisoners in their 40s, and decided he did not want to continue going in and out of prison into his adult life. In training for the Homeless World Cup, he says his partner Louise and mother-in-law Diane have inspired him. Meanwhile, his close friend Scott Smith - who didn't get selected for the team - has been a huge support. All three have helped him change his life around.

"I am eternally grateful for my daughter Brooke, my wee princess," says Murray, "and for my partner. All I want to do now is make my family proud and give my daughter the best life possible."

Dean Jason Mackenzie, 20

When his mother's house was repossessed, Mackenzie, from Musselburgh, and his sister went into separate hostels. After that he couch-surfed in friends' homes before "falling into a dark place". He struggled to hold onto his job and started drinking. His mum and sister are currently being supported by relatives in private accommodation.

"We are a family of hard-workers," says Mackenzie. "We didn't deserve this. I felt really angry about what happened to my family. Then a good pal asked me to come along to the sessions with Street Soccer Scotland. I have got fit, reconnected and started living life again.

"I have been amazed by Chile. The team are buzzing and we have done really well."

Sean Edward Stewart, 17

Stewart, from Loch Lomond, had a difficult time as a young teenager and when his family broke apart he ended up in a care unit in Dalmuir. By his own admission, he hung about with the wrong crowd, was "wild" and didn't know how to behave. After he got in touch with Street Soccer Scotland, he began training at Power League in Townhead. Staff there, he says, have looked after him and been very strict about his behaviour.

Today he has his own house, and stays with his family three or four days a week. He's delighted to be reconnected with them and loves being around his one-year-old brother, Matthew, and four-year-old sister Shelley.

Extremely focused on his football, Stewart loves the team, and he says his life is "brilliant". "I feel like a have a chance now."

Darren Docherty, 23

"I was an alcoholic drinking for two years solid and constantly in and out of hospital," says Docherty, who comes from Glasgow. "I was a mess and I ended up homeless. It was horrific."

When his partner became pregnant it was, he says, his "wake-up call".

"I have two kids now, Bethany Lily May, aged three, and Harry, who's nine months old. Having kids made me stop drinking.

"Street Soccer Scotland has given me the structure and support I needed. It's incredible being here in Chile. I miss my kids, but being here with the team is absolutely amazing. I now look forward to a future with my girlfriend and my kids. I never thought I would ever say that."

Ally Dawson, Scotland team manager

Born and brought up in Johnston, Ally Dawson is a former Rangers player who has had spells with a number of clubs in both a playing and coaching capacity, including Blackburn, Airdrie, Hamilton Accademical, Limerick FC and Maltese league club Luxol St Andrews.

Dawson took part in the first ever Homeless World Cup in 2003 and then handed the mantle to David Duke to run Street Soccer Scotland before returning in 2012.

"To this day, David and I can see the potential in all that come through the programmes - even when they can't see it themselves. That's our job: to make them see it, regardless of their background, poverty, homelessness or other issues. Everyone deserves a chance."

Thomas Hobbs and Neil watton, Coaches

Thomas Hobbs (right), from Glasgow, is a former Homeless World Cup Scotland player, who played in Melbourne in 2008. Once tormented by addictions, he worked hard to turn his life around. After returning form Melbourne, he followed a course with the Scottish Drugs Forum training placement, got some qualifications and now works with the Scottish Association for Mental Health, helping people with addictions.

Neil Watton, also from Glasgow, was David Duke's first signing as a manager. He loves football and works with homeless people as a day centre manager in the Lodging House Mission charity.

James McCallum, 24

After being sent to court following a theft charge, McCallum, from Edinburgh, continued to be in and out of trouble for a few years. "I ended up homeless last year after leaving my dad and my twin brother's house. We just couldn't get on and I went to stay with my girlfriend and her mum. That wasn't a permanent solution and I ended up in the hostel system. Street Soccer has made me think about the future. I want to study when I go home.

"The heat playing in Chile is brutal, but being here with the team has been incredible. I am looking forward to going home to my girlfriend and to my house, which is near my mum. I am heading back to go to college: I believe I deserve a future."