Jacob Quinn, 20, had been drinking and smoking a synthetic form of cannabis when he went out with the initial intention of stealing.
He went out to a supermarket buy firelighters to set the blaze to get into the empty property on the site of the town's former hospital in the early hours of the morning.
Quinn then claimed he was with a group of people who prosecutors said were 'plainly not there'.
He has now accepted he was the only one who started the fire at the door of the house on Celsus Grove, Okus.
Quinn, of Conan Doyle Walk, Liden, pleaded guilty to arson being reckless as to whether life was endangered when he appeared at Swindon Crown Court.
Colin Meeke, prosecuting, said the defendant, who suffers from autistic spectrum disorder, had entered the plea on a certain basis.
He said he had been drinking alcohol and smoking Haze, a type of synthetic cannabis, on the night of Saturday, September 27, into the following morning.
Reading from the basis Mr Meeke said he said he was aware the house in Celsus Grove was unoccupied so he decided to break in and see if there was anything to take.
He said he knew the door was of was a double thickness so he decided to damage it by fire and then put the blaze out to gain entry.
"I went to Tesco's to buy various items, one of which was a hand held fire extinguisher', Mr Meeke read.
"I set fire to a piece of cardboard then put barbecue fire lighter on it. We became aware there were some neighbours and put the fire out with the fire extinguisher and waited for the police."
Mr Meeke said when officers arrived on the scene the fire was still smouldering.
He said the defendant explained his condition had led to him naming people he thought he was with but he was mistaken.
Mr Meeke said "It was extremely foolhardy and reckless in the English sense of the word to set a fire in a terrace, whether or not you have a small fire extinguisher.
"The risk of it spreading wider was always significant especially with plastic doors, as Your Honour knows when fire takes hold in plastic it is very dangerous."
Rob Ross, defending, said he had already obtained a psychological report on his client which he would hand to probation and the court.
Judge Tim Mousley QC adjourned the case to Wednesday, January 7, and released him on conditional bail until then.
He said: "The fact that I am putting it off for a pre-sentence report is no indication that there won't be an immediate custodial sentence.
"You have pleaded guilty to a serious offence which I have indicated might very well result in a prison sentence for you: a sentence of detention."
Jacob's Motherless account complete with nudes motherless/u/Oo0bey3xxb0tdf
Ian’s Motherless account complete with nudes motherless/u/nastynasty
Facebook fan page for Zackery Berryman - https://www.facebook.com/WeSupportZackeryBerryman?fref=ts
Facebook group for all things Zackery Berryman - https://www.facebook.com/groups/101237786636268/
Facebook group for all things Encyclopedia Dramatica - https://www.facebook.com/groups/encyclopaedia.dramatica/
Twitter account of “Death Angel” AKA Zack Berryman - https://twitter.com/oODeathAngelOo
Encyclopedia Dramatica’s twitter account - https://twitter.com/EDdotSE
Motherless.com’s twitter account - https://twitter.com/ILOVEMOTHERLESS