interactive fiction
noun
an adventure or mystery story, usually presented as a video game or book, in which the player or reader is given choices as to how the storyline is to develop or the mystery is to be solved.
Origin of interactive fiction
First recorded in 1975–80