I Coded a Video Game
Updated: Dec 1, 2018
I’ll be honest, I stumbled into learning Python by accident. My partner was working his way through a 4 hour Python tutorial (I know, I know) and I was lying next to him. And then I started listening, and paying attention, and realized, this actually makes sense. It wasn’t just a load of random numbers and dots strung together, it was actual English words. It sounds silly, but I was genuinely shocked. My little book-nerd brain had no idea that this was the elusive, techy world of coding.
Disclaimer: Python is a wonderful first coding language for this reason; it uses straightforward word functions and logical sequencing. Other coding languages will sometimes fall more into the realm of strange punctuation. Not that they aren’t great in their own right, they’re just less English.
Python turned out to be what my little editor’s heart was dreaming of: missing colons, unclosed parentheses, and spacing issues. In fact, if you have any academic background, just think of coding as writing lots and lots of citations. And you’ve done that a million times.
While watching this 4 hour tutorial, I made my partner pause the video several times to let me try the things they were showing. I could do it! I could really do it! The rest is history. I spent the next few days trying and failing to code. I spent a good 2 hours at first trying to get an “if statement” to work, and another 2 hours trying to do a “while loop” that still isn’t completely sound. Yet by the end of that week – when a week before I didn’t even know how to code a print function – I had coded a 500 line, interactive, fully functioning Text-based RPG (Role Playing Game). I was overflowing with pride. I know that I am by no means an expert at coding now, and that Python is perhaps the easiest language to learn, but I felt as though I had entered a previously impenetrable world of gaming. One that wasn’t built for people like me.
I’d like to note that this entire endeavor was inspired by and encouraged by my partner, James, who initially came up with the idea for us to create a game together. Before learning Python, I had already written a gaming script which I intended for James to code. Having this script and the end goal of having a working game really helped me feel like my trials with coding would be worthwhile in the end. Of course, coding random things while learning is great too. In the end, I had coded our entire game within the week, with lots of help from James and Python YouTube tutorials. Without James’s troubleshooting, encouragement, and genuine support, this game wouldn’t have existed at all.
The game we created is called Dog Rescue, very original, I know. The story takes you through many decisions on whether you want to rescue a dog you find on the side of the road, keep it, raise it, train it, etc. It is still a fairly short game and is quite different from most Text-based RPG’s in that it isn’t a fantasy story. I’d love for you to check it out. It is posted to the free game-sharing website itch.io. Below is a link that will take you directly there and a widget where you can download it directly (versions are now available on Windows, Linux, and Mac).
I’m not entirely sure what my next project will be, whether I want to write another game or try something else. Because my main form of writing is poetry, I am interested in creating a poem through coding. I think it would be really cool to control the pacing of the lines and allow player choices and input within the poem. I could even create a poem-making game in a kind of Mad Libs fashion. Who knows, there are limitless possibilities.