The Homeward Bounders by Diana Wynne Jones
"You are now a discard. We have no further use for you in play. You are free to walk the Bounds, but it will be against the rules for you to enter play in any world. If you succeed in returning Home, then you may enter play again in the normal manner."
When Jamie unwittingly discovers the scary, dark-cloaked Them playing games with human's lives, he is cast out to the boundaries of the worlds. Only then does he discover that there are a vast number of parallel worlds, all linked by the bounds, and these sinister creatures are using them all as a massive gamesboard.
Clinging to Their promise that if he can get Home he is free, he becomes the unwilling Random Factor in an endless game of chance.
Irresistible Diana Wynne Jones fantasy adventure, featuring an insect-loving shapeshifter, an apprentice demon hunter and a whole host of exotic characters clinging to the hope that one day they will return Home.