Tuesday, March 3, 2015

Perforce: The Good, The Bad, and The Ugly

First things first, let’s talk about why I chose Perforce for my source control when utilizing Unreal Engine 4. UE4 has a built in source control that can be directly linked to your source files with Perforce. You can view the changes that have been made from other developers, dramatically changing the way we program on the team. You can directly use the Engine to submit your work to source and you immediately see what files have already been “checked out.” In other words, you can see what your colleagues are working and can avoid stepping on toes during the development process. The benefit is simple; less wasted time checking to see if you’re going to overwrite someone else’s stuff. So far it has been working out great, especially considering our team all works remotely.

Now I’m not saying Perforce is a perfect tool. We fell into a few troubles early on when working with UE4’s Blueprints and C++. For instance, you are unable to directly merge changes into Perforce with the Blueprints, like you can with C++. If you want to merge blueprint code, rather than having to rewrite your own code, you can “import” your changes to the project source and others can see it and import what they need from blueprints, which is a much slower process. But the biggest Con using C++ is the reliance on Visual Studio. It’s important everyone is using the same version of VS and that it’s set up the same way, otherwise you may run into issues with settings being overwritten and people being unable to open certain files. It’s amazing how the smallest things can cause such major problems...

Good thing Perforce has “Revert” functionality! You can revert previous versions of a working build to isolate any bugs that have been encountered in your most recent build. This has saved us many, many times.

I cannot tell you enough times, MAKE SURE YOU COMMUNICATE FREQUENTLY WITH YOUR TEAM! This is extremely important even when using source control.

After upgrading from UE 4.4 to 4.6 we had a huge issue where all of our systems using custom C++ code were not syncing properly between Perforce and Unreal. We had to come up with this huge workaround that wasn’t even working for everyone, and no one could figure out why this was happening. 

Fast forward a couple weeks of banging our heads against the wall, and Rouzer, one of our devs working on the dialog system, makes a comment about a single .dll that looked out of place. After removing that file, everything was working completely fine. It’s important to make sure that only the files that need to be shared are shared, otherwise you may run into similar problems.

It’s also important to make sure when other people make changes, you can compile them without any issues. The earlier you can spot a problem, the less effort it will take to resolve.

If you're interested in learning more about Perforce, check out their website here: http://www.perforce.com/


NORA is crowdfunding Monday, March 23rd, 2015. For more information, please visit our website here: http://gravtechgames.com/

--
By Roberto Crespo - Development Lead for NORA





No comments:

Post a Comment