Source Control
Source Control with Perforce
Regardless of the game being developed, developers use version control to track changes, keep a backup of history, as well as having the ability to revert their changes. Lumberyard supports, and in fact encourages developers to utilize version control with their projects. Lumberyard development is integrated with Perforce, which is apparent on opening the Lumberyard Editor. Developers not connected to a Perforce workspace or having disabled the Perforce Lumberyard plugin will be warned about lock-files. If another version control is planning on being used rather than Perforce, the Perforce plugin can be disabled by selecting the P4 text on the bottom toolbar and selecting disable (You can find a small grey button next to “Pending Jobs” on the bottom tool bar in the Editor).
Although Lumberyard supports other version controls, such as Git, it is left up to the developer to generate the appropriate ignore files, determine what should be included, and manually add files through an outside interface. Lumberyard’s Perforce Plugin on the other hand provides an interface that makes development more smoothly integrated with version control. In order for the engine to recognize the Perforce server, the settings (same location as the disable mentioned above) can be changed per-user. In addition to setting the Perforce settings, the project folder must be in the Perforce workspace for the Perforce Plugin to natively recognize the project as part of Perforce as well as having the capability of adding, checking out, and determining lock files. This causes issues if Lumberyard was installed in the default location of C:\Amazon and the Perforce workspace isn’t located there. In addition, if a Perforce directory structure is formatted for an organization, rather than for the specific Lumberyard install, the folder hierarchy can be too long to build the engine because of Windows file name limit. The Lumberyard install is packaged with a set of .p4ignores, a file which lists files to ignore from adding to a Perforce server (similar to a .gitignore), structured throughout various folders.
In order to address some of the concerns mentioned above, a tutorial video was created for Project Workbench team members to setup Lumberyard. Developers can use this instructional video in helping all team members once the initial install of Lumberyard is added onto a Perforce server.
Video demonstrating how to setup Lumberyard in the correct folder structure for Perforce version control.