LONDON (Reuters) - British author J.G. Ballard, whose novel “Empire of the Sun” vividly portrayed his childhood imprisonment in wartime Shanghai and was adapted into a Hollywood film, died on Sunday, his agent said. He was 78.

His agent Margaret Hanbury described Ballard, who had been suffering from prostate cancer, as a “giant on the world literary scene.” He died at the riverside home west of London where he had lived since the 1960s.

“His acute and visionary observation of contemporary life was distilled into a number of brilliant, powerful novels which have been published all over the world,” Hanbury said.

“Empire of the Sun” was based on Ballard’s privileged childhood with his expatriate parents in China and their subsequent detention in a prison camp after the Japanese invasion during World War Two.

He recalled how his parents’ rich friends lost their chauffeur-driven cars and ended up “scrambling for a piece of sweet potato.”

Director Steven Spielberg adapted the book for the big screen and it was nominated for six Oscars. Ballard would later write in his memoirs that his early, often violent, experiences shaped all his later work.

“In many ways my entire fiction is the dissection of a deep pathology that I had witnessed in Shanghai and later in the postwar world,” Ballard wrote. “I remember a lot of the casual brutality and beatings-up that went on, but at the same time we children were playing a hundred and one games.”

Born in Shanghai in 1930, Ballard enjoyed a comfortable life with his parents -- his father ran a successful textiles company -- before their world was turned upside down by the war.

After more than two years in the detention camp, the family returned to Britain where Ballard resumed his education.

He went on to study medicine at Cambridge University, which he described as an “academic theme park where I was a reluctant extra,” before deciding to pursue a career as a writer.

In a career spanning more than 50 years, Ballard gained cult status around the world for a series of dystopian science fiction novels such as “The Drowned World.”

One of his most controversial works was “Crash,” a novel about people who are sexually aroused by car accidents that was later turned into a film directed by David Cronenberg.

His wife Mary died from pneumonia in 1964 and Ballard raised their three children alone.

The author would fend off critics’ suggestions that his writing was often excessively bleak.

“There is nothing inhuman about my fiction,” he told one interviewer. “It is just, I think, that I am chasing a different hare around the track.”