Recent history -- one of the initial GPT use-cases that got the hype train going was AI Dungeon, which is this sort of thing.
Thought I think with GPT function calls, you could have the LLM sitting atop an actual game engine with persistent objects, rather than having the LLM implement the game engine and world state - which is vulnerable to hallucinations etc. (Wonder if anyone's wired this up yet? Seems like it should be easy with existing text adventure engines.)