Ever since “The Endless Summer” in 1966, filmmakers have been searching for that elusive quarry, the perfect surfing movie, as devotedly as surfers do the perfect wave. But mostly what they manage to come up with are uplifting, real-life tales that try to convey the exhilaration that leads some folk to obsess about testing themselves on great swells that threaten to bash them against rocks and cliffs, ordinarily with a triumphant result (but often followed by a sad postscript).

That’s the case once more with “Chasing Mavericks,” based on the short but inspiring life of Jay Moriarity, a California lad from a troubled home who steeled himself to take on a legendary wave off the coast by becoming a pupil of an old-time master named Frosty Hesson. Jay is played by Jonny Weston, a clean-cut, curly-haired boy in whose performance Moriarity is as brave, honest, loyal and dedicated as the most decorated Eagle Scout. (He’s such a goody-two-flippers that it’s hard to believe he’s a real person.) Hesson, meanwhile, is given normally gruff treatment by a hirsute, scruffy Gerard Butler. Both handle their on-the-ocean chores convincingly, though presumably with a considerable assist from stunt doubles along the way.

In the script by Kario Salem, Jay first meets Frosty in 1987, when the older man rescues him, then an eight-year old boy (Cooper Timberline), after he’s fallen into the sea. It turns out they’re neighbors, and both are fascinated by the waves. Seven years later both are devoted surfers, and Jay stows away on Frosty’s van when the older man is sneaking off to cavort with his buddies at a special place where supposed mythic “maverick” waves periodically rise. Jay begs the man to train him to ride them, and the initially reluctant Frosty agrees, becoming a kind of waterlogged Mr. Miyagi to Weston’s Daniel—oops, Jay.

The bonding between Jay and Frosty, whom he comes to look upon as a surrogate father, makes up most of the picture. But another thread has to do with Jay’s concern for his mother Kristy (Elisabeth Shue), who’s devastated by her husband’s abandonment of the family—as is her son, though he controls it better. Then there’s Jay’s infatuation with her slightly older childhood chum Kim (Leven Rambin), who at first treats him as only a friend. And his concern for his closest buddy (and fellow pizza clerk) Blond (Devin Crittenden), who gets involved with drugs and grows envious of Jay’s closeness to Kim. And his constant mistreatment by baseball-bat-carrying bully Sonny (Taylor Handley), to whom Blond betrays Jay.

As if all this isn’t enough melodrama, the picture also deals with Frosty’s domestic troubles, particularly his difficulty connecting with his adolescent daughter. Fortunately he has an insightful, supportive wife, Brenda (Abigail Spencer), who overlooks his weaknesses and helps him make the right decisions, including aiding Jay fulfill his dream. Unfortunately, that marriage has a tragic end, leading to yet another opportunity for the film to go into tearjerker mode.

That’s an awful lot for one movie to handle, and under the directorial hand of veterans Curtis Hanson and Michael Apted, “Chasing Mavericks” moves through everything with a kind of plodding determination to cover all the bases. Still, young Weston makes a likable hero, and Butler a grubby mentor for him. The supporting players generally do their jobs well enough, though Shue—as is usual in her work nowadays—tends to come on too strong (as does Handley).

What works best in the picture, however, is the panache of the big surfing scenes, in which the cinematography of Oliver Euclid and Bill Pope and John Gilbert’s editing come into their own. The rest of the movie may be utterly pedestrian from the technical standpoint, but the action at sea does capture the sheer physicality of the sport.

Apart from those moments, however, the picture—like “Soul Surfer,” the most recent entry in the genre—is a typically kind-hearted but mawkish tale of a good kid who achieves his dream through sheer grit, overcoming every obstacle life puts in his way. It’s appropriate that it should have been made by Walden Media, which specializes in such formulaically inspiring fare. As family entertainment you could do worse. But you could also do much better.