When Paul Dini was mugged and beaten to near-death in Los Angeles in 1993, there was no caped crusader to come to his rescue at the time.

The renowned US writer and producer behind numerous superhero cartoons was celebrating the success of a recent Batman project he was working on and decided to walk home from a date near Beverly Hills.

He was riding a high. He felt like things were going pretty nicely. Until two men approached him.

Sorry, this video has expired "I see Batman as like a tough drill sergeant. He's like, 'Get up, go about your work'."

"[They] grabbed me and beat me so badly I nearly died," he told ABC News Breakfast.

"They took a great amount of pleasure in doing it and they said they were going to blow my head off and to count and wait for the shot.

"And I thought, 'This is it. There is no way out of this.' And they didn't."

Instead the attackers left him lying on the street and ran away.

"It was a populated area, [but] nobody came to the door. Nothing happened."

The experience left Paul a broken man — both physically and emotionally.

He had to have surgery on his face, but for a long time he couldn't bring himself to find passion in his work.

Paul Dini has written a graphic novel about his attack, imagining how Batman helped him through it. ( Supplied: DC Comics )

"After that time I just felt like I am done, I don't want to write Batman anymore, it is a meaningless character to me," he said.

"I can't write power fantasies about a hero who comes to everybody's rescue where there was no hero in my life."

Over time the scars on his face healed and perspective started to return.

In an effort to make the psychological transition back to normality, Paul found himself having imaginary conversations with superhero characters about what he had gone through.

In the end, Batman became the very figure to save him from himself.

"Batman, I see him as like a tough drill sergeant," he said.

"He's like, 'Get up, go about your work.' And the Joker is more like, 'Buddy, take it easy, relax, order in. Have another drink.' He is all indulgence.

"I realised after a time I couldn't do that — I had come too far and I discovered people really liked the cartoons, and I thought it means a lot to people that I do what I do.

"Friends have said if that hadn't happened to you, you might have remained that callow, young, self-absorbed man for a long time."

Now, more than two decades later, Paul has created his own graphic novel — Dark Night — detailing his experience and reimagining how it might have gone had Batman been there to swoop in.

A page from Paul Dini's Dark Night graphic novel. ( Supplied: DC Comics )

A page from Paul Dini's Dark Night graphic novel. ( Supplied: DC Comics )

He is in Australia to speak at a special superhero symposium at the Australian Centre for the Moving Image in Melbourne and said the years since his mugging had given him time to get the story right.

It took me 20 years before I could sit down and write it, because at the time I was too angry," he said.

"I was angry at myself, I was angry at the attackers."

With some help from his wife Misty, Paul drafted the writing until it felt right and is confident it's the story he wants to tell.

"It's [now] more about how I had grown from that time," he said.