Image copyright CBS Image caption The suspect had won a previous competition, US media report

A gunman who attacked a Florida video game tournament was so obsessed with his pastime he would refuse to bathe or go to school, say court records.

David Katz, 24, had a history of mental illness, according to his parents' divorce filing in his home state.

His mother once confiscated his console and locked it in her room, and he punched a hole in the door, she said.

Katz killed two people in the city of Jacksonville on Sunday before fatally shooting himself, police say.

According to court papers in Maryland, he had a longstanding feud with his mother, and had twice been hospitalised for mental illness.

Image copyright GLHF Game Bar Image caption The incident took place in a games bar attached to a restaurant

"His hair would very often go unwashed for days," his mother told a court during her 2007 divorce proceedings.

"When I took his gaming equipment controllers away so he couldn't play at three or four in the morning, I'd get up and find that he was just walking around the house in circles."

The documents obtained by the Associated Press show that his parents - Nasa engineer Richard Katz and government toxicologist Elizabeth Katz - disagreed over their youngest son's care, including whether he should take the antipsychotic medication he had been prescribed.

The boy sometimes "curled up into a ball", refused to attend school and sobbed, Mrs Katz said.

The Maryland judge awarded custody to Katz's mother, and the father was allowed visitation rights.

Eli Clayton, 21, and Taylor Robertson, 27, were shot dead in Sunday's attack in Jacksonville at an eSports tournament for players of Madden NFL, an American football game.

Eleven others were injured.

Fellow players spoke of Katz's erratic playing style and unwillingness to make friends.

"We've always known he was a little off and stuff just because he wasn't social at all," Shay Kivlen, 21, of Seattle, told CBS News on Monday.

Jacksonville Sheriff Mike Williams told the Baltimore Sun on Monday that no motive had yet been determined.

He said Katz had legally purchased the two handguns used in the shooting from a licensed dealer in the Baltimore area.

How to get help

From Canada or US: If you're in an emergency, please call 911

You can contact the US National Suicide Prevention Lifeline on 1-800-273-8255 or the Crisis Test Line by texting HOME to 741741

Young people in need of help in Canada can call Kids Help Phone on 1-800-668-6868

If you are in the UK, you can call the Samaritans on 116123

For support and more information on emotional distress, click here.