Subversion Source Control for Game Development
Tags: gamedev, productivity, sourcecontrol, svn
Published: 2020-04-30 09:57:21


Subversion Source Control for game development 
==============================================

*This is part of a [series of posts](http://kahncode.com/category/source-control-comparison/) on source control for game development. Read more in the [Blog](http://kahncode.com/blog/).*

We couldn't reach the end of this series without talking about a source control giant, I'm talking of course about [Subversion](https://subversion.apache.org/) or SVN for short.

Every programmer should have heard of Subversion. Its massive popularity from the 2000s until today has only been outshined by Git fairly recently. In the games industry, SVN remains a very popular choice due to being free and implementing the file-based source control model which maps so well to our needs, as outlined in the previous articles. While not a common choice in larger studios, smaller ones and indie teams have long been using SVN as their backbone and for good reason.

Personally, I haven't used SVN since my early programming days, and never in my professional career. This article was a good opportunity to get familiar with it again and see how it competes against the other solutions we have studied so far.

So, is SVN a good source control solution for game development? Let's dig in!

Background and History
----------------------

Subversion was [started in 2000](http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.intro.history) as a replacement and improvement over [CVS](https://en.wikipedia.org/wiki/Concurrent_Versions_System), the most popular version control at the time. The main goal in designing Subversion wasn't to reinvent the wheel or a new source control model but to have a better CVS, without the bugs and the features deemed unnecessary or badly designed.

Subversion has since then become a pillar of the software development world, overtaking CVS and becoming the standard for many years, both in the open-source communities and in the enterprise world. Subversion 1.5, in particular, was a major release that introduced highly needed features, most notably automated merge-tracking which is seen today as essential in a source control solution, as well as mirroring capabilities.

In 2010, Subversion became part of the [Apache Software Foundation](https://www.apache.org/), one if not the most well-known organization maintaining large open-source projects. Apache now oversees the ongoing development and distribution of the rebranded Apache Subversion and is still looking for contributors to the project, in true open-source fashion. Recently, Subversion celebrated its [20 years of existence](https://blogs.apache.org/foundation/entry/the-apache-software-foundation-announces58) and is arguably still the most widely used source control solution today.

While it has certainly lost some of its popularity with more recent open-source projects in the age of GitHub, Subversion is used by many large open-source projects and in many organizations. Subversion doesn't benefit from a large platform such as GitHub, but it remains a robust and proven solution. Existing projects and organizations may not want to pay the cost of migrating, especially when the development community at large becomes more aware of the [limitations of Git and DVCS](http://kahncode.com/2019/11/05/git-source-control-for-game-development/) they may have to contend with.

Features
--------

The official website lists the main [features](https://subversion.apache.org/features.html) of SVN. Here we will go through what is relevant for us.

### Centralized source control

SVN was designed as an improvement over CVS, which was centralized version control. Even though distributed version control existed at the time, a centralized model appears logical and simpler. Even in open-source projects, there is a central or "blessed" repository where the official releases emanate from. In enterprise projects, a centralized repository allows for better access control over the intellectual property stored in the version control system.

The centralized is generally the way game development teams collaborate on game projects. This implies that, in order to share changes to others, you need to be connected to the central server. This should not be an issue in our day and age, but it does mean that you cannot easily work offline and keep a local version history. As we will see later, there are in fact workarounds to this issue.

### File-based model

SVN uses a traditional file-based model to track changes. Each object has a revision number, and each change is tracked by a globally unique incrementing number. This is very similar to other version control systems such as Perforce, and is very easy to follow and understand, especially in comparison to Git's SHA hash-based revision identifiers.

There are notable features of SVN's source control model that aren't commonly found in other. Directories are versioned as first-class objects, in the same way files are. [Properties](http://svnbook.red-bean.com/en/1.7/svn.advanced.props.html) in the form of key-value pairs are versioned with each object (file or directory), which allows you to embed extra information, and potentially has creative uses.

[Branching](http://svnbook.red-bean.com/en/1.7/svn.branchmerge.using.html) is done through the "copy" operation. This can sound strange at first, but a branch is, in fact, a copy of the entire repository in another directory. This is how most older source control systems operate with branches. Fortunately, there are series of commands that allow you to treat branches the same way you would in Git, and not have to actually maintain two directories with two versions of the project on your own machine. Internally, branches are managed using a [copy-on-write](https://en.wikipedia.org/wiki/Copy-on-write) mechanism, so branches are not as costly as they may seem, and the cost of branching does not increase with the size of the data in the repository.

Still, branching and merging is not as simple an operation as you may have gotten used to with Git. More importantly, branching is a server-side operation due to the centralized model of SVN. This means branches are visible to all users, and for that reason, managing branches is reserved for privileged users or administrators of larger repositories. Using feature branches for small development is usually not recommended, instead, you may use the [shelving](https://subversion.apache.org/docs/release-notes/1.10#shelving) feature, which is similar to Git's stash.

SVN has an interesting feature in the form of [properties](http://svnbook.red-bean.com/en/1.7/svn.ref.properties.html). Properties are key-value pairs that can be attached to any SVN object, such as a file, directory, or revision. SVN itself uses properties to implement some of its advanced behaviors and features, for instance, file-locking. You may also creatively leverage properties for anything required in your workflow, such as tagging certain files or using it for automation.

### User experience

#### Setup and administration

Setting up SVN can be challenging for non-technical users. The [website](https://subversion.apache.org/) and the documentation definitely have this old-school open-source look and feel, which could deter some people. The most complete documentation comes in the form of a [free book](http://svnbook.red-bean.com/), affectionately known as The Red Book, which is curated and kept up to date by the SVN community. You can consult the [HTML version](http://svnbook.red-bean.com/en/1.7/index.html) directly on its website, and we will refer to it throughout this article.

The first barrier of entry is that the Apache Foundation does not distribute binaries for subversion. You must [download the sources](https://subversion.apache.org/download.cgi) and compile them yourself. They do, however, reference trusted [sources of binary packages](https://subversion.apache.org/packages.html) for you to download the version that matches your OS. For most of us, this means Windows, and I'll recommend using [Tortoise SVN](https://tortoisesvn.net/downloads.html) which also brings a very practical Windows Explorer contextual menu extension and a graphical user interface.

While installing Tortoise SVN, don't forget to install the command-line tools. Without those, you won't really have SVN installed.

![](https://i0.wp.com/kahncode.com/wp-content/uploads/2020/04/tortoise_svn_setup.png?resize=495%2C387)

When you first create a SVN repository using Tortoise SVN, you will be asked if you want to use the default folder structure. This creates directories for *trunk, tags,* and *branches* which are pretty self-explanatory. You should use the standard folder structure to start with, as most of the tooling around SVN is configured to handle these by default. Of course, it is up to you to decide how you want to structure your repository, and where you want to store your branches. SVN offers you all the flexibility you need through the copy command, and those folders are merely a convention for the users to follow.

![](https://i2.wp.com/kahncode.com/wp-content/uploads/2020/04/tortoise_svn_repo.png?resize=433%2C216)

#### Command-line

SVN's command line uses terms and verbs that have come to be the standard vocabulary when talking about source control, and are understood by most. Most of the semantics we use for source control nowadays can be traced back to historical software, notably CVS, from which SVN takes most of its roots. This means SVN's command line is intuitive and easily understood, unlike Git's which introduces many new terms and confusing mechanics.

All of the commands are well documented in the Red Book, and for the most part, I didn't have to consult the documentation much when operating on them. To get started quickly, you can learn the basics in a few minutes on the [official SVN website](https://subversion.apache.org/quick-start).

All of the command-line output is designed both for human readability and for parsing by scripts and automation tools. On top of that, [API bindings](http://svnbook.red-bean.com/en/1.7/svn.developer.usingapi.html) to several popular programming languages allow users to interoperate with SVN more efficiently and without having to start multiple processes and parse outputs.

Overall, the command line takes some time to learn but it is relatively straightforward. The commands are single purpose and with a wealth of options, and the mental model of the source control repository is very simple to follow. Some commands have several logical ([or funny](http://svnbook.red-bean.com/en/1.8/svn.ref.svn.c.blame.html)) aliases for convenience, so you should feel at home quickly no matter what other source control you may be used to.

#### Graphical User Interface

The Apache Subversion project does not provide, maintain or endorse any Graphical User Interface. As is true with everything SVN, you will have to find your own tools to attach to the version control core. You can find a [list of SVN clients](https://en.wikipedia.org/wiki/Comparison_of_Subversion_clients) on Wikipedia.

In the context of writing this article, I have tried two popular SVN clients on Windows. They both provide graphical tools as well as a Windows Explorer contextual menu integration.

##### Tortoise SVN

I've already talked about [Tortoise SVN](https://tortoisesvn.net/downloads.html) before in the setup guide. Tortoise SVN has been popular for as long as I can remember and is fully free and open-source, released under GPL license.

The main way to interact with Tortoise SVN is through the contextual menu integration. Right-click on any file or folder and the Tortoise SVN menu offers pretty much every possible action.

![](https://i1.wp.com/kahncode.com/wp-content/uploads/2020/04/tortoise_svn_menu.png?resize=609%2C802)

Unfortunately, there is no Tortoise SVN integrated tool. Everything is done through the windows explorers and popup dialogs. Personally, I think this is a worse user experience, as I often want to see an overview of my repositories and rapidly get information over many things in my repository. On top of that, not all of the dialogs are created equal. They can differ in style and useability, and some are clearly more polished than others. For instance, the revision graph view could be made much more compact and user-friendly. Still, Tortoise SVN is very useable in its current form and will continue to be the workhorse of many developers.

![](https://i2.wp.com/kahncode.com/wp-content/uploads/2020/04/tortoise_svn_commit2.png?resize=704%2C554)

![](https://i2.wp.com/kahncode.com/wp-content/uploads/2020/04/tortoise_svn_log.png?resize=737%2C612)

##### SmartSVN

[SmartSVN](https://www.smartsvn.com/) is another Graphical User Interface that caught my eye. It seems to be from the same developers as [SmartGit](https://www.syntevo.com/smartgit/), a popular Git client.

SmartSVN has a free version and [a paid version](https://www.smartsvn.com/purchase/). The free version contains only a [subset of the features](https://www.smartsvn.com/compare-editions/), and obviously the most advanced operations are left out.

While SmartSVN also provides a contextual menu integration, it presents itself first and foremost as a standalone tool. Using SmartSVN feels very familiar coming from Perforce. The main view is a repository view where you can browse for all files and see their status. You can use the toolbar to perform all the main operations, such as Adding and Removing files, Updating, and Committing.

![](https://i2.wp.com/kahncode.com/wp-content/uploads/2020/04/smartsvn.png?resize=1008%2C670)

You can browse the [full list of features](https://www.smartsvn.com/features/) on the SmartSVN website. There are important features only present in the paid version of SmartSVN:

-   Changesets, allowing one to separate modified files in several commits.
-   Merge and conflict resolution. Alternative and probably better tools are readily available for this.
-   Revision Graph, very useful to visualize changes of a file through branching and merging.
-   JIRA Integration, often useful in professional projects.

The user experience of SmartSVN is, in my personal opinion, much better than that of Tortoise SVN, and the price could be well worth it. Alternatively, I'd consider using the free version alongside Tortoise SVN, command-line, as well as other tools. The paid version of SmartSVN seems to be the most advanced and well-integrated SVN client available at this time.

#### Code review tool

SVN does not come out of the box with a code review tool. There are several third-party [options to choose from,](https://en.wikipedia.org/wiki/List_of_tools_for_code_review) some are free, and some others come at a premium.

Out of all the tools listed, I would recommend looking at:

-   [Review Board](https://www.reviewboard.org/), free and open-source. While lacking in features compared to paid competitors, it's done the job for many companies and I've used it myself professionally.
-   [Collaborator](https://smartbear.com/product/collaborator/overview/), probably my favorite code review tool, but the price is steep.

#### Diff and Merge tools

SVN does not provide Diff or Merge tools out of the box either, outside of the command-line utilities.

SVN can, fortunately, be configured to use an [external diff tool](http://svnbook.red-bean.com/en/1.7/svn.advanced.externaldifftools.html). You are free to choose yet again from a variety of options, free and paid. For those of you looking, here are some to consider:

-   [Meld](https://meldmerge.org/), free and open-source, written in python. Well featured but sometimes slow.
-   [P4Merge](https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge) is actually free, and this has been my workhorse for my entire career.
-   [SemanticMerge](https://www.semanticmerge.com/) from the company behind PlasticSCM. A paid solution, but with unique features. I went in more detail about SemanticMerge in my [PlasticSCM breakdown.](http://kahncode.com/2020/02/19/plastic-scm-source-control-for-game-development/)
-   [Beyond Compare](https://www.scootersoftware.com/), a popular paid tool. I've also used this and enjoyed it, but I did not see enough benefit to warrant buying a license for myself.

Useability for game development
-------------------------------

### Handling large projects

SVN has proven time and time again to be dependable for game projects. Many independent studios have chosen SVN for their source control because of its price and file-based model. Therefore, we can safely say that by using SVN, you cannot go entirely wrong.

However, it is also known that SVN has performance issues on larger repositories, and generally, this is the main argument its competitors, namely Perforce and PlasticSCM, use as the first real reason to consider switching. It's going to be very hard for me to evaluate SVN with a very large project that would recreate the enterprise conditions, so I can only take the testimonies at face value by saying: SVN is generally less performant than Perforce and PlasticSCM.

Still, SVN handles binary files very well and its model should scale relatively well according to our use cases. Two lines on the [features](https://subversion.apache.org/features.html) page stand out:

-   ***Binary files handled efficiently.*** *Subversion is equally efficient on binary as on text files, because it uses a binary diffing algorithm to transmit and store successive revisions.*
-   ***Costs are proportional to change size, not data size.*** *In general, the time required for a Subversion operation is proportional to the size of the changes resulting from that operation, not to the absolute size of the project in which the changes are taking place.*

This should put you at ease when it comes to managing the binary files your game project will be filled with.

SVN can be brought up to an enterprise level by leveraging several features and extensions, some built-in and some using third-party software and services. SVN has been successfully used in enterprise scenarios for many years, in fact, the [debate is still ongoing](https://svnvsgit.com/) as to whether Git is really an improvement over SVN in many cases, and I tend to agree with some of the points made.

[VisualSVN Server](https://www.visualsvn.com/server/) seems to be the most common server on offer, and it comes with multiple features useful for enterprises:

-   ActiveDirectory / LDAP integration, which enables Access Control features
-   For globally distributed teams, offers the ability to replicate your repository on remote sites in write mode
-   Backup and restore policy
-   Logging and auditing features

VisualSVN Server [is unfortunately not free](https://www.visualsvn.com/server/licensing/), though it seems to be the best enterprise SVN server available. Some of these features can be solved through other means, such as using [svnsync](http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.reposadmin.maint.replication) to create read-only copies of your repository, but then you'll have to manage them yourself.

SVN also contains all the more advanced source control features you might need, for instance, you'll find an equivalent to Git's submodules in the [Externals](http://svnbook.red-bean.com/en/1.7/svn.advanced.externals.html) feature of SVN. This really shines when you are managing multiple projects at once.

There are also some more exotic tools that I found when doing my research. For example, [SVK](http://elixus.org/nightly/en/svk-book.html#svk.intro.whatis) is an SVN client that adds more operations and allows for offline and decentralized workflow. I can't vouch for it as I haven't used it, but this goes to show that there is probably a solution out there for most of your SVN problems.

### File-locking

File-locking is [fully supported by SVN](http://svnbook.red-bean.com/en/1.7/svn.advanced.locking.html). On top of the basic locking and unlocking features, SVN allows for a user to leave a message to explain why they locked a particular file, which is a surprisingly simple and useful addition that I haven't seen elsewhere.

There are also ways to override locks when necessary. Of course, there are traditional administrator commands, but on top of that, SVN allows users to break and steal locks from other users. Of course, this is configurable and you may allow only privileged users to break locks instead of everyone. This can become useful when someone goes away for some reason while having the lock on a file, and you don't always have an administrator available to help.

Finally, files can be tagged to require a lock, and SVN will automatically set the file mode to read-only when you don't have the lock. This works beautifully and avoids making mistakes and wasting time.

Ecosystem
---------

SVN has a long history and was very popular before the age of Git. Therefore, we should expect a great ecosystem that includes everything we need.

### Integrations

SVN is well integrated with most typical development tools, such as IDEs and Continuous Integration tools. Here are some of the most useful for us:

-   Visual Studio, the IDE you're most likely to use, has an up to date [SVN integration](https://marketplace.visualstudio.com/items?itemName=VisualSVNLimited.VisualSVN-VS2019).
-   [Jenkins](https://plugins.jenkins.io/subversion/) and I'd expect most Continuous Integration tools.
-   Unreal Engine has [first-class support](https://docs.unrealengine.com/en-US/Engine/Basics/SourceControl/SVN/index.html) for SVN, and the plugin is available out of the box when downloading the engine. Sadly, [Unity does not](https://docs.unity3d.com/Manual/ExternalVersionControlSystemSupport.html).
-   Project management and bug tracking tools such as Jira also often support an [SVN integration](https://marketplace.atlassian.com/apps/291/subversion-integration-for-jira?hosting=server&tab=overview).
-   Communication apps such as [Slack](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=2ahUKEwj8767C5PfoAhUMJhoKHaAEAMsQFjAAegQIBhAB&url=https%3A%2F%2Fslack.com%2Fapps%2FA0F827LTA-subversion&usg=AOvVaw0Q-SoU_nqntaDjIDSTdk0L) or MS Teams.

SVN is almost as well supported if not better than Git. Of course, most modern software will aim to interoperate with Git before SVN these days, but there is more than enough to be happy with and to satisfy all of our workflow needs.

### Interoperability

SVN used to be the ubiquitous source control, which makes it a prime target for competitors trying to convert users. Here are a few bridges between SVN and other source control software:

-   [git-svn](https://git-scm.com/docs/git-svn), an officially supported bidirectional integration between Git and SVN. You're most likely going to need this even if you use SVN as your primary repository since it's likely that you will need to collaborate with third-parties using GitHub.
-   [HgSubversion](https://www.mercurial-scm.org/wiki/WorkingWithSubversion), a bidirectional bridge with [Mercurial](https://www.mercurial-scm.org/).
-   Perforce provides a [migration guide and toolkit](https://www.perforce.com/resources/vcs/subversion-migration-toolkit)
-   [PlasticSCM](http://blog.plasticscm.com/2015/09/moving-from-svn-to-plastic-scm-how-we.html) recommends using git-svn and their own Git interoperability tools

### Hosting

SVN has been around for a long time, and it is not surprising to see many providers of cloud hosting. Unfortunately, there isn't a hugely popular website setting the standard, so we'll have to dig ourselves to find the best options. Fortunately, Wikipedia contains a good [overview of source control hosting](https://en.wikipedia.org/wiki/Comparison_of_source-code-hosting_facilities) we can start from.

Here are some of the notable providers:

-   [SourceForge](https://sourceforge.net/), one of the most well-known hosting providers for open-source projects. SourceForge offers both the project management backend and provides a landing and download page for the software for its users.
-   [Assembla](https://www.assembla.com/pricing), which is also the sole provider of cloud Perforce hosting, and can be considered a reliable hosting provider. The lower tier starts at $9.16/user/month for up to 5 users and 5GB of storage. Above this threshold, the price goes to $14.67/user/month with "500gb+" storage included.
-   [Helix TeamHub](https://www.perforce.com/products/helix-teamhub/pricing) by Perforce. Free up to 5 users and up to 1Gb storage. The paid tier comes at a very low $19/user/**year**, but still with a relatively limited storage capacity.
-   [Cloudforge](https://www.cloudforge.com/pricing), for $2/user/month, but the storage capacity is tied to the number of users. Higher tiers allow for more storage.
-   [Phabricator](https://www.phacility.com/pricing/), an open-source hosting provider platform. While it is $20/user/month for the cloud option, Phabricator is a very good choice to host internally to manage your projects and repositories.
-   [RhodeCode](https://rhodecode.com/pricing) provides enterprise solutions starting at $8/user/month, with increasing costs depending on the hardware and storage capacity chosen.

Most of these providers have been active for a long time, and it also shows on their website and their offers. On this front, SVN does not enjoy the modern luxury that Git hosting has become. The user experience and features of the above are most likely not up to par. More importantly, neither is the pricing model, especially in light of [GitHub's recent pricing updates](http://kahncode.com/2020/04/15/github-is-free-for-teams/).

That being said, this is not such a big issue if you're considering SVN for your game development project. Any of these solutions will give you a server with high availability, and that is all you really need. You can use other tools for project management if your hosting provider's platform does not meet your needs. For smaller teams, you should be fine using those.

Pricing
-------

SVN is free and open-source. However, source control for game development can never be completely free.

You will have to host your project in a shared location, either on the cloud or on-premises. We touched on the cost of cloud hosting before. Of course, you may host SVN yourself on your own hardware, or using public cloud instances. The costs and maintenance involved can vary widely to be as expensive as you make it: hardware purchase and maintenance costs, backup and restore strategy, network infrastructure, and so on... It is up to you to find the best solution for your team size, configuration, and most importantly, your budget.

In comparison to its competitors in our study, SVN is the second cheapest source control for game development. Its cloud hosting options are more expensive than Git, but there are no license costs of any kind. For the budget game developer, and considering the technical [limitations of Git for game development](http://kahncode.com/2019/11/05/git-source-control-for-game-development/), it appears to be the cheapest, and therefore the best choice.

Conclusion
----------

Subversion is a robust and proven software. It was once the dominant source control solution and remains very competitive to this day. It is free and open-source, still being maintained, and has an active ecosystem, even in the age of Git. I would love for SVN to have a more visible roadmap, as the [current one](https://subversion.apache.org/roadmap.html) doesn't provide much information. Some versions of SVN benefit from Long Term Support which is good news and a strong guarantee for you if you're starting today.

While the bulk of the software industry has moved on to the next shiny thing, SVN remains a very relevant source control for game development. Why? Its file-based model is exactly what we need, and its handling of binary files is only surpassed by expensive proprietary software such as Perforce or Plastic SCM.

SVN's flaws come mostly from its open-source legacy and its age. Much like Git, SVN is only the command-line core of the source control and does not provide the full package of tools and integrations a user will need on a day-to-day basis. Unlike Git, the tools and web services that are part of the SVN ecosystem aren't up to the latest standards of user experience and design. You will, therefore, have to research and choose for yourself which tools to use on top of SVN, and you may allow each of your team members to go with what fits them best.

But this is mostly cosmetic, and while cosmetics matter very much to some, it should not be the most important aspect for you if you're in business for a source control solution for your game development project. Price and features are the primary axes of comparison, and on that front, SVN is by far a better solution than Git. If your budget allows, then probably PlasticSCM or Perforce would offer either more features or more performance. For independent developers, it is often not worth the cost, and it explains why SVN has found a niche there.

*We're reaching the end of the in-depth studies in this series. In the final article, I will try to reach a conclusion from all the learnings, and a summary for those of you who are still (but rightfully) confused.*