Forwarding my earlier response to the whole list in case anyone else is interested:
I don't know that I'd bother to implement that in pygame when there are already engines designed for text adventures. The one I'm most familiar with is Inform 7, though Inform is an unusual programming language because it tries to read like natural language. For example, "The bottle is on the table. The table is in the Dining Room. The Dining Room is west of the Kitchen." is a compilable snippet of Inform code. If your interest is in the technical architecture, this might or might not work for your purposes. You could try asking for other engine recommendations in the intfiction.org forums. The text adventure community, though niche, is still thriving and making new games! ________________________________________ From: owner-pygame-us...@seul.org <owner-pygame-us...@seul.org> on behalf of pjfarl...@earthlink.net <pjfarl...@earthlink.net> Sent: Wednesday, June 17, 2020 8:40 PM To: pygame-users@seul.org Subject: [pygame] Can the pygame infrastructure be used for non-graphical text-mode games? A lot of the old "adventure" games and similar game efforts from the very early days of computing were strictly text-mode games with no graphics used (or needed) at all. The old code base for such games wasn't always very well organized or designed, they just (mostly) worked. I had a thought that updating such a game's design and structure with more modern design principles and supporting architecture would be an interesting exercise. Is it possible to use the pygame infrastructure to implement text-mode-only games? Without having to pick window sizes and resolutions and set fonts and font sizes, etc., etc., on a graphical surface? IOW, can the pygame keyboard input and screen output processes be replaced with simple python raw_input() and print() calls? Or am I just looking at the wrong library to use for such games? TIA for your advice and opinion. Peter --