Out Of Phaze by Piers Anthony

The story follows a man who inhabits two linked worlds—one a technological, game-driven society and the other a mirror realm of living magic—forced to juggle his rival roles as a champion in the machine world and an adept in the enchanted one. When conspiracies and dangers begin to spill across the boundary between realities, he must draw on both cunning and sorcery to protect friends, unravel plots that threaten both societies, and reconcile the divided parts of his identity.