In the 2040s, energy resources and the economy in America have collapsed. The poor live in "stacks," vertical trailer parks outside cities where old mobile homes are piled on top of each other. A few lucky kids get to attend school online, in a virtual world called the OASIS that has replaced the Web with an ultra-fast, immersive 3D space. OASIS money is the most stable currency available. Most people are stuck in schools that are like prisons, and unemployment that is worse.

It's a grim world that Ernest Cline has created in his first novel, Ready Player One, and that's why his protagonist Wade Watts has hacked together some recycled computers so he can escape into the OASIS. But there's an escape hatch even more appealing than gaming. OASIS creator James Halliday has died, and his will stipulates that his massive fortune will go to the gamer who finds three "keys" that unlock an Easter Egg in his virtual world. Nobody can figure out where the first key is, until Wade, working alone in his unheated van at the bottom of the Oklahoma City stacks, figures it out. And that's when things in this fantastic page-turner get really get crazy.

You may have seen Cline's work before if you managed to catch indie flick Fanboys. It's about a group of Star Wars fans who find out their friend has cancer, and will die before The Phantom Menace comes out - so they decide to take a road trip out to George Lucas' Skywalker Ranch and break in so he can see it. Cline struggled for years with the studio over the movie, trying to prevent them from removing the cancer subplot. When the movie finally got into theaters, hopelessly butchered (though still fun to watch), Cline decided it would just be easier to write a novel if he wanted his stories to reach audiences unexpurgated. A whole lot of readers are going to be pleased that he did, because Ready Player One has all the pop culture savvy and compelling friendships of Fanboys, married to a brilliant vision of the future.

In Ready Player One, Cline deftly balances his story on the border between two worlds: the harsh reality of Wade's life, where he's a dirt-poor orphan living in a rotting van whose most valuable possession is a connection to the OASIS (his high test scores have earned him a free connection to the planet where his virtual school is located); and the galaxy inside the OASIS, where Wade quickly becomes a gamer superstar after he finds the first egg. Wade is part of a subculture of "gunters" (short for "egg hunters") who have been searching for Halliday's keys for nearly four years. Their enemies are the mercenary gamers who work for a company called IOI, which already controls most of the games in the OASIS. IOI is trying to win Halliday's game so they can take over the OASIS completely, charge for access, and prevent people from logging in anonymously.

Halliday has changed the world with the OASIS technology, which requires a VR heads-up display and haptic gloves. We discover that he invented it in the early 2000s, which makes Cline's novel a kind of alternate history where virtual world Second Life was both awesome and wildly popular. But Halliday's Egg hunt has changed pop culture, too. The only clue he left behind to lead people to the Eggs is an online journal he kept, which is stuffed with analysis, reviews, and rants about the pop culture of his 1980s youth. From WarGames to Monty Python, Halliday's obsessions become the obsessions of every gunter hoping to figure out where Halliday might have stashed his Eggs.

With this setup, Cline offers us a nice twist on the old "future person obsessed with present-day history" scifi cliché. There's a good reason why Wade and his pals spend all their time watching 80s TV - knowing what happened to the characters on Family Ties could one day land them billions of dollars. As a literary device, it also allows Cline to play on his readers' own nostalgia for the early days of digital culture; and to trace Wade's horrific economic situation back to policies inspired by Reagan Era reforms.

Joining Wade on his gunter quest are a circle of friends, including his online crush Ar3mis, who writes his favorite gunter blog. Though they don't work as a guild, they still share some information — anything to prevent the IOI thugs from getting the Egg first. Once Wade finds the first key, he and his friends are racing against IOI at a breakneck pace, and you won't be able to put the book down. It's as addictive as gaming. Despite the speedy plotting, there's still time here for Cline to create touchingly believable characters, whose friendships and romances feel painfully real. Cline captures the rhythms of online friendship, and clearly knows that such connections always bleed over into the real world. Especially when it turns out that IOI is so desperate to get to the Egg that they won't just cheat to kill your avatar in the OASIS. They'll venture into the real world to murder gamers who threaten them.

Pretty soon, Wade and his friends are in a life-or-death race to the final key and the ultimate Egg — both in the OASIS, and beyond. As they level up, we get an unsettling view of the Max Headroom-esque place America has become, even as we plunge more deeply into Halliday's classic pop culture-infected consciousness via the puzzles of the OASIS.

Ready Player One may be science fiction, but it's also written for people who have never picked up an SF novel in their lives. So it may feel like slow going for SF fans at first - Cline doesn't plunge you into his future world and leave you to sort it out. He walks you in slowly, showing you more and more weirdness, until by the end you realize that his worldbuilding is as complicated as anything Charles Stross or Lois McMaster Bujold might produce. This is a novel that starts out like a simple bit of fun, and winds up feeling like a rich and plausible picture of future friendships in a world not too distant from our own. And despite its dystopian flavor, the novel doesn't shy away from giving us lovable characters who succeed through teamwork, anti-authoritarianism, and a love of online anonymity.

As the summer winds to a close, soak up the last of the year's warmth with Ernest Cline's Ready Player One. It goes down like escapism, but sticks with you like a fable should.