Setting up Perforce in one minute!

When working on a project you would like to have backups and ability to revert files. Another thing is you probably want to work in team. Unreal Engine 4 supports Perforce out of the box. I will show you how to quickly deploy perforce server and set it up!

I will use Vultr as my server provider. It cost only 5$ a month and it will be enough for small teams. Even if you grow you can increase your server specification to match your needs.

Why I’m using Vultr? Because it have big storage disc (not SDD) at really low price. It have couple of gift codes as well.

Registering Account

Register on Vultr and then in My Servers click on “Deploy New Instance”:

server

  • Enable IPv6: Checked,
  • Enable Private Network: Checked,
  • Server Label: perforce,

And click Place Order. You would need to add your credit card.

Opening Server Console

Click on Manage button:

manage

Here you can find a lot of information:

  • Your server IP – copy it somewhere because it will be used for perforce,
  • Your server root user – it’s login name to Ubuntu,
  • Your server default root password – copy it as well it will be used to first login into server,

Now just click View Console.

It will ask you for login:

  • vultr login: root,
  • Password: default password provided in manage screen,

After you successfully logged in – change the password! Just type this in console:

Installing Perforce

Perforce is free to use for 20 users. If you have more team members you need to pay for using Perforce.

To install Perforce I will use Allar’s script which was mentioned in this great tutorial with detailed explanation how to install perforce.

Just type this in your console:

When finished downloading type:

And then:

After installation it will ask you for new user ‘perforce’ password. I won’t use this user, but you need to pass some password. Just make sure after leaving full name etc blank to type “Y” in the question “Are those information correct”

Your server should restart after installation and you need to login again – use root login.

That’s all in server now lets move to clients!

Preparing Perforce Client

To connect to Perforce Server you would need Perforce Visual Client which can be downloaded here. You need to scroll down to find P4V: Visual Client

downloadperforce

If you get alert that default server can be reached – just go forward and don’t run connection wizard.

After installation is complete run P4V.exe

In the server type: YOURSERVERIP:1666

Now hit New User to create user for you.

p4_newuser

You don’t need to add password for the user. I’m leaving it blank as I’m working alone. Type something in email thou – it’s required to save the user.

After creating user we need to create workspace. Click on “New”

  • Workspace name: name of the workspace. Mine is kolos_dupa-PC_5768,
  • Workspace root: this is the folder which perforce will be downloading files,

If you hit OK you will be prompted to upload some file into the server.  Just hit cancel.

Your perforce is ready!

Copying project to Perforce

Go to your workspace root folder and create new folder with name of your project. Now copy your project files into it:

  • Binaries,
  • Config,
  • Content,
  • Plugins, (if you have one)
  • Source, (if you are using C++),

And .uproject file. (which need to be writable)

Then open P4V and just Mark For Add.

makrforadd

In pending right-click on your change list and submit it.

submt

Add description and submit. That will be all – your files will be uploaded to perforce.

Using Unreal Engine 4 with Perforce

Now you can enable Perforce integration in Unreal Engine 4. Open your project file that was uploaded to perforce.

Enable Perforce:

UE_connecttoSourceControl

UE_perforcelogin

If you are using 4.10 you will get alert about checking content browser files – disable this feature.

When saving files UE4 will ask you to checkout files that you want to modify:

checkout

When you finish your work just Submit:

file_submit

submit

If you want to revert file open P4V and right-click on the file:

hisotry

getthisrev

Useful Commands

You need to check if you are running out of space or memory. Open your server console.

Checking ram usage:

free_m

I have added 5GB project and I’m using 248 MB of 512 ram space.

Checking disk usage:

dfh

Other useful commands can be found here.

Installing Mantis on your server

For those that want to have mantis bug tracker installed on the server as well just follow this step by step tutorial.

Creating ShooterTutorial takes a lot of my free time.
Buy Now Button
If you want you can help me out! I will use your donation to buy better assets packs and you will be added to Credits /Backers page as well.

Implementing game is taking time but writing about it is taking much more effort!

5 Replies to “Setting up Perforce in one minute!”

  1. When you say open your project file that you uploaded to perforce….Do you mean the files in my depot folder that I copied from my unreal projects folder, or do you mean the project file in my unreal project folder?

  2. Thank you very much! Worked like a charm and is so much cheaper than Assembla, which I used so far. By much cheaper I mean 1/10 🙂

  3. Very good tutorial! but I am having a very strange issue with the vultr server. For some reason I am getting tickets that I have used 800 GB of bandwitdh when I have not used the server for some days. Do I have to stop the server everytime I don’t use it? I have no idea what is happening, and I followed the tutorial just like you have shown.

    Have no idea what to do 😐

Leave a Reply