I already know the basics of C but it's not a language that I'm super comfortable with and I don't use it often.
So here is my attempt at going through a very basic tutorial of building a text game. This actualyl harkens back to the very first program that I wrote in python. It was a little text game that just use loops, if statements and prints to do everything. I had no other structures. The wildly branching things and items and levels were all tracked via global variables.
Now I might learn how to make such a text game properly.
⇒ https://helderman.github.io/htpataic/htpataic01.html
I've finished up the first 3 chapters and the biggest lesson her is the strok function. It splits a string on a delimiter and gives you the variable. The craziest thing is that it saves an internal pointer so you pass NULL in when you need the next token. The function remembers where it is in a string. This ultimately means that you can't use strtok against two strings.
There is a better version of this function called strtok_r but for now I'll stick with what the tutorial is using.
The other neat thing is that strcmp isn't a string testing function for equality but rather is an ordering tool. I thought it was strange that strcmp would return 0 when the strings are equal but this makes sense as 0 does not mean falsey here but rather it means the two are equal. 1 and -1 specify the order of the strings.
Even knowing C, this is still stuff that I am only really thinking about now. Love it.