Heir Apparent by Vivian Vande Velde (Houghton Mifflin Harcourt) is one of my all-time favorite books. I love its humorous attack on the way that adventure game stories are constructed, and I love that it stars a girl gamer--someone who's more visible nowadays, but not always visible to game studios.
The heroine is trapped inside a virtual reality game--and the only way to leave is to play her way out. Danger looms and the clock is ticking. Luckily, it's virtual reality, so a game over leads us back to a Groundhog Day style start.
The concept bobbles a little: the beginning sequence repeats several times before the heroine figures out one very specific and very true-to-gampelay step.Of course, adventure gamers will recognize this, and be quite familiar with starting over, and over, and over, until one figures out just which button to smash or which shopkeeper can give directions to the game villain's secret lair. About midway through the book the "game" becomes more fluid and narrative. Still, it's entertaining, and gamers will particularly enjoy the nods to conventions of that medium.