Choosing a VCS (Version Control System) for game development is not as easy as in regular development. Where a choice is a no-brainer these days.
Gamedev is different in that regard because:
- You often deal with large binary assets
- Game projects tend to take much more space than typical software projects
- Team members in a game project are usually of mixed specialization.
- Wide variety of used tools.
You have to deal with these factors when choosing a VCS for your game project. In this article, I reviewed the 3 most popular version control systems used now. I hope it will help you to make a decision.
Perforce
Perforce seems to be an industry standard. A lot of major game studios use it as a default VCS in their game projects. Unreal Engine 4 supports it out of the box. It has all a game developer needs:
- Support for large binaries
- Lock mechanisms
- User-friendly client application.
- A lot of useful tools such as revision graphs, merging tools, etc.
Unfortunately, it does not make Perforce the best choice. If you are a solo indie or even a small team Perforce might be an overkill for your needs. This monster requires a lot of time to set everything up: since there is no free hosting available now you will have to do everything on your own. And Perforce does not really help you in these tasks at all. I set it up on an Ubuntu Server and I wish I spent all time I wasted configuring Perforce on actual game development.
Perforce is not completely free – once you reach certain limits you will have to pay.
Summary
Pros:
- Has all you need for game development
- Integrated into Unreal Engine
- Easy to use.
Cons:
- No free hosting
- Free only up to 1Gb of data and 5 users
- Not easy to administrate
Verdict: if you are a small indie – don’t use Perforce
Subversion (SVN)
Subversion is an old version control system that used to be very popular even among web developers. Now it feels like an outdated product that cool kids don’t use anymore.
But does popularity matter if it handles its responsibilities well?
It also has all a game developer needs, it is easy to use and works fine with large binaries. Unreal Engine 4 supports it out of the box too. Besides that, it is completely free.
SVN due to lack of popularity does not have free hosting available (at least, to my knowledge). But setting it up on your own hosting is not a big deal. The instructions are pretty clear and can be easily found on the internet. I used this one to install SVN on my server: https://tecadmin.net/install-subversion-server-on-ubuntu/
Summary
Pros:
- Has all you need for game development.
- Integrated into Unreal Engine 4
- Completely free
- Easy to use
- Easy to administrate
Cons:
- No free hosting
Verdict: Go for it!
Git
This is going to be the most controversial part of my article.
Git would be, hands down, your best choice if your project consists mostly of text files and your teammates are advanced command line users. I use Git for all my non-gamedev projects. This was a default VCS in all companies I worked for as a web developer.
But unfortunately, this VCS is not a good choice for game development. Here is why:
Git is a distributed VCS, meaning that you have a copy of the main repository on your machine, commit to it, and then push to the main remote repository. Git users often deal with merging their work with the work of their teammates. This is a regular day-to-day task. But what if results of your work are binary assets? Art, blueprints, maps? How would you merge? So a distributed VCS is not always good as it sounds.
Git in its nature was not designed to work with large binary files. Perforce and SVN, on the other hand, allows you locking binary files before editing. In a typical web development project, concurrent change of a binary file is a rare case. However, in gamedev it is a usual thing. Also, local git repository is trashed up really quick if your project has a lot of binaries.
There is Git-LFS extension to git. I still did not have a chance to try it. What steers me away is that it is not a native git solution, meaning that it always needs to catch up with Git. For instance, git does not support file locks, but git lfs does (an early release in April 2020). Does it work together well?
On top of that, I would not call git an easy-to-use tool. If you want to share a file with your team, then you would need to execute the following commands: git add, git commit, git push. Whereas, in SVN and Perforce it would be one: check-in in Perforce and commit in SVN. I am a programmer and I am okay with that. Git used to be my favorite VCS when I worked as a Java developer. But art people, from my experience, are not that really happy if they have to deal with this unnecessary complexity. And in game projects programmers are not always in majority.
Since git is very popular now, there are a lot of free hosting options available. But free tiers are always limited to project size. For instance, 1 Gb of data in Github. In game development, 1 Gb of data can be easily reached if you use a lot of art, textures, models, etc. It is not something unusual.
Summary
Pros:
- Completely free
- Very popular now
- A lot of free hosting options available (but limited)
- Git LFS may somehow solve large binary assets problems
Cons:
- Not easy to use
- Not the best option for binary data repository
- No native file-lock mechanisms
Verdict: I am a real fan of git and I use only git for non-gamedev projects. But I would not consider it as a good VCS for game development
Best VCS for game development
So, what is the best VCS for game development?
Git is getting more popular among game developers. Even in Udemy courses I studied, the instructors recommended using git.
However, my recommendation would still be SVN. When I just started with Unreal Engine 4, I used Perforce. There were some free hosting available. And that was okay for me. In 2019 I had to set up my own perforce server on Ubuntu hosting and I had so much trouble since then. Wasting hours managing some trivial administration tasks was not in my plans, so sometime later, I just switched to SVN and was really happy. I recommend my freelance clients using SVN if they don’t use anything at a moment.
Even in 2020 Subversion is still much of use in game development.