Perforce C++ practices

Here are a couple questions, but they are all regarding a workflow using a Perforce server with more than one person working on the project.

What files is it ok to not upload in Perforce?

How do you handle multiple people building the project?

I uploaded everything in the project to Perforce, the other person working on it is an Artist and will never need to edit C++ or build the project. Did I upload too much?

Everytime I want to build the project, I check out the entire Binaries and Intermediate folders. Is that overkill? Is the Intermediate folder necessary to even have checked into the repo?

Also, I’ve had some difficulty getting the Perforce module integrated into the project, I use VS2012 Ultimate and have the perforce plugin, but in the Rocket Project I don’t see where to set the Perfroce settings, so I have been checking the files out by the P4V windows gui. It would be nicer if could do it from within Visual Studio. I’m not sure if I just havn’t set it up right, or if the project type doesn’t allow for it.

Hello Michael,

What files is it ok to not upload in Perforce?

  • You should not submit your MyGame/Saved, MyGame/Intermediate folders or the Engine/Intermediate or Engine/Saved folders. You should also avoid submitting your .sln, .sdf, or .suo files as they are generated for visual studio projects (which are locally generated on each machine)

How do you handle multiple people building the project?

  • Binaries are checked in with +w on the file type so those who build the project do not run into “File is read-only” errors. We have a build system that triggers periodically which builds and checks in binaries so non-coders can run the editor or game without building. You probably wont need that much in a small team, so you should be good just to check in the binaries you build every once in a while to provide updates.

I uploaded everything in the project to Perforce, the other person working on it is an Artist and will never need to edit C++ or build the project. Did I upload too much?

  • It does not hurt, but only increases the download size. Our artists do not sync down the Engine/Source or MyGame/Source folders. These folders are excluded in their P4 workspaces.

Everytime I want to build the project, I check out the entire Binaries and Intermediate folders. Is that overkill? Is the Intermediate folder necessary to even have checked into the repo?

  • As mentioned above, don’t check in the intermediate folder and mark your binaries as +w.

Also, I’ve had some difficulty getting the Perforce module integrated into the project, I use VS2012 Ultimate and have the perforce plugin, but in the Rocket Project I don’t see where to set the Perfroce settings, so I have been checking the files out by the P4V windows gui. It would be nicer if could do it from within Visual Studio. I’m not sure if I just havn’t set it up right, or if the project type doesn’t allow for it.

  • We use P4VS. This does not really have much to do with Rocket, we just choose to use it because it has worked well so far. With this plugin, you set up your connection by selecting File->Open Connection to a Perforce Depot. Your perforce plugin may vary in setup instructions so you’ll need to find the documentation for the plugin to get it set up.

Thank you. These answer my questions very well.

What about shaders. Could we also use a similar system?
Where we could submit the compiled shaders to perforce with a w+ access?

Would that also make sense?