"Twelve-year-old Kyle gets to stay overnight in the new town library, designed by his hero (the famous gamemaker Luigi Lemoncello), with other students but finds that come morning he must work with friends to solve puzzles in order to escape"--
When Ted inherits his uncle's apartment "and all the treasure within," he realizes the apartment is set up like a real-life video game and must solve the puzzles with his friends to discover the treasure.