How can one of the most joyful films of the year also be one of the saddest? Sean Baker’s “The Florida Project” accomplishes this feat, making a movie with both the gritty authenticity of a slice-of-life documentary and more heart and laughs than most big Hollywood comedies.

And all that emotion is packed into one ordinary place, a motel called the Magic Castle in Orlando, Florida.

The eggplant-colored motel in the shadow of Walt Disney World might look like a typical tourist fleatrap. But to Moonee (Brooklynn Prince), it’s home. The 6-year-old girl has been living at the motel week-to-week with her flighty single mother Haley (Bria Vinaite), one of many families barely scraping by on donations, their wits and the good graces of the motel’s gruff but kindly manager R (Willem Dafoe).

It’s a dump, but to Moonee, it’s a wonderland. The camera seems swept up in her excitement; it chases behind her and her friends as they charge through the motel and its surrounding environs looking for adventure. They scam tourists for free ice cream, hock loogies onto cars from the balcony, even break into one of the many abandoned condos in Florida and set stuff on fire.

Prince, a non-actress found by Baker, makes Moonee into a wonderful, fearless, foul-mouthed little heroine, making even acts of petty fraud and juvenile delinquency seem adorable. She made me laugh out loud constantly.

“The Florida Project” so effortlessly brings us into Moonee’s sunny worldview that it takes a while to realize just how dire her situation is. Haley is an affectionate but totally irresponsible mother who turns to prostitution to make ends meet. It’s telling that I worried less about Moonee when she was running around with her friends than I did when she was with her mother. Their life at the Magic Castle seems unsustainable, and the laughs start fading as mother and daughter, both children really, seem to be heading toward disaster.

Baker uses mostly non-actors like Prince, all naturals in front of the camera, and then dares to put an actor as instantly recognizable as Dafoe in the middle of them. But Dafoe is playing a low-key, decent guy, so unlike the larger-than-life characters he often plays, he seems brand new on the screen as well.

Baker’s previous films, “Tangerine” and “Actress,” also looked at lives lived on the margins of society, imbuing them with humor, honesty and above all, dignity. In “Project,” he refuses to sugarcoat how rough life is for Moonee and Haley, how dim the odds are for them. But he also honors the audience’s investment in these characters and treats the characters with a deep empathy.

Moonee’s mischievous innocence isn’t an illusion in this hard world. It’s an essential tool for survival, and all the more heartbreaking for that.

Rob Thomas is the features editor and social media editor for the Capital Times, as well as its film critic. He joined the Cap Times in 1999 and has written about movies, music, food and books.