It’s me again! I know! It’s shocking. It’s only been a few days since my last post and yet, here I am!

I started playing around with some code for my game.

I was planning all kinds of things out (oh god, the things I’m going to have to do!) and I suddenly was consumed, paralyzed, with this fear: what if I can’t even do the basic stuff I think I know how to do???

For me, the basic stuff is the questions and answers of the trivia portion of the game, which will be the majority of it. While I was thinking about the game itself, I was like “yeah, sure, I know how to pull a single row from a database!” and “yeah, sure, I know how to pull something from the resulting array!” and “pfft, how hard could it be to make it a random question?”

So I decided to dive into it. It’ll all need to be rewritten, of course, because it needs to be built within the game’s framework and right now it exists on a trivia-test.php page (and a private GitHub repo, thank you for loving students like you do!), so it’s messy. But it works. I can randomly pull out a row from the question database. And I can display the question to the user. And I can take the user input and transpose it all to lowercase, then match that to the answer in the database (which is all lowercase) and I do that because, that way, OTTAWA, Ottawa, OtTaWa and ottawa are all valid answers to the question of What is the capital city of Canada?

So I can do this. I can actually do this. And man, that’s super exciting.

I’m still working on the narrative for the story (my friend Lisa is helping me). I’m also still working on the gameplay itself, since it’s still kind of fuzzy, and I’m picking my friend Andrew’s brain about that, since he has probably played more games than anyone else I’ve ever met. My brother insists there be a fishing component to the game and it does make sense, so I’m thinking that there will be a side-quest to level your fishing skill and such. My brother’s going to help me with ideas for how that should go, too.

The coolest part of this so far, apart from realized I can do this, has been figuring out how to organize the databases. I really liked SQL when I took it last winter, and I enjoyed using it in Java class and through PHP. I am not, by any means, an expert, but I really kind of dig SQL. I’m more comfortable on the command line, owing to how I learned, I guess. It’s fun. It’s cool to be able to use Docker to build my database when I restart my environment and I love being able to basically ssh into the container on the gitbash command line and test stuff in there. It’s fun and challenging. Will my alter table command work? Will this command retrieve what I need it to? It’s awesome when it does.

Anyway, that’s it for now. Just wanted to be like yeahhhhhh! More to come, I’m sure.

Leave a Reply

Your email address will not be published. Required fields are marked *