WARNING: The following contains spoilers for Justice League Dark: Apokolips War, available on digital HD now.

Across over a dozen feature-length animated films dating back to 2014's Justice League: War, the DC Animated Movie Universe has brought together DC Comics' iconic cast of superheroes and villains, taking direct inspiration from the comic book source material. The shared animated cinematic universe's latest film, Justice League Dark: Apokolips War, reportedly brings the DCAMU to a close with apocalyptic intensity as the heroes mount a desperate last stand against Darkseid to save their world.

In an interview with CBR, screenwriter Ernie Altbacker details how he wrote his fourth feature for the DCU, why he decided to add certain characters to the film's expansive story and what moments from the DCAMU are his personal favorites.

RELATED: Justice League Dark: Apokolips War's Jerry O'Connell Looks Back on Superman

You've been working in the DC Animated Movie Universe for some time now. What was behind the decision to bring things to an epic finish with Apokolips War?

Ernie Altbacker: I think all credit has to go to [producer] James Tucker because he has all the whole ten-thousand foot view of it; he's most responsible for the continuity although it takes an army of talented folks to make it a reality, of course. When I got pulled into all of this and they said, "This is going to be an endpoint and then we're starting something different down the line," we had to tie up all these loose ends and some of them were from movies that I worked directly on and others were from movies that I just watched as a fan.

So, James and [producer] James Krieg oversee the writing on all these movies, even the ones out of continuity -- like the Bruce Timm ones -- they have a lot of knowledge to download for you the first day in the room. And then you go away and take all these bits, in this case; you want to create a story that's going to weave all of the things, all of the fan service that you need, and then you get to back in there and you pitch stuff. Like, the Etrigan subplot wasn't something that was in there and I went "Well, you know, if we want to be Justice League Dark, let's get another Dark character in there and it's Etrigan like we've never seen him before! Maybe he's bummed out that he's lost his friend [from the original Justice League Dark]." And they were like, "That's a great idea, let's do that!" So, it's really fun and collaborative and I thoroughly enjoy the process.

Constantine is really kind of the P.O.V. character for this, him and Raven. Was that there from the beginning?

No, when I came on, they said, "We want it focused more on Constantine because it's Justice League Dark's story." And I think they wanted to do it a little bit differently because we've seen the Justice League go after an army or a horde or a big bad. And, in this case, things changed and they don't have that at their disposal so they've got to gather up all the dregs and whoever's left and try to save the Earth. So, it's a just a huge, all-encompassing, apocalyptic story, and I just love doing those.

You've been working with DC animated properties since at least Green Lantern: The Animated Series. What do you find so appealing about the DC Universe as a storyteller?

Well, the great thing about it is the branches of the DC tree are just so different. Of course you've got the crown jewels that are the Justice League members. And then you've got the Titans who are finding their way into being heroes. And then you've got Justice League Dark which is all the demonic stuff, the more evil stuff. And then you got the Suicide Squad; they're straight-up villains forced to do good -- except for this one, they kind of join up. So this is a team-up between between heroes and villains for a common goal, which was very interesting to do.

RELATED: Matt Ryan Explains Why He Loves Playing Constantine

You mentioned the Suicide Squad, so I have to ask...whose idea was it to have Constantine hook up with King Shark?

You know what, I have to give credit to Mairghread Scott. Mairghread thought up that bit of fun that not only is Constantine a bi character, he's kind of pansexual [laughs]. It's something that she unearthed but it's true, Constantine has made it with a bunch of demons also; it doesn't have to be human with Constantine!

With the high stakes and level of finality, how do you balance the more violent bits without it becoming unsavory to audiences?

The thing was with this movie and it's apocalyptic, end-of-the-world scenario, we knew people were going to die. And then when you cast it a certain way with Constantine as the lynchpin, well then, everything gets more bloody [laughs]. With Constantine, it seems to follow him around, right?

Justice League Dark: Apokolips War

Like I was saying earlier, you've been working in this shared cinematic universe for some time. What are some of your favorites moments or characters you've gotten to work on?

Well, I think I kind of got lucky that my first one was Justice League Dark -- the first one as a serious superhero film; I had done comedies before long-form. The main character of that first Justice League Dark is Constantine: John Constantine is my favorite DC character! I know I might catch some heat, like, why isn't Batman, Superman or Wonder Woman, but I really like Constantine. I like the bastard with a heart of gold and I see some of myself in him [laughs]. It probably doesn't say great things about me but that's one of my favorite characters. And who doesn't like to write Batman, he's so much fun to write. But, really, to make it great, every one of the characters should shine and you've got to find your way in with the characters to make them sing.

I don't want one of these talented actors that they bring in, even a five-line role, and feel like they wasted their time, like anybody could've said these lines. I want them to have something to work with, something chewy. So, every character from me gets a writing pass to make it cool and maybe a little bit different, let's have them do something that's going to be memorable.

RELATED: Justice League Dark: Apokolips War's Jason O'Mara Reflects on His Batman

What was the most heartbreaking moment for you to come up with and write?

I was sad where Etrigan ended up; boy, I had a tough time. [Producer] Alan Burnett really helped me write Etrigan's rhyming cadence in Justice League Dark, so when I pitched the character, I was like "Oh yeah, he's so sad, he doesn't rhyme," which is a problem for me as a writer. And then the Damian-Raven thing is like "Oh, they're finally happy! Oh wait...and now they're done."

The only one I wish we had more time for was with Nightwing and Starfire but the cast is such a huge cast and that decision was made "Nope! Too many! Too many relationships!" It's got a lot of them: There's Damian and his father; he's got two, there's Damian and Raven. We've got Constantine and Zatanna, which I kind of bookend it with -- they've only got two scenes but they're important scenes, so you try to put everything into that for those characters. And, of course, Superman and Lois; I loved writing that video goodbye, I did that.

Superman getting his powers back at the worst possible cost.

I love how that was animated. What a great moment, right? The hairs raised up on my forearms when I watched it and the music by Frederik Wiedmann is crazy. I've got a give a shout-out to Ray Chase, also, as Etrigan. I've got to give to the minor characters too, like Liam McIntyre as Captain Boomerang. He's got, like, twenty lines and he nails every one; he can act!

John Constantine showed his smarts in "Apokolips War."

Captain Boomerang has my favorite line in the film, in terms of humor, when he reacts to King Shark at the end.

That's mine too! And when I saw how the animators had done it and the line read by Liam [McIntyre] and John DiMaggio as King Shark, the back-and-forth and timing and everything is perfect and I burst out laughing -- and I wrote it! I knew it was coming and it still made me do a big, big laugh when I saw it for the first time.

To close us out, Ernie, what do you hope audiences walk away with, not just from this film but from the whole DC Animated Movie Universe?

I think that the way we ended it... it's really like a tough balancing act: It ends something on a bittersweet yet hopeful note, and I'll just say, people who are saying, "Oh man, we're not going to get anymore of these!" ...you're not losing something, you're gaining something new...

Justice League Dark: Apokolips War stars Matt Ryan as John Constantine, Jerry O'Connell as Superman, Taissa Farmiga as Raven, Stuart Allan as Robin, Tony Todd as Darkseid, Jason O'Mara as Batman, Rosario Dawson as Wonder Woman, Shemar Moore as Cyborg, Christopher Gorham as the Flash, Rebecca Romijn as Lois Lane and Rainn Wilson as Lex Luthor. The film is available now digitally and on Blu-ray May 19.

KEEP READING: Justice League Dark: Apokolips War's Christopher Gorham Talks Playing Flash