Roderick Thomson spent 24 hours a day in his home, accessing online interactive pornography games and searching for what he himself termed “dodgy” websites.

He was found with indecent images of children aged from newborn to 15-year-olds.

Thomson, 25, of Sandeman Street, admitted taking or permitting to be taken or making indecent photographs of children at his home between September 9 2015 and May 22 last year.

The court heard Thomson was visited by police using a search warrant at the house where he lives with his parents.

Officers recovered his laptop and a mobile, which together revealed more than 2,000 images and videos of children.

About 350 of the images found were of the most serious classification, category A, fiscal depute Kate Irwin told the court.

She added there were about 20 minutes of video footage in addition to the still images found.

Solicitor Lee Qumsieh told the court Thomson, who has no previous convictions, “was socially isolated and spent long periods in his house, sometimes 24 hours a day, playing online games and accessing adult pornography”.

Mr Qumsieh added: “He found what he calls dodgy sites and accessed them.”

He said Thomson had taken steps to turn his life around, including getting a bar job with a supportive employer who was aware of the conviction. He had also made contact with the Stop It Now programme.

“There will be no repetition of this sort of behaviour,” he added.

Sheriff Alastair Carmichael deferred sentence until August 27 for reports and a Tay Project assessment.

He bailed Thomson and placed him on the sex offenders register in the meantime.