When an author’s work is adapted for the big screen, sometimes it can be a wonderful experience, and sometimes it can be downright devastating.

For Rick Yancey, the author of the YA novel “The 5th Wave,” which is coming to theaters on Friday starring Chloe Grace Moretz, the experience turned out to be a positive one.

“I had heard horror stories from other writers about taking their work and totally changing it, so I had some trepidation going in,” Yancey says. “I understood, because I’m a realist, that as an author, you can’t expect your 500-page novel to be totally translated into film. They’re just two totally different art forms.”

The 53-year-old Florida writer believes that fans of the book series will be “pleasantly surprised” by the film, which he says maintains the spirit of the novels.

“The core scenes and the things that ... [fans] really loved or hooked into from the books, really do make it to the finished film,” he says.

The story follows Cassie (Moretz), a teen girl living in a world that has been invaded by aliens in a series of waves. The first wave took out all electricity, and later waves started to decimate society, leaving only a few survivors. Cassie has to try to keep her younger brother safe, but it’s impossible to know who to trust when aliens could be anywhere around you.

The rest of the cast includes Nick Robinson (“Jurassic World”), Liev Schreiber and Ron Livingston, who plays Cassie’s dad, Oliver.

“As the casting went along, I was very pleased with the choices that the producers were making, particularly with Ron Livingston as Cassie’s dad,” Yancey says. “As I was watching him work, I turned to my wife, ‘Gosh, I should have made his part bigger in the book, this guy’s great.’ It was that kind of feeling.”

Fans who like the film can dig into the books, with the first two available now. The third novel, “The Last Star,” is due out in May, and Yancey, as you might imagine, is “very excited for it.”

“I think that it takes the best elements from the first two books,” he says. “The first book is all action and narrow escapes and making really tough choices. ... The second book is more reflective. The intensity is on a more emotional, existential level.

“The third book, ‘The Last Star,’ takes both those things and slams them together, kind of the way nuclear fission works,” Yancey continues. “I will say that the last 100 pages of ‘The Last Star’ are some of the most intense writing experiences I’ve ever had, because you work so hard with a big story like this that spans three books. You work so hard to get all those elements into place where you can really give the readers that experience of, ‘Wow, this is where it was all leading to. This is the payoff. This is what I’ve been in the long haul for.’ I really hope readers feel satisfied for the way the story resolves.”