The summer movie season was a Dickensian cliche: the best of times and the worst of times.

For movie studios and box office prognosticators, it was unquestionably dismal, with revenue way, way down compared to the past two years. On Labor Day weekend, the box office had its worst performance in 17 years.

For critics and many audience members, though, it was pretty good; the variety of films and imagination on display — not to mention signs of a turn toward more diverse voices and audiences — served up a summer full of varied and enriching entertainment.

What does this split mean? That, too, depends on who’s watching. Here’s a closer look at the dual fortunes that marked the summer of 2017 — and why its big lesson may be that the studios need to experiment if they want to recapture audience attention in summers to come.

It’s been a historically bad year at the box office

To say that box office revenue dropped this summer is putting it mildly. Even though some individual movies did very well — most notably the crowd-pleasing superhero trio of Wonder Woman, Guardians of the Galaxy Vol. 2, and Spider-Man: Homecoming — the slump was still noticeable.

For all of the summer months (May through August), the US box office posted numbers that were lower than those from both 2015 and 2016. July was down 12.2 percent compared to the same month in 2016. While Spider-Man: Homecoming (released on July 7) did well enough to climb to the No. 4 spot on the overall 2017 chart in the US, the franchise sequel War for the Planet of the Apes wasn’t nearly as lucky. And while July did serve up the unexpected hit Girls Trip as well as the overperforming Dunkirk, it wasn’t enough to save the month, or the summer, which by the end of July was lagging behind summer 2016 by 11 percent.

This was part of a larger trend in 2017, though. August was the sixth month in a row in which the box office was in decline. And by August 18, the last big date for movies to open in the US, the month was pacing an abysmal 34 percent behind August 2016. The final weekend in August, following tradition, didn’t see any huge or buzzy openings — and it turned out to be the worst weekend at the box office in 16 years. The dismal Labor Day weekend beat that record: it was the worst since 2000.

There are lots of reasons for this box-office slump, none of which are easy to pinpoint. You can blame it on advertising campaigns that didn’t get people in seats. Or you can blame sequel fatigue. Or there’s the expense of movie tickets and the often annoying experience of sharing a theater with people more interested in talking or texting during a movie. Or there’s the fact that many people prefer to just stay home and stream a movie or TV show.

We can learn some things by looking at the summer’s hits, though.

The movies that did do well this summer tended to have strong reviews and word of mouth

Some of the summer’s best-reviewed blockbusters did particularly well at the multiplex, nabbing spots 2 through 4 on the overall chart. They also did double the business of less well-reviewed blockbuster sequels, like Pirates of the Caribbean: Dead Men Tell No Tales.

2017’s highest grossing movies in the US Movie US box office gross Rotten Tomatoes Metacritic Vox (out of 5) Movie US box office gross Rotten Tomatoes Metacritic Vox (out of 5) Star Wars: The Last Jedi $620,181,382 91 85 4.5 Beauty and the Beast $504,014,165 70 65 3 Wonder Woman $412,563,408 92 76 3.5 Jumanji: Welcome to the Jungle $404,515,480 76 58 3 Guardians of the Galaxy Vol. 2 $389,813,101 83 67 4 Spider-Man: Homecoming $334,201,140 92 73 4.5 It $327,481,748 85 69 4 Thor: Ragnarok $315,058,289 92 74 4 Despicable Me 3 $264,624,300 59 49 2.5 Justice League $229,024,295 40 45 2.5 Logan $226,277,068 93 77 4.5 The Fate of the Furious $226,008,385 66 56 - Coco $209,726,015 97 81 3.5 Dunkirk $188,045,546 92 94 4.5 Get Out $176,040,665 99 84 4.5 The LEGO Batman Movie $175,750,384 90 75 4 The Boss Baby $175,003,033 52 50 2 The Greatest Showman $174,041,047 56 48 2 Pirates of the Caribbean: Dead Men Tell No Tales $172,558,876 30 39 2 Kong: Skull Island $168,052,812 75 62 2.5

