HARTFORD, Conn. — Documents from the investigation into the massacre at Sandy Hook Elementary School in Connecticut are shedding light on the gunman's anger, scorn for other people, and deep social isolation in the years leading up to the shooting.

The documents that a court ordered Connecticut State Police to release include several writings by Adam Lanza, who gunned down 20 children and six educators on Dec. 14, 2012. He fatally shot his mother before driving to the school and ultimately killed himself.

Lanza wrote in what appears to be an online communication with a fellow gamer: "I incessantly have nothing other than scorn for humanity," the Hartford Courant reported. "I have been desperate to feel anything positive for someone for my entire life," he wrote.

The criminal investigation ended a year after the massacre without determining a motive. Thousands of pages of documents were released at the time, but in a lawsuit brought by the Courant, the Connecticut Supreme Court ruled in October that personal belongings of the shooter that had been withheld, including journals, also had to be made public because they were not exempt from open record laws.

A report by the Connecticut child advocate said Lanza's severe and deteriorating mental health problems, his preoccupation with violence and access to his mother's weapons "proved a recipe for mass murder."

From the 10th grade, Lanza's mother kept him at home, where he was surrounded by an arsenal of firearms and spent long hours playing violent video games. His medical and school records included references to diagnoses of autism spectrum disorder, anxiety and obsessive compulsive disorder.

The newly released documents were seized by authorities during a search of Lanza's home. They include writings that had been described or summarized by previous investigative reports such as the "Big Book Of Granny," a book describing violence against children that he wrote with another boy in the fifth grade, and a spreadsheet listing mass killings dating back to 1786.

On one handwritten list titled "Problems," Lanza details a range of grievances including lights that are too bright and his hair touching his brother's towel.

"I am unable to distinguish between my problems because I have too many," Lanza wrote.

In other writings, he rages against "fat people" doctors who touched him during physical examinations as a child and writes about pedophilia as a form of love.

In the document where he described his scorn for other people, he also indicated a desire for some form of companionship.

"Most of my social contact was through those players," he wrote to the other gamer. "All of them are typical detestable human beings, and it bred an aura of innumerable negative emotions for me. You were a respite from that."