Related: NetHack. Nethack added ASCII graphics and 'rogue' elements to the text game world. A 'roguelike' game has 'procedural level generation, turn-based gameplay, tile-based graphics, permanent death, and typically based on a high fantasy narrative setting.' Emphasis on permanent death. Nethack didn't invent rogue, but it's easily the most popular early roguelike. The Binding of Isaac and FTL are recent popular (non-textual) roguelikes.
Here's the grand-daddy of all those type of games - Colossal Cave (usually just called "Adventure") : http://en.wikipedia.org/wiki/Colossal_Cave_Adventure
My favourite of this genre was Infocom's "Leather Goddesses of Phobos", which came with a 3-D comic book.
I always remember this game because there was a copy of it on the Unix system at the first programming job I ever had (around 1986?), and someone had hacked it so that in one of the early rooms, where it normally says "There is a dead orc here", it now said "The is a dead Joe Blow here", where "Joe Blow" was the name of a particularly dickish engineer who worked there - his real name I will keep to myself.