NOW SHOWING

“Penguins of Madagascar”

With the voices of Tom McGrath, John Malkovich, Chris Miller, Benedict Cumberbatch, Peter Stormare and Werner Herzog. Directed by Eric Darnell and Simon J. Smith.

Rated PG for mild action and some rude humor. Check listings for theaters. 1 hour, 32 minutes.

It’s never just a kids’ movie.

DreamWorks Studios’ “Penguins of Madagascar,” now in theaters, is carrying forward the “Madagascar” franchise, whose three movies grossed more than $2 billion.

It has to be entertaining to kids and tolerable for adults. It will be compared against recent legacy films in the genre that became cultural phenomena in their own right. “Frozen” was the highest-grossing movie internationally in 2013 and bestowed with almost universal critical praise.

“Penguins” is coming out in a crowded marketplace. Pixar, Disney and DreamWorks no longer have the run of the land. Universal, Fox and Warner Bros. all have animation departments now. Seventy-five animated movies were released from 2008 through 2013, according to the Los Angeles Times. Fourteen will be released in 2014.

As “Penguins of Madagascar” directors Eric Darnell and Simon Smith explain in a boardroom at DreamWorks’ Redwood City studio, the path to success in animation is long.

A “Penguins” movie was first discussed in the early 2000s. When “Penguins of Madagascar” finally got the green light in 2010, Smith was the sole director. Darnell had written a script for the movie but was still working on “Madagascar 3.” As the two reflect, none of that original idea made it onscreen.

The finished movie was built up from a bare-bones concept to throw the penguins — Skipper, Kowalski, Rico and Private — into a James Bond-esque spy plot. In the first two years of development, they went through 12 story lines, working with storyboard artists and writers to slowly flesh out the film.

“Working on these movies, you have the luxury to do it over and over and over until it is right,” Darnell says.

As Smith points out, it’s a slow build. “Each time you go back, you’re not throwing it all away. You’re just scraping away what’s not working,” he says.

“Penguins” represents four years of improvisation, reworking and painstaking attention to detail, but all involved say that there’s a huge safety in this style of filmmaking.

“You get the opportunity to perfect something,” says the film’s producer, Lara Breay, who has also produced live-action hits such as “Tropic Thunder.” “With live action, you go off for 60 days, and you shoot what you shoot. It’s so much more risky.”

Part of the secret sauce for getting the animated movies right, as Darnell and Smith outline, is not getting inside the joke of the film. Even if the movie is about four penguins joining a spy organization to stop an octopus from taking over the world, character development needs to be taken as seriously as it would for a potential best picture Oscar winner.

“Part of getting the script right was trying to find something that these penguins care about,” Smith says.

“To then get the right mix of heart and depth, we wanted to create something that came along that tears them apart. That causes them to see each other in new light, but brings them back together,” Darnell adds.

The final part of the puzzle is to avoid focusing on the balancing act of trying to please everyone and just make the best movie possible.

“I look at it and think about what seems best to me, and if I’m genuine with that, the rest takes care of itself,” Darnell says.

Smith did have one audience member in mind: his daughter. She was 1 when he started making “Penguins” and will be 5 when it premieres. As he prepares to send the result of four years of work into the world, he does have one wish:

“I really hope she thinks it’s funny.”