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.

“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.