If you like the Zork "engine", learn Inform 7. If you like the Colossal Cave "engine" better, you might like to look at https://github.com/Quuxplusone/Advent/blob/master/ODWY0350/a... — it's very easy to remodel with your own rooms, items, verbs, and so on. (So is the original Fortran, but then you have to be able to compile Fortran...)
It is as they say: if you want to make a game engine, make a game engine. But if you want to make a game, use an existing engine.