Git vs Perforce for Unreal and Unity projects
A comparison to help you choose the right version control system when working on an Unreal or Unity project.
When you start collaborating on an Unreal, Unity or other game project, you definitely need version control, because working from a Dropbox or shared server will not work. In game development, AR/VR projects or virtual production, the two most popular systems are Perforce and Git. A version control system is the foundation of your pipeline, and this article will help you decide which one is best for you.
Disclaimer: Anchorpoint is developing a Git-based solution, but we will do our best to remain objective.
Git is an open source version control system and the most popular among developers. Git is so popular because of GitHub, a cloud service for storing source code based on the Git system. It is a distributed version control system. You have an exact copy of the files on the server on your computer. Git was introduced by Linus Torvalds in 2005 to aid in the development of the Linux kernel.
Perforce is a proprietary version control system that is very popular in the AAA game development world. It is centralized, which means you are always connected to the server. Perforce was introduced in 1995, 10 years before Git. Perforce is maintained and distributed by Perforce Software, who also provide project and asset management solutions in addition to their version control system.
Because of its open source nature, Git has a huge ecosystem of tools and cloud providers. There's GitHub, Bitbucket, and Azure DevOps on the cloud storage front, and Anchorpoint, GitKraken, and GitHub Desktop on the desktop application side. Just to name a few.
Perforce itself does not provide plug and play cloud storage like Git. The only exception is if you use a service called Assembla, which has Perforce servers preinstalled in the cloud. What you typically do is set up your own Perforce server on services like AWS, Azure, or Google Cloud, which requires a bit more work.
Git is free to use by default. But in most cases, you have to pay for cloud services and a desktop application. Let's say you want to equip your game studio with Azure DevOps and Anchorpoint (which would include version control as well as project and asset management) for a team of 15, you would pay €390 per month.
For Perforce, you could choose hosting on Assembla, which would cost you $783.75 per month for a team of 15. If you want to go self-hosted, you need to ask for a price quote and add server costs from AWS, Azure or Google Cloud.
It's hard to give an exact number of users. What we can do instead is use Google Trends to see that Git is far more popular than Perforce. It's the most popular version control system for software developers. In the future, you can expect more tools, tutorials, and services to emerge around Git.
Git does not provide a robust file locking system. Git's file locking (which is a feature of its LFS module) is not really reliable. On the other hand, a Git client like Anchorpoint has it's own file locking system.
Perforce has a file locking system build in. Files can be easily locked after checkout using a shortcut in your desktop application or Unreal Engine integration.
Speed and stability
Because Git can work offline, you can expect better performance than Perforce when it comes to creating branches or checking out files. Committing is quite fast in Git because it stores the committed file locally and can push (upload) it in the background.
In Perforce, every operation has to be synchronized with the server, which can slow you down on network issues.
Git for artists
Binary file support
With Git's recent improvements, including sparse checkout and partial cloning, you can't really say that Git is bad at scale. Git LFS (the way Git handles large binary files) is included in almost every desktop application and the default Git installer. Tools like Anchorpoint also automate the configuration of the Git LFS and include a way to delete old LFS versions to save disk space. Because Git is a distributed version control system, it must duplicate files internally. This eats up disk space, and is usually the same size as the normal project files. So with Git, you need twice as much disk space as your project size.
Perforce handles binaries very well because it's a centralized system. It does not need to create a large file cache.
Git's cloud solutions are very easy to set up. It is very easy to set up a repository on GitHub or Azure DevOps without any technical skills. Git has a variety of desktop applications that come with a great UX. For developers there is GitKraken or SourceTree and for artists there is Anchorpoint.
Perforce comes with it's own desktop application called Helix P4V. It does the job well, but cannot provide code comparison features like GitKraken or show visual previews like Anchorpoint.
A basic Git workflow includes these steps
- Download the latest versions of all the files
- Do your work
- Publish your files
Anchorpoint essentially reduces the Git workflow to two buttons (download and publish). The command line or other Git applications add more steps and granular control for developers.
Perforce works at the file level rather than the project level. In Git, a version of a project (called a commit) contains multiple files. Perforce focuses on selecting only the files you want to change. However, it is recommended that you always download all new file versions when working on a project.
- Select the files you want to commit.
- Do the work
- Publish your files
Both get the job done when it comes to game development, and as a true version control solution they are much more powerful than a Dropbox. Git does better in terms of performance and feature richness due to industry adoption. Perforce is better in terms of access control.
Proprietary vs. Open Source
Because Perforce is a proprietary system, all the solutions around it (server software, desktop application, asset manager, etc.) come from one vendor. You're locked in and it's extremely hard to switch because the entire production pipeline is based on their infrastructure.
With Git, you choose an open standard and have freedom of choice when it comes to commercial solutions and services. It's a good alternative to Perforce.
Assembla pricing: https://get.assembla.com/pricing-perforce-cloud/
Azure DevOps pricing: https://azure.microsoft.com/en-us/pricing/details/devops/azure-devops-services/
Anchorpoint pricing: https://www.anchorpoint.app/pricing
Introducing a new GitLab integration
Introducing our new integration to GitLab, which creates repositories and add members directly from Anchorpoint. The integration supports GitLab's cloud and self-hosted versions and makes it easy for artists to setup projects without learning a new interface.
How to set up a .gitignore file for Unity
Add a .gitignore file to your Unity project to avoid uploading unnecessary files. Learn how to customize it for your own needs.