This isn’t a perfect rule — Kong: Skull Island netted moderately good reviews and finished behind Pirates, for instance — but it does seem to indicate that moviegoers are still interested in franchises and sequels, provided they’re somehow fresh or innovative. Surely critical opinion (filtered through Rotten Tomatoes) matters somewhat, but word of mouth likely does as well. For a movie to succeed, it needs a strong opening weekend and strong second-week sales, the latter of which seems correlated to reviews and word of mouth.

The second lesson we can take from summer 2017’s box-office successes is that family-oriented animated movies will probably do well no matter what — both because families want something to do together during the summer months and because children probably have less sequel fatigue than (but plenty of power over) their long-suffering parents. Despicable Me 3 is a bona fide hit, continuing to rake in money since its June 30 release. And Boss Baby had a great advertising campaign that drew loose associations between its star (Alec Baldwin), the character he played all season on Saturday Night Live (Donald Trump), and the character he plays in the movie (a baby in a suit), which likely helped it reach the 10th spot on the list — it opened in March and is still playing in some theaters. Cars 3 and The Emoji Movie also parlayed the family-movie sweet spot into good box-office returns.

And non-franchise movies aimed at adults can do well, too, whether they’re comedy or drama. Dunkirk, Girls Trip, and Baby Driver all crossed the $100 million mark, with the first two (which couldn’t be more different from each other) strongly outperforming expectations. The key here, again, is some combination of strong reviews and word of mouth.

Finally, the continuing success throughout the summer of February’s Get Out — which sits at No. 9 and is almost guaranteed to be the most profitable film of the year, given its low production cost — along with Girls Trip (a comedy starring four black actresses) and Wonder Woman (a wildly popular film starring a female superhero and directed by a woman), as well as the female-driven Beauty and the Beast’s huge take, seems to indicate that Hollywood studios need to begin revisiting their assumptions about what kinds of movies make money. Hollywood has long favored a certain demographic as the “default” — white, relatively affluent, young males — which explains why the success of Wonder Woman and Girls Trip surprised some prognosticators. But 2017 continues to rewrite the rules about what kinds of movies are able to rake in the cash.

It may have been a bad summer for the box office. But it was a great summer for movies.

If you weren’t looking at box-office returns, though, 2017 was a terrific summer at the movies. Critics, long used to struggling through limp remakes, unimaginative reboots, and mediocre stabs at “fun” summer movies, were startled over and over this summer by the kind of imagination and variety often on display. For every Emoji Movie — actually, scratch that, there’s really only one Emoji Movie. But for every Pirates or The Mummy that had to be endured, there was a smart superhero movie or a soulful indie flick worth taking in.

Superhero movies tend to take one of two approaches to bringing in a huge audience: Either make a big, flashy, risk-free crowd-pleaser (often the Marvel tactic), or a brooding, moody, “gritty” reboot (more DC territory). But this year, everything got shook up.

Back in March, Logan set the tone with a dark but confident Marvel movie that owed as much to the tradition of American Westerns as the X-Men universe. Guardians of the Galaxy Vol. 2 wasn’t innovative — it took roughly the same tone and template as its jokey predecessor — but it was an awful lot of fun and just offbeat and weird enough to set it apart.

Then came Wonder Woman, the first superhero tentpole movie ever directed by a woman. And it captured the hearts of critics and moviegoers alike, for everything from its unabashedly female gaze and woman-centric narrative to the romance and humor at its center. It didn’t hurt that it featured a superhero(ine) whose greatest desire is to bring peace and believe the best in people, rather than simply to win.

And then Spider-Man: Homecoming swung in, featuring Tom Holland — whom some critics crowned the best movie Spidey ever — and a plot that was more oriented around high school than superheroics. Spider-Man: Homecoming was always a little bit of a gamble, given that both previous Spider-Man series (featuring Tobey Maguire and Andrew Garfield) are hardly ancient history. But this one endeavored to firmly secure its Spider-Man in the Avengers universe, and it worked.

It wasn’t just superheroes who had a good summer, though. Movies that broke the traditional summer movie mold — from singular epics to thoughtful comedies — were remarkably good as well.

Dunkirk, for instance, was a big question mark; many critics wondered what Christopher Nolan was doing with a historical war epic. But it was an unabashed cinematic triumph, one that succeeded on both storytelling and creative levels, with many (including me) declaring it to be Nolan’s masterpiece — not a war film at all, but something deeper and more human. And because its focus on old-school methods of filmmaking and film projection (especially 70mm formats) seems to have paid off, it could lead to more 70mm films in the future.

Another war film that won critics’ hearts was War for the Planet of the Apes, the conclusion to one of the best blockbuster trilogies ever. Drawing on biblical themes as well as classic films about the Holocaust and modern politics, it transcended its genre to become a truly excellent epic, with much to ponder.

But there was much more on tap at the box office for people looking to roam beyond big-budget action and family movies. The indie romantic comedy/drama The Big Sick, which premiered at Sundance earlier in the year, drew raves when it hit theaters. The tiny, strange, cosmic romance A Ghost Story racked up ecstatic responses from critics and audiences. The ’80s-inflected Atomic Blonde drew favorable comparisons for its star, Charlize Theron, to James Bond, while the ’80s-inflected action-drama Good Time drew raves for its star, Robert Pattinson. Baby Driver, the latest from Edgar Wright, was a hit with many critics and audiences, as was the West Virginia heist film Logan Lucky. The spooky social horror film It Comes at Night sidled up alongside this February’s Get Out to draw on old tropes and add a few of its own. And female-driven movies as varied as The Beguiled and Girls Trip each yielded up their own brands of humor, twisted and subversive in their own way.

Some of these movies did great at the box office. Others flopped or performed only moderately. But if you were a critic or a frequent moviegoer, all this variety was good news. Some summers, it’s just a parade of disappointments — getting your hopes up, only to have them dashed. So in that sense, 2017 was a welcome relief.

The one big category that was missing a clear qualitative winner, though, was children’s films. 2016 had a remarkable variety of artistically diverse, well-crafted movies for kids, ranging from Finding Dory and The BFG to Pete’s Dragon and the truly marvelous Kubo and the Two Strings. But 2017 hasn’t been as kind. The best of the bunch is probably Cars 3, which surprised critics with some unexpected poignance. But the rest of the children’s films — all animated — on offer this summer were duds, from a predictable Despicable Me 3 to a baffling Boss Baby to the truly heinous and cynical Emoji Movie.

The reason for this is pretty simple: The other big Pixar movie of the year is Coco, and that doesn’t come out until the fall. But it doesn’t lessen the disappointment of a decline in quality family entertainment; hopefully this isn’t a downward trend.

The movie industry is in upheaval. But that should be exciting for moviegoers.

So what does all this mean? Is there a lesson to be drawn from the summer 2017 movie season?

If there is, it’s not a particularly new one: The prevalence of streaming, the rise of TV, the increasing call for diversity, the shifting focus toward international audiences, and the cost of going to movies at the theater are changing the way Hollywood does business in its biggest season. Nobody’s ever totally figured out how to make a surefire hit, but there used to be rules of thumb regarding what made for a box-office winner — and those rules seem to be changing.

Another way of saying this is that nobody knows what’s going on.

But that should be exciting for moviegoers! Big corporations that are trying to recapture a market are forced to experiment, rather than sticking to the same formulas and templates. This summer’s dip in box-office receipts, coupled with the unexpected success of some presumed outliers, is a good sign that studios are going to have to start experimenting more in order to stay afloat.

This will undoubtedly lead to some eye-rolling moves; perhaps you join me in hoping 4DX doesn’t really become a thing. But then again, if it forces the business to look outside its usual pool of contributors and ideas, it could also lead to some truly interesting work in the future. Here’s hoping.