The Importance of Version Control in Game Development
| Brian Hamlin
Version control is a system that helps you manage changes to your code over time, allowing you to track revisions, collaborate with others, and most importantly in this case, prevent the loss of your work (assuming you host the code in a remote repository). It is not exclusively for games, but is a fundamental pillar of software development as a whole. In fact, even this website has a repository on GitHub where I manage all of the source files and content.
Project Photon was one of my first game development projects, technically begun around the summer of 2009. Although it has certainly changed over the years, the core idea remains the same: to recreate the classic feel of Halo 3 in an environment I had full control over. After about four years of development, I had much of the core gameplay in place. Multiplayer was working (and surprisingly stable), and the game was starting to feel like a cohesive experience complete with an expanding weapon sandbox and even player customization.
However, one day I woke up to Windows 10. You see, up until that time, I was running Windows 7, which was the standard at the time (poor Windows 8 stood no chance). I wanted what Windows 10 had to offer (yes, there was indeed a time when Windows 10 was not entirely infested with AI spyware and 50,000 programs pre-installed). I took Microslop up on their offer to upgrade for free, and thought I had everything accounted for in my personal manual backup. I remember double, then triple-checking. I had my documents, my photos, music, game saves, etc. Seemingly everything. Except the source code. All of it was gone when I booted up to the Windows 10 desktop. Erased. I cannot even begin to describe what that felt like.
This loss caused me to take a long break from game development. It was quite defeating, to say the least. Years of progress, everything I had worked on, all gone. I now had nothing to show for it all.
Through an act of divine intervention, I did discover that I had an old build of my game backed up. It was not the source code, but I still had something. A few years would pass and I discovered ways to reverse engineer that build to let me examine the source code. I was able to essentially reconstruct the game slowly, piece by piece, until finally I had a mostly complete project I could work with again.
By this time I was already introduced to the idea of version control, as it is a standard practice in the industry (but me, being self-taught in most things, had not been aware of it at the time). As soon as I got a working project again, I immediately set up a Git repository for it to ensure I would never lose it again. If you are new to development, I cannot stress enough how important it is to start using version control right away. It may seem like an extra step at first, something new you have to learn, but oh boy is it worth it.
Don't be like me. Be better!