Download

Start using version control!

The following is just some friendly advice…

Every once in a while you read about someone having problems with a project that suddenly fails to run, or some file has been corrupted somehow. It’s not very common, but it happens. More commonly, you just break your project by mistake, and if you’ve already saved your changes, getting things back to working order can be a pain. Of course, things can go wrong for many reasons: user error, cosmic rays, harddisk failure, bad hairday… you name it.

The thing is that there is a simple solution for all these situations, and it has been around for ages. UE4 even has built-in integration for it. There is absolutely no reason that anyone should ever have to see their hard work fall into the great black bit-bucket.

The solution is, ladies and gentlemen: version control systems. Your editor can talk to Subversion servers and Perforce servers straight out of the box, so once it has been set up, it’s very simple to use.

Programmers are typically already familiar with this, and wouldn’t even dream of starting a new project without it. However, since UE4 is so incredibly artist-friendly, there’s probably a lot of people around here who have never used version control or even know it exists.

I simply wanted to point this out, and hopefully encourage anyone who doesn’t currently use it to start now. Like right now. This weekend.

So, what does version control do? It stores the changes you make to your project files. It keeps track of assets you add to and delete from your project. And it maintains a history of all these changes, so that if anything goes wrong at any point, for any reason, you can always check out a previous revision of your project and get back to a last known working state. You only lose whatever work you did between the good revision and the current state, rather than the whole thing. There is a ton of other things you can do as well, but I’ll stick to the basics here.

In a basic workflow with version control, you do the stuff you intend to do, then you submit the changes to your version control server along with a log entry where you write down what you have done. When you submit, the current state of your project is saved with a revision number, like a numbered snapshot of the project state at that very moment. This includes your blueprints, meshes, maps…

This is like a backup system on steroids. It gives you peace of mind. Want to try something crazy with your PlayerController Blueprint, even if you know it will force you to change a bunch of other blueprints as well? Just go ahead. If it doesn’t work, you simply revert your changes, and everything goes back to the way it was before. Did something stupid just before going to bed yesterday, and committed those changes? Just roll back to the previous revision and keep working.

To make a long story short, if you value your time and work, you should use some kind of version control.

This does not mean that you need a dedicated server. You can run it on your main workstation if you want. Or, better yet, you probably have an old PC somewhere on your home network that can be repurposed as a server.

The server software doesn’t even have to cost you a dime.

If you are a Windows user, check out http://www.perforce.com or http://www.visualsvn.com/ or http://tortoisesvn.net/ (client only)

Getting everything set up can be a bit of a chore, there is no denying that, but once it’s done you can give yourself a pat on the back. And a few weeks later you can hit yourself on the head because you didn’t think of this several years ago.

My personal setup is an old workstation peacefully humming in my closet. It runs an svn server on CrunchBang linux. My workstation and my laptop both have the TortoiseSVN client installed for anything that falls outside of the capabilities of the UE4 integration. If you are interested in going the Linux route, there’s an exellent setup guide here: http://stackoverflow.com/questions/60736/how-to-setup-a-subversion-svn-server-on-gnu-linux-ubuntu

The main advantage of running your own server (or a local repository on your workstation/laptop) rather than some online service is that you don’t have to worry about diskspace, and file transfers back and forth are really fast on your LAN, or even faster still if you run both the server and UE4 on the same machine (although I find that a separate server is more convenient and safer because it means you always have your latest files on two different computers at all times).

Anyway, if you’re not using version control - start using version control! Can’t be more blunt than that… Yes, there will be some initial head-scratching, but rest assured, you will thank yourself in the long run. Make this weekend a version control weekend. I don’t ever want to hear about anyone losing work from now on!

Well, that’s all I’ve got for now. Feel free to chip in if you have any related information to share!

Nice post! :smiley: Thanks for taking the time to explain all this to warn the community. :slight_smile:

It’s always a great idea to back up your work, and version control is a great way to handle it (especially if you’re pushing to an offsite repo). It’s not for everyone, for sure, but if you can get in the habit of using it, you’ll save some heartache down the line at some point. It’s also like “save points” for your project.

UE4’s Perforce integration is great. I rarely ever deal with P4V itself.

I’m new to Perforce, figured I’d try it out since it’s free now and I’ve used most other version control, might as well learn it too. I gave up on getting it up on Assembla’s hosting though and have my own server locally for the moment, backed up to external drives.

Thanks for this post! I just got Perforce set up (just using it locally for now, but I’ll probably set up a separate server machine once I start getting into serious projects) and it seems pretty easy to use once it’s all set up. Even as someone who’s working solo for now, I can definitely see the benefits for keeping a record of all my changes that I can easily revert to if needed.

I have no idea how to work with Perforce (what to download, how to setup, how to connect etc) so am currently using SVN with Assembla. :frowning:

You’ll find all the tutorials you need to set up Perforce Server & Client at Perforce.com as they’re applicable to UE4. Assuming you want to set up your own P4 Server, I would recommend installing on separate machine, not the same machine your UE4 Editor + P4 Client are installed. Otherwise the Depots and Workspaces can get really confusing. Once you have a P4 Server address to connect to and P4 Client installed, you can set up UnrealEditor with these directions.

I dont have a separate machine :(. IIRC assmebla offers perforce hosting…right?

“Save points” is an interesting analogy. Like it!

Assembla Perforce Hosting free for up to 20 users.

EDIT: Nevermind about my user question. But what i really want to know is how much space we get for Assembla Perforce Personal Plan. Is it 500MB Storage?

How’d you get that? All I can find is free for 2 people and only 500MB

i’d also be interested to know if anyone can recommend a free or very cheap way of doing this?

Agreed completly!, I Only started using version control software this year and its been a massive difference in development iterations as well source control , Tons of times smoother than having to go trough a google drive server and ctrl c + v everything :smiley:

Perforce and Assembla Partner to Deliver a Cloud-Hosted Solution That Accelerates Agile Development. See Availability and Pricing

One of many reasons why I turned a old workstation into a in home server.

Bit bucket for Life!

Thanks for the write up. Looks like im gonna be busy.

That’s the way to go, really.

Agreed, this and GitHub.

My team started using git recently, I was scared of it at first but now I never want to go back to perforce or SVN, even if they have editor integration and git doesn’t. Being able to branch, merge, and pull request easily is just the greatest thing.

That being said, I’m not sure there is anything I wouldn’t give for git integration in the editor, and/or the ability to merge and diff blueprints through an external tool so that it can be hooked up to SourceTree or something.

Thanks for this thread!
Yesterday I had to re-create my game project because some of the project files were corrupted for any reason and there was no way back, no matter what I tried.
Luckily the project was very small at this time and it didn’t take me much time to do so… ^^

I guess this version control thing would be right for me :wink: