Week 5: PHASE ONE- COMPLETE
March 29, 2024
Friends! I have wonderful news! Guess who’s done with their game!!!!!! It has been completely developed and is ready for release!
But before we get to that, let me tell you about my adventures with coding it. Construct3, I’ve realized, is pretty easy to navigate. Quite simple actually, except for the fact that I CAN’T COPY PASTE OBJECTS. For every single thing you will see on the screen here, I had to create a separate object, and give it separate properties and build it from group up. Over, and over again.
But, we made it through. All objects were created and were moving in the right places, and users were able to use the game! Splendid! HOWEVER, we now were working more on the intricacies of the game, and my biggest competitor was the timer.
For every situation through which the user is prompted to make a choice, they are given exactly 8 seconds to quickly toggle the lever, or choose to not participate. Now, I wanted to have a countdown so that users knew how much time they had left, and thus were able to make decisions wisely. However, I also had to code it in a way that after ten seconds, given that the user had not chosen to toggle the lever, the trolley would continue on its own path. To my computer science friends, sounds like a simple if-else statement right? WRONG.
Construct3 runs the entire event page(code section) every single second, as in, it repeats itself every second. There is also no built in if-else statement. So, I first tried to create a variable that would track whether or not the button has been clicked. It was a global variable: trolleyRan, set to 0 initially. Once the lever had been clicked, trolleyRan was set to 1. If trolleyRan was still equal to 0 later, the trolley would then start its original path. In normal code, where the computer runs through each line consecutively and waits for the first to complete before progressing, this should’ve worked fine. However, since the variable was set to 0 to begin with, for every second in which Construct3 runs every line of code, the line that was checking for trolleyRan == 0 would always be true, and thus the trolley would race down the original path without waiting for the countdown to end. What a dilemma! If you’re confused, trust me, I was too. Feel free to leave any questions(or suggestions) down for me below, and I’ll try to answer them to the best of my ability. Although fair warning: I am not even close to a computer science major.
And that fact emerged quite quickly in my next phase. As I tried to extract my data directly from the game itself, I ran into a plug-in called gameAnalytics. Trust me, Google, Chatgpt, and Safari all told me it would be easy to navigate. Spoiler alert: it was not. I was stuck for hours, figuring what in the world an SDK is(again, not a computer science major), and trying to implement the events into my own code. However, my friends, I hate to admit it, but I am not a perfect person. Even after a long night of the limited youtube tutorials, I was forced to admit defeat. I surrendered to a simpler method: just making a userID which would indicate each choice the users made.
And that wraps it up. I’m so proud that I was able to completely develop this, without any prior knowledge and a limited skillset. It’s been a journey and now i’m officially a gamer 🎮.
My last ask is that you too play my game! It can be found here: https://heeyadas.itch.io/trolley-problem and is open to the public! Remember to submit your userID afterwards!
See you all next week, when I hope to have a little more insight into human behavior.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
eshab2024 says
Wow! That was so much fun! i love how fast the trolley murders people 🙁