Consider me shocked that Cloudy with a Chance of Meatballs is not only a good kids film, but a great comedy in general. The first film from former How I Met Your Mother and Clone High writer/producers Phil Lord and Chris Miller, Cloudy manages to take the premise from the classic children’s book and transform it into a madcap comedy that proudly displays a unique sense of humor.

It works as a kids film because it remains lighthearted throughout, while also conveying some worthwhile messages about sticking with your dreams and passions—but it also works as a great comedy for adults with subtly mature humor, and a perfectly chosen cast. And somehow, along with everything else the film has going for it, Cloudy also manages to be a brilliant parody of the disaster film genre.

Lord and Miller use the sparse plot of the original Cloudy book as a guide for the film’s second and third acts, but the initial setup and characters are entirely their own creation. The film centers on a young scientist named Flint Lockwood (Bill Hader) who has been trying to help the community of his small island town, Swallow Falls, with his inventions ever since he was a child. Mostly, his inventions cause more problems than they solve (one has to wonder what made him think “rat birds” were a good idea, though they serve for some great recurring jokes), until one day his machine that turns water into food ends up making food rain from the sky.

This is a boon for Swallow Falls, which was a former sardine town until the world realized that sardines are “totally gross”. The egomaniacal Mayor Shelbourne (Bruce Campbell) sees the business potential in being a town that rains food, and ends up changing the town’s name to Chewandswallow and rebranding it as a tourist attraction. As you can probably guess, things don’t work out so well when the food mutates and ends up attacking the town Roland Emmerich-style.

In addition to the excellent writing, the cast is another reason why Cloudy ends up working far better than it should. Hader carries the film with the perfect balance of passion and insanity, and Campbell is deliciously slimy as the mayor. Anna Faris does a decent job as a young weather girl in training who Flint eventually falls for, and James Caan is just about perfect as Flint’s emotionally distant father.

Most notably among the supporting cast, Mr. T is absolutely great as the town cop who is overly suspicious of everything Flint does. Every scene with his Officer Earl Devereaux works incredibly well, partially because you know it’s Mr. T., but also because the guy is just hilarious. (Check out this clip of Mr. T picking apples with Conan O’Brien for proof.) Andy Samberg plays the the former child icon of the town’s sardine industry who is now grown up, but still unsurprisingly popular and entitled. And in a small (but hilariously effective) role, there’s Neal Patrick Harris as Flint’s pet monkey, Steve.

The film’s look is suitably colorful and over-saturated, and if you can see the film in 3D I would highly recommend it. Cloudy is strong enough to work in 2D, but it also serves as a great showpiece for modern 3D technology. There are surprisingly few gimmicks to be had, and the 3D definitely adds a savory texture to all of the giant food items in the film. I wouldn’t be surprised if it ends up being the go-to demo piece for 3D home theater technology over the next few years.

I’m hoping that Cloudy puts Lord and Miller on the map, because I definitely want to see more from these guys. The humor from the film felt like something from the Lonely Island crew at times—not exactly what you’d expect in a kids movie. I hadn’t realized that they worked on How I Met Your Mother before seeing the film, but now it makes complete sense. Kids may not get all the jokes at first, but when they rewatch it in a few years they’ll quickly find a new appreciation for it.

Cloudy with a Chance of Meatballs is the third feature CG film to come out of Sony Pictures Animation, and it’s good enough to erase the memory of Open Season and Surf’s Up. Their previous features felt incredibly safe, whereas Cloudy takes chances and is all the better for it. This film proves that SPA is a worthy competitor to Dreamworks, and possibly even Pixar. Let’s just hope that their future releases are as gutsy.