Gates Postmortem


Making games can be super fun when everything works out how you wanted it to, and other times it can be exasperating to not be able to achieve what you had envisioned. I needed to set a limit for how long a would work on this for, and ultimately, I wasn't able to achieve everything I wanted. I learned more about signals and timers, but I also learned that some things that I wanted to do required if and else. Which I was excited to work with, but I then found out the hard way that the _on_body_entered var is always void, and therefore I can't have if, elif and else statements. Next time I'll be more careful, or find a workaround to still get the mechanics I wanted. But I didn't have much more time to mess with it, so I settled.

The buttons will reanimate themselves being pushed whenever you step on them, and the gates will reanimate in reaction to each press, too, with opening and closing.I would have wanted to ensure that the animations only played if it wasn't already open, or closed. But I had reached a wall with what I did try giving me errors that made the game fail to play, even when it came to trying to make a scene transition from the main game to a win screen. I had tried to write get_tree().change_scene_to_file([insert scene from file here]), but errors were very worried that switching to another scene would remove my collision shape and break the game. I didn’t find a clear answer online, so I ended up deciding that, for now, I’d make my “You win!” and “Play again” ui directly on the main game instead, in the area where the player enters when they complete the game. Maybe it was because it was under the circumstance of _on_body_entered  with a collision object? I’m so sure I had made my previous attempt-at-a-game in Godot complete the game and enter a menu screen through entering a collision shape, but then again, that was nearly a year ago. Maybe it really is that Godot keeps updating and previous codes go outdated sometimes? But I don’t want to assume and make excuses. I’ll have to revisit this scene transition issue with my next tiny game anyways, so I’ll figure it out eventually. Here is the scene switching video I had referenced, in case anyone was curious what I was referencing. I will admit that he used a button, but once again, I had tried this before with a collision shape.

I'm still really happened that I made this, and that I was able to handle errors long enough to get the essential mechanics to work. It looks janky, and you'll know a newbie made it, but at least it fulfilled its purpose. I need to accept my failures and allow space for me to learn, even if that means making more games that just barely do what they're supposed to do. That's the only way I can start to understand this better, so that someday I could remake this game wayyy better. And ideally more of the assets next time, too!

Leave a comment

Log in with itch.io to leave a comment.