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.
Register on Vultr and then in My Servers click on “Deploy New Instance”:
- 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:
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:
Perforce is free to use for 20 users. If you have more team members you need to pay for using Perforce.
Just type this in your console:
When finished downloading type:
chmod +x install-perforce
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
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.
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:
- 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.
In pending right-click on your change list and submit it.
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.
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:
When you finish your work just Submit:
If you want to revert file open P4V and right-click on the file:
You need to check if you are running out of space or memory. Open your server console.
Checking ram usage:
I have added 5GB project and I’m using 248 MB of 512 ram space.
Checking disk usage:
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.
Implementing game is taking time but writing about it is taking much more effort!