I used to have enormous amounts of fun doing this. I’ve done it in a couple forms of BASIC, Pascal, and C. They’re just plain fun.
One I did on an Apple IIe in its BASIC, and I eventually hit an upper memory limit cause I had so much text description for all of the rooms and objects. The actual space used up by the game logic and various bits of state information (which room you’re in, what objects you’re holding) and the ‘map’ were miniscule in comparison. Fortunately I managed to trim the text back enough to submit it for my grade 10 project.
Granted, I love this stuff (programming) and now do it for a living, so you’ll have to take my opinion with a grain of salt, but it’s not that hard to do.
There are really good ways to do it, and really bad ways to do it, though, to allow you to easily add more ‘things’ and ‘places’ and improve the game’s ‘intelligence’. As an example, you shouldn’t write it so that different parts of your program represent being in different rooms or things.
You should try to write it so that what room you’re in or what things you’re holding are simply ‘state’ information or ‘variables’ containing that information. This enables your program to be more flexible, but at the same time simpler.
repeat
get user sentence
understand player sentence
apply player sentence to 'update' the player state and world
end repeat
This way, the ‘update’ operations as a result of player action can either be very general (move from room to room, pick up or drop an object) or very specific (throw the machine switch).
Depending on what language you choose, you probably want to understand structures or their equivalent. You almost certainly want to learn about arrays. Because of the sentences and processing them, you probably want to learn how to work with strings as well.
As always, KISS (Keep It Simple, Silly). Even a game that just allows < verb > < noun > can work pretty well.
Starting place: Choose the language you’ll use.