I'm trying to track down the title/author of a novel I read some time back. I read the novel sometime between 1998 and 2004; not sure when it was printed. The novel itself I originally found in the YA section at my local library.
The setting of the novel is an interstellar generation ship outbound from earth, several generations into the journey. The plot loosely runs something like this - Several students undergoing what should have been ordinary virtual reality training at school suddenly instead find themselves inside a completely unfamiliar scenario (one which resembles the stereotypical 'you all meet in a bar' RPG intro). As time goes on, not only are the students drawn back into the 'game' simulation, but they actually begin to disappear from the ship itself - they discover that, in order for everything to go back to normal, they have to win the game.
The whole thing was revealed, in the end, to be the result of a set of embedded programs in the ship's master computer, if I recall correctly, with the programs having been placed there by a programmer who realized that the inhabitants of the ship were effectively breeding the spark of creativity and imagination out of themselves. Said programmer had taken it on herself to leave them a legacy that would ensure that, by the time they got where they were going, that all-important spark wouldn't have died completely away.