Two disaffected teenagers who had a fascination with violence plotted to bomb their school in Manchester and shoot as many pupils as they could to mark the 10th anniversary of the Columbine high school massacre, a court was told today.

Matthew Swift, 18, and Ross McKnight, 16, planned to blow up a busy shopping centre in the city and then attack Audenshaw high school, shooting students and staff before killing themselves, Manchester crown court heard.

They were arrested by police in March, a month before they allegedly planned to carry out the attack, which they had nicknamed Project Rainbow.

Peter Wright QC, prosecuting, said they had agreed to copy the Columbine school killings of 1999, when Eric Harris and Dylan Klebold killed 12 students and a teacher and wounded 21 others before shooting themselves.

When police searched Swift's bedroom in Denton, Manchester, they found a copy of the Anarchist Cookbook, which tells how to manufacture explosive devices, and table tennis balls locked in a tin.

An imitation firearm, a 9mm machine gun that fires ball-bearings, was found.

The table tennis balls may seem innocuous, Wright said, but they were made of nitrocellulose which could be rendered into an explosive. Copper wire, which could be used to make explosives, was also found.

Swift had floorplans of the school hidden in his bedroom in a safe, and details of how to use acetone peroxide as a detonator. He also had plans of the Crown Point North shopping centre under his bed. The court was told he had been served with an exclusion notice in September 2007 preventing him entering the centre.

In a diary entry, Swift wrote: "Audenshaw high will be no more. Unlike Columbine, my propane bomb will actually fucking explode and I will walk from classroom to classroom killing the fuck out of everybody, then maybe people will learn."

Swift had downloaded a photograph of Harris and Klebold taken from CCTV footage of Columbine. Underneath, he wrote: "This is my favourite picture in the whole world. To most it is just a CCTV shot of the shooters. I perceive so much more; I see depression, sadness, rage, hate, deceit. Most of all I see two kids enraged by the corruption of this world. The image is beautiful." He also wrote: "Eric and Dylan will rise again."

In an MSN message to McKnight read to court, Swift claimed Harris's spirit was reincarnated in him. He wrote of feeling supreme, and superior. "I will expose the truth, I will die for what I believe, I will fight the war. Project Rainbow will not accept defeat. I will make history."

Swift also praised Pekka-Eric Auvinen, 18, who killed eight people and wounded 12 others in Finland in November 2007. His diary entry from the day read: "It's funny how much his reason echoes ours. He did it because of society, because of humanity, this is why we have to proceed with and complete Project Rainbow."

Swift wrote a list headed "stuff to do before the apocalypse", detailing the white-out contact lenses he would wear and the van he would use to transport the explosives. Camouflage trousers, military boots, leather gloves, a bandana and sunglasses were found by detectives. He described his mind as "still an empty cold bitter dark empty void".

In November 2007, they briefly shelved their plans after watching Into the Wild at the cinema. But the prosecution claim it was only a temporary respite. By early December, Swift was talking of his deep desire to take human life which had "become an obsession", the court heard. He asked a friend whether she could obtain hydrogen peroxide for him. Although it has use for dying hair and cleaning, it is also a principal ingredient in an improvised explosive device.

McKnight, whose nickname was 72, wrote: "72 + Swift + God and shitloads of dead people." He had written a piece of schoolwork, purporting to be creative writing, about an Audenshaw massacre which the prosecution said had "unnerving parallels" with what they had planned.

In a diary entry, McKnight wrote: "Project Rainbow is started now. Ain't you people lucky." A message he sent to a girl at the school said: "If I ever text you not to come into school don't question it, just don't go in."

"Both were loners and like-minded souls who found each other," Wright said of the defendants.

In March, a friend of McKnight received a call in the early hours during which he sounded intoxicated, the court heard. McKnight told her he couldn't wait until 20 April, and that he and Swift had planned something at their school. He spoke of the massacre at a school in Germany three days earlier, on 11 March. Wright said McKnight told the girl that he would make a bomb "and plant it in a shopping centre on a busy day when there will be thousands of people there".

"He and Swift would go to school and park a car near to the entrance and put a bomb in it and go and shoot as many people as possible before killing themselves."

The girl asked why he would commit such serious acts. "He informed her that he just wanted to do it and said: 'I hate them all'," Wright said, adding that she was concerned about his mental state, and called the police.

Both defendants deny a charge of conspiracy to commit murder and one count of conspiracy to cause explosions between 11 November 2007 and 15 March this year. The trial continues.