There were a crapload of these games beginning with "Adventure" for old CPM machines and later for DOS. There were published by Infocom. They were a lot of fun. My personal favorites were the murder mysteries like "Deadline". Which reminds me I have not finished with "The Leather Goddess Of Phobos".