The Big Refactoring - Chapter 0
Anthuulos
Posted on October 15, 2024
Hello everyone!
Welcome to this first chapter of my adventures as Town Alight’s main coder. This is the first of many diary entries in which I’ll explain the significant changes we’ve made in Town Alight since we published its first version. After publishing each entry, I’ll answer any questions you have about Town Alight’s development; remember, we’re always open to feedback.
Chapter 0: But why, tho?
The first diary in this series is called “The Big Refactoring.” While we have big plans to expand Town Alight, we encountered many issues with how the Game Jam version of the game was working behind the scenes. We wanted to improve its performance and readability, so this became our first priority before even beginning to implement new features. You may ask: “Why didn’t you develop it well in the first place?!” First of all, how dare you?! Second of all… you’re completely right; but there were a few reasons:
Godot newbies
As some of you might know, Town Alight is being developed in Godot. What you might not know is that both Doops (the artist) and I, Anthuulos (the coder), are relatively new to Godot! Before starting the project, Doops had begun his game dev journey a few months ago. For my part, I had developed games in Unity for about 7 years before only starting to learn Godot a month ago. This led to learning concepts on the go while developing the game, using non-optimal techniques to get where we wanted to go.
Deadlines
Town Alight was developed for PirateSoftware’s 2023 game jam, which required us to create a functional game in just 2 weeks! This forced us to make decisions that resulted in a horribly disorganized game but ultimately made it work. I remember saying to myself, “This is awful code; shame on me,” while coding at 2 AM. But hey… the game did what it had to do for the moment, so I regret nothing!
Design Experience
This is still an issue, at least for me. I confess that I have no sense of aesthetics whatsoever. Many times, I want to show the player all the data I’m using to make the game work, but the reality is that most players don’t care about this; they just want a simple HUD that allows them to make decisions without having to look at a million numbers on the screen. With your help and feedback, I’m sure I’ll be able to overcome this personal obstacle.
So, here we are—many months later—looking in horror at my old code and wanting to erase everything and start from scratch. But I won’t! Instead, I’m going to show you what changes were made to the game to optimize many of its processes. In the first chapter, I’m going to discuss something both Doops and I ended up hating: making the whole game based on tiles without room for more complex behaviors.
I hope you like this series, and I’ll see you soon in the first chapter of The Big Refactoring!
-Anthuulos
Posted on October 15, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.