I’m making progress with learning C. It’s easier having already done stuff with JavaScript, PHP, Arduino, etc.
Loop structures are nearly identical.
I might end up making a simple prose/text adventure game purely with C. Should help me learn more.
I’ve pretty much figured out arrays already too. That’s definitely one of the things a text adventure game would help solidify. My mom and I made one years ago in TRS-80 BASIC.
It was pretty sweet. Starts out with you in the desert outside a small ghost town.
You can walk into the town. If you tried going any other direction than toward town, it would just say “You are in the desert outside a small town” haha.
The ghost town has a bunch of small buildings, etc. Barber shop, Livery Stable, blah blah.
The only real actionable thing was in the Barber Shop, where if you sit in the barber’s chair, it would fall through the floor and you end up in a subterranean maze type thing.
One of the rooms is a cave with a switch on the wall. a Lever type thing.
If you flip the lever, you hear a rumbling sound and water floods the room and you die…then you basically spawn back above ground.
It was a simple little game, but it got lost. We were saving out latest copy to disk…I reached over and turned on the printer so I could print out the code.
Those old TRS-80 computers were notorious for line noise, RF noise, etc. they basically had no power filtering whatsoever. Which is one of the reasons they got a redesign and came out as the Model II.
When I turned on the printer, it spiked the code in the computer…saved it trashed to disk…was trashed in RAM. BOOOO.
Anyway, I think it’d be cool to make one of those…when I talk about prose/text adventure games, think stuff like ZORK, Enchanted Castle, Madame Fifi’s Whorehouse Adventure (personal favorite of mine)
*** The reason I said text game would be great for solidifying array structures is those are nothing BUT arrays.
One array is for location descriptions, another is for items in your inventory, another would be for the location of other characters (like the thief in Zork).
Certain actions you take, it will change the text values in the location array. So if you flip are in the control of the dam in Zork, and push one of the buttons, it will change the description slightly so that room will now say either “The Sluice gates are open” or “The sluice gates are closed” and so on.
OK enough geeking out. Time to learn about bitwise operators 