Skip to content

Commission New Lyra Starter Game Project

n8bot edited this page Nov 28, 2023 · 16 revisions

Introduction

Create a multiplayer-capable game project using Unreal Engine (UE), the Lyra Starter Game (Lyra), and Epic Online Services (EOS).

This is the initial project setup for the game Echelons of Deception and Survival (Echelons), but the document can serve as general-purpose instructions to replicate a similar setup for any game project — replace project-specific values as noted.

The configuration described is intended for use by small teams who are relatively new to game development — it is not suitable for a professional environment. The expectation is that there is one lead maintainer who manages the overall project vision, architecture, devops, design, etc. — and outside collaborators are invited to contribute as needed or desired.

The goal is to establish a simple, secure, user-friendly, reliable, and performant workflow for developing multiplayer-capable games on top of UE/Lyra using Windows as the development platform — with multi-platform support for game packaging. The setup attempts to adhere as closely as possible to best-practices laid out by Epic Games, Perforce, and other software/service providers — however, it may diverge from what is commonly used, or omit certain elements of advanced workflows.

The result will be a development environment set up on a Windows PC. This main development PC will host the source of truth for the project, and will be where all packaging and release preparation is done.

Project Architecture

  • Unreal Engine 5.1.1
  • Lyra Starter Game 5.1.1
  • EOS Online Subsystem for Peer2Peer cross-platform multiplayer (Windows and Linux currently tested to work)
    • Non-EOS build for account-less LAN/WAN IP networking

Backups and Source Control

  • The project as a whole will be tracked by Perforce Helix Core version control, using a single-branch continuous-delivery-via-mainline development model.
  • The project's C++ source code will be tracked by Git source control separately, to facilitate collaboration on GitHub.
    • The state of the git repo will be tracked within the Perforce depot — the .git/ folder will be submitted in a controlled, manicured state.
  • Google Drive will perform real-time synchronization of the Perforce versioned files, checkpoints, journal, and log. Periodic manual backups must be performed by the administrator.
  • The engine will follow Epic's releases, and will not reside in the project version control — this setup assumes no engine modifications (except minor build configuration changes as noted).

External References

Note:

Throughout this document, there will be specific references to external guides and documentation that support the task being performed. It is advised to follow these links, in order to understand the whole process from all perspectives.

Below is a summary of sources that will be referenced. More granular links will direct to specific sections of these external sources.

Official Unreal Engine Documentation

Official Perforce Helix Core Documentation

Install Unreal Engine

Both the Unreal Engine Source Code (engine source, UE source) and an installed build of Unreal Engine, acquired from the Epic Games Launcher (launcher), are required for project maintainers.

The launcher build will be the primary engine for the project. It is also needed to install plugins and content from the Epic Games Unreal Engine Marketplace (marketplace) to transfer to the engine source when needed. It is used to build project binaries that will be checked into version control.

The engine source code is needed for full multiplayer-capable packaging of the LyraGameEOS project — the version of the project that uses an Epic Games account and EOS for Peer2Peer networking.

Note:

The normal Unreal Engine version installed by the Epic Games Launcher is an installed build that has been prepared by Epic Games — there is no need to generate a new installed build, the above link is only for information.

It is only necessary for the lead maintainer of the game project to acquire both the engine source and the launcher engine build — other contributors, who have no need to package the game project for distribution using EOS, do not require the engine source and can work solely with the launcher engine build of UE.

The launcher engine allows for EOS-enabled in-editor multiplayer testing. Non-EOS (null subsystem) project builds can also be packaged from the launcher engine, which allows for account-less play over LAN and direct WAN IP — albeit with no NAT punch-through and no WAN server browser.

Objectives

  • Install Unreal Engine from the Epic Games Launcher
  • Clone Unreal Engine Source Code repository from GitHub

Prerequisites

Note:

The Windows 10 SDK does not include windows debugging tools, if installed via Visual Studio Installer. They may be added afterwards via Windows System Settings -> Apps & features -> Windows SDK -> Modify.

See Epic Developer Community Tutorial — How To build the Unreal Editor (GitHub) by Michael Muir (Epic Staff) for additional useful details on setting up the development environment.

If the GitHub invitation email to the Epic Games organization is not immediately received, try un-linking the accounts, signing out and logging back into the Epic Games account, then re-trying the step to link the accounts on GitHub.

Procedure

  1. Install Unreal Engine from the Epic Games launcher

    1. Click the + icon next to the ENGINE VERSIONS heading to install UE

      image


      Note: Unreal Engine should be stored on a fast disk for best real-time workflow performance. If drive space is a concern, install just the UE launcher build to an SSD — the UE source build may then be used solely to package the game, and can be kept on a secondary, slower storage disk if needed. This will increase packaging times, but save disk space on the main SSD.

  2. Clone Unreal Engine Source Code repository from GitHub

    Refer to Unreal Engine Documentation — Downloading Unreal Engine Source Code.

    Note:

    Use the Git command line — do not download any GitHub software.

    It is important for the engine source to be cloned close to the drive root to minimize the path lengths, e.g.: C:\UnrealEngine vs C:\Users\User\Documents\Unreal Projects\Perforce\workspace-1\

    Use a terminal, such as PowerShell or Git Bash, with the present working directory set to the root of the drive: C:\, or D:\, etc.

    1. Run the following command to clone the entire Unreal Engine Source Code repository from GitHub

      git clone https://github.com/EpicGames/UnrealEngine.git
      

      Note: This will take some time, as the repository download is more than 20 GB in size.

    2. When the above command is finished, navigate to the engine root directory and run the file Setup.bat.

      Note: This will take some time...

Install and Configure Perforce Server

The overall project's version control will be handled by a free-tier Perforce Helix Core (Perforce) server (up to 5 users with 20 workspaces total) running on the lead maintainer's primary Windows development PC (or another PC in their physical control). The server will be accessed locally by the project lead, and remotely by a small team of up to 4 additional core collaborators.

Note:

Source control for the project's newly-added C++ source code, as well as any distributable text-based content, will be handled with a Git repository hosted on GitHub, in order to facilitate open-source collaboration and familiar workflows for outside collaborators (distributable binary assets will be shared via SDK .zip files in GitHub releases to outside collaborators — this excludes the 4 core collaborators, who have full access to all project files via Perforce).

Perforce will also track code changes, but at a less granular level. The local Git repo state (.git/) itself will also be tracked in Perforce.

Everything that is being configured here may also be configured on a remote hosted server.

Objectives

  • Install Helix Core Server
  • Install Helix Core Apps
  • Login to P4V and set user permissions
  • Secure the server
  • Prepare server for Google Drive real-time backup
  • Create depot
  • Create TypeMap
  • Create mainline stream
  • Create workspace
  • Create lyra stream
  • Add project as LyraStarterGameand submit to lyra stream
  • Merge lyra down to mainline
  • Add project as Echelons and submit to mainline stream
  • Create .p4ignore and submit to mainline stream
  • Start Google Drive real-time backup

Prerequisites

  • Epic Games Launcher
  • Google Drive
    • Google Drive user account with at least 100 GB free disk space (for future room to grow the depot)
  • Unreal Engine Source cloned to C:\UnrealEngine
  • Unreal Engine installed via the Epic Games Launcher

Procedure

This section closely follows the official directions from Perforce and Epic Games found in these references:

Helix Core Quick Start Guide for Unreal Engine

Helix Core Quick Start Guide

Unreal Engine Documentation — Using Perforce as Source Control

  1. Install Helix Core Server

    Refer to Helix Core Quick Start Guide — Install Helix Server on Windows.

    1. Download and execute the Helix Core Server installer from perforce.com/downloads/helix-core-p4d

    2. Accept default selection: Helix Server (P4D) and Helix Command Line (P4), and choose an install directory

      image


    3. Accept default port number: 1666 (or select a different one in the range 1024 through 32767), and choose a P4ROOT directory

      image


    4. Accept default server: 1666, choose a username, and select text editor

      image


      Note:

      A Limitation in Windows can prevent useful text editor launch. See Helix Core Server Administrator Guide — Resolving issues with P4EDITOR or P4DIFF

      For information on the Server setting, see:

      Helix Core Server Administrator Guide — Using P4PORT to control access to the server

      Helix Core Command-Line (P4) Reference — P4PORT

  2. Install Helix Core Apps

    Continue referencing Helix Core Quick Start Guide — Install Helix Core Visual Client (P4V).

    1. Download and execute the Helix Core Apps EXE installer from perforce.com/downloads/helix-visual-client-p4v

    2. Accept default selection: all options, and choose an install directory

      image


    3. Accept default values: Server, User Name, Text Editor

      image


  3. Login and set user permissions

    Continue to reference both Perforce guides:

    Helix Core Quick Start Guide — Login to P4V

    Helix Core Quick Start Guide for Unreal Engine — Set up admin account and stream depot

    1. Open Helix Core Visual Client (P4V) from the Windows Start Menu

      Keep the default values from the Open Connection window after opening P4V for the first time — do not click ok yet.

      image


    2. Click the New... button beside the User field in order to create a new user account, fill in the details, then click Save

      image


      Note:

      Although the dialog indicates that no password is required, a security configurable will be set by command line in the following steps which requires that the superuser has an initial password set — failure to set a password here is a critical mistake.

      Ensure the initial password that that is set here is 32 characters long minimum and meets the strong password requirements as detailed here: Helix Core Server Administrator Guide — Password strength requirements

    3. Click OK on the Open Connection window, leaving the Workspace field empty

    4. Answer yes to check for new versions

      image


    5. Answer no to usage data

      image


    6. In P4V, select from the menu bar Tools -> Administration

    7. Click Yes to accept superuser access

      image


      Note: P4Admin may need to be restarted in order to see superuser permission changes, and in order to see the protections table and to make the edit in the next step.

    8. Close P4Admin and open it again via the P4V Tools Menu or Windows Start Menu

    9. In P4Admin, set default user Access Level to list, then click Save Edits

      image


  4. Secure the server

    Continue with direction from the following references:

    Helix Core Quick Start Guide — Configure security

    Helix Core Server Administrator Guide — Securing the server

    Helix Core Server Administrator Guide — Restrict access to changelists

    Helix Core Server Administrator Guide — Password strength requirements

    1. Use a terminal to set security-related configurables for the server by running the below listed commands

      These commands will do the following:

      • Set Password Security Level to 3 (strong passwords required w/ ticket-based auth)
      • Restrict initial password creation to superuser
      • Force new users to reset their initial password
      • Prevent automatic user account creation
      • Hide sensitive information from unauthorized users
      • Hide user details from unauthenticated users
      • Hide information contained in 'keys' from non-admins
      • Default changelist set as restricted
      • Set minimum password length to 32
      p4 configure set security=3
      p4 configure set dm.user.setinitialpasswd=0
      p4 configure set dm.user.resetpassword=1
      p4 configure set dm.user.noautocreate=2
      p4 configure set dm.info.hide=1
      p4 configure set run.users.authorize=1
      p4 configure set dm.keys.hide=2
      p4 configure set defaultChangeType=restricted
      p4 configure set dm.password.minlength=32
      
  5. Prepare server for Google Drive real-time backup

    Relocate the directory that checkpoints and the log file are stored, to make Google Drive real-time backup more convenient.

    Refer to:

    Helix Core Server Administrator Guide — Checkpoint files

    Helix Core Command-Line (P4) Reference — P4LOG

    Helix Core Command-Line (P4) Reference — P4JOURNAL

    1. Set journalPrefix to p4checkpoints/p4espinete by running the following command in a terminal

      p4 configure set journalPrefix=p4checkpoints/p4espinete
      

      Note: Replace espinete with the prefix for checkpoints to be named, e.g. p4espinete.ckp.1 where espinete could be the server name or computer name that p4 runs on.

    2. Set P4JOURNAL to p4checkpoints/journal for P4D with the following command

      p4 set -s P4JOURNAL=p4checkpoints/journal
      

      Note: This only sets the value of P4JOURNAL for when a local computer user manually creates a checkpoint. The next step sets the value for when the server itself initiates a checkpoint via script or a remote Perforce admin user.

    3. In a terminal with administrator privileges, set P4LOG to p4checkpoints/log, and P4JOURNAL to p4checkpoints/journal, for P4S, by running the following commands

      p4 set -S Perforce P4LOG=p4checkpoints/log
      p4 set -S Perforce P4JOURNAL=p4checkpoints/journal
      
    4. Restart the computer

    Note: These steps, under the heading Prepare server for Google Drive real-time backup, must be performed again if helix server is ever uninstalled and re-installed — so, too, should all other p4 set and other commands be verified to be correctly retained after reinstalling helix server.

  6. Create depot

    Continue using these references:

    Helix Core Quick Start Guide for Unreal Engine — Set up admin account and stream depot

    Helix Core Quick Start Guide — Create a stream depot

    1. In P4Admin, delete the default depot

      image


      Note: P4Admin needs to be restarted to remove the old depot from the list.

    2. Create a new depot (File -> New -> Depot)

      image


      Name it.

      image


      Note: This name cannot be changed — replace the name of the project, Echelons, as needed.

    3. Accept the defaults, while adding -p4versioned suffix to the storage location (to make it more clear what the directory is, when syncing to Google Drive)

      image


      Note: Assuming the project name Echelons — change as needed.

  7. Create TypeMap

    Continue with help from the following references:

    Helix Core Quick Start Guide for Unreal Engine — Configure TypeMap settings

    Unreal Engine Documentation — Using Perforce as Source Control

    1. Create a typemap.txt file

      # Perforce File Type Mapping Specifications.
      #
      #  TypeMap:	a list of filetype mappings; one per line.
      #		Each line has two elements:
      #
      #  		Filetype: The filetype to use on 'p4 add'.
      #
      #  		Path:     File pattern which will use this filetype.
      #
      # See 'p4 help typemap' for more information.
      
      TypeMap:
      
          # Project directories that may have generated contents
          +w //.../Binaries/...
          +w //.../Build/...
          +w //.../DerivedDataCache/...
          +w //.../Intermediate/...
          +w //.../Saved/...
      
          # Application binary files
          binary+w //....exe
          binary+w //....dll
          binary+w //....lib
          binary+w //....app
          binary+w //....dylib
          binary+w //....stub
          binary+w //....ipa
          binary+w //....so
          binary+w //....pdb
      
          # Unreal binary files
          binary+l //....uasset
          binary+l //....umap
          binary+l //....upk
          binary+l //....udk
          binary+l //....ubulk
      
          # Git/Github directories and files
          +w //.../.git/...
          +w //.../.github/...
          +w //....gitattributes
          +w //....gitignore
          +w //....gitmodules
      
          # Text files tracked by Git
          +w //.../Documentation/...
          +w //.../Source/...
          +w //...LICENSE
          +w //....archive
          +w //....bat
          +w //....c
          +w //....config
          +w //....cpp
          +w //....cs
          +w //....csv
          +w //....h
          +w //....hpp
          +w //....ini
          +w //....json
          +w //....m
          +w //....manifest
          +w //....md
          +w //....mm
          +w //....po
          +w //....py
          +w //....sh
          +w //....txt
          +w //....uplugin
          +w //....uproject
          +w //....xml
          +w //....yml
      
          # Special cases
          binary //....pdf
          binary //....rtf
          binary+F //....7z
          binary+F //....gz
          binary+F //....rar
          binary+F //....zip
      
          # Art sources stored uncompressed
          +lF //.../ArtSource/...
      

      Note:

      The inclusion of Binaries/ (tracking built binaries in version control) is optional and up to the workflow of the team using the server.

      The .git related entries are oly needed if Git SCM will be used inside the depot to track code separately from/alongside Perforce. The inclusion of Git repositories directly inside the depot might not be a typical setup.

      Setting all Source/ directories and text files as writable is optional, to facilitate Git-like workflows for coders.

      Art sources — original files used in digital content creation to export game assets — are stored in separate directories alongside the .uasset. They are stored uncompressed to facilitate retrieval from backups. Many of these formats have their own compression anyway.

    2. Open a terminal in the same directory as typemap.txt and run the following command to apply the TypeMap to the server

      cat typemap.txt | p4 typemap -i
      
  8. Create mainline stream

    Continue using the following references:

    Helix Core Quick Start Guide for Unreal Engine — Create the main stream

    Helix Core Quick Start Guide — Create the mainline stream

    1. Enable the Streams tab in P4V

      image


    2. In P4V, create a new mainline type stream, named mainline

      image


      Keep all the defaults, but uncheck the two boxes at the bottom: Create a workspace to use with this stream and Populate the mainline stream after it is created.

      image


      Note: The name mainline is used to distinguish it from Git main branches which will be used for project codebases — this naming scheme is optional.

  9. Create workspace

    Continue using

    Helix Core Quick Start Guide for Unreal Engine — Create a workspace

    Helix Core Quick Start Guide — Admin: Create a workspace

    1. Enable the Workspaces tab

      image


    2. In P4V, create a new workspace

      image


      On the Basic tab, click Browse... to select the stream — choose mainline.

      image


      Choose a workspace name similar to n8bot-admin-Echelons-ws1, make the workspace root C:\UnrealEngine\Echelons, and check the two boxes at the bottom: Switch to new workspace immediately and Automatically get all revisions.

      On the Advanced tab, accept the defaults, but check the box Rmdir, and choose Revert unchanged files for the On submit selection.

      image


      Note: Optionally, the workspace can be Locked so only the owner can edit its settings.

  10. Create lyra stream

    The Lyra Starter Game from Epic Games is the stable release that populates the project's initial state.

    1. Enable the Stream Graph tab

      image


      image


    2. Create a new release-type stream as a child of mainline

      image


      Accept all defaults except as follows:

      Name it lyra and check the Change propagation box for To parent only.

      On the Advanced tab, Check both boxes for Locked and Submitting files to the stream restricted to stream owner.

      image


      Note: Branching files on creation doesn't matter at this point as the depot is totally empty.

  11. Add project as LyraStarterGameand submit to lyra stream

    Use as reference:

    Helix Core Quick Start Guide for Unreal Engine — Add project files

    Unreal Engine Documentation — Using Lyra with Epic Online Services (Find the section Installing and Configuring Lyra)

    1. Switch the workspace to the lyra stream by dragging-and-dropping the workspace icon from mainline

      image


    2. In the Epic Games launcher, navigate to the Unreal Engine -> Samples section, find Lyra Starter Game

      image


      Click Create Project.

      image


      Install it into C:\UnrealEngine\LyraStarterGame while keeping the default project name.

      image


      Note: The destination directory needs to be empty.

      Move the contents of the LyraStarterGame directory into the Echelons workspace directory.

      image


      image


      Note: The empty LyraStarterGame directory can be deleted after the contents are moved.

    3. Select Reconcile Offline Work from the menu after right-clicking the workspace root

      image


      Reconcile everything.

      image


      Note:

      No .p4ignore file exists in this stream, so all content from the LyraStarterGame project will be added — including the Binaries/, Intermediate/, and DerivedDataCache/ directories. This is intentional — do not add an ignore file to the lyra stream.

      It is important to be careful not to inadvertently submit generated files to the workspace, especially at this initial stage — avoid opening Unreal Editor or Visual Studio until both lyra and mainline streams are fully populated.

    4. Submit the default changelist

      image


      image


  12. Merge down lyra to mainline

    1. Switch the workspace to the mainline stream, double-click on the lyra stream, and click Merge changes to merge down the initial Lyra Starter Game project

      image


      Note: The green arrow and line indicates that changes are available for merge.

      image


      Note: Click Cancel if this notification is received. The workspace has not been switched to the mainline stream. Do it now — a new workspace must not be created.

    2. Expand the options section of the Merge/Integrate dialog

      image


      Check the box for Automatically resolve files after merging, accept the defaults (automatic resolve — no merging), then click Merge.

      image


    3. Submit the changelist

      image


  13. Add project as Echelons and submit to mainline stream

    1. With the workspace in the mainline stream, delete the entire contents of the workspace from Windows Explorer

      image


    2. Add Lyra Starter Game from the launcher again, but this time install directly it into the workspace directory, C:\UnrealEngine\Echelons, and name it Echelons

      image


    3. Reconcile offline work and submit changes to the mainline stream

      image


  14. Create .p4ignore and submit to depot

    Refer to Helix Core Quick Start Guide for Unreal Engine — Set up and create the ignore file.

    1. In a terminal, set P4IGNORE to .p4ignore

      p4 set P4IGNORE=.p4ignore
      
    2. Create a text file called .p4ignore

      # User-specific folders or temporary files that should not be versioned.
      Saved/
      DerivedDataCache/
      # Visual Studio user settings files that should be ignored.
      .vs/
      *.vsconfig
      *.sln
      
    3. Add the .p4ignore file to the workspace, then submit it to the depot

      image


  15. Start Google Drive real-time sync

    1. In Google Drive, add the -p4versioned directory and the p4checkpoint directory

      image


      image


      image


      Note: This step is performed last just in case the server setup process does not go as planned — there is no reason to start Google Drive backups until the server is confirmed to be working.

Perforce Configuration Notes

The basic configuration of the Perforce server is complete.

Please be advised of the following:

If the server needs to be opened or blocked to remote (WAN) access, port-forwarding may require configuration in the network's router firmware settings.

If at any point the Server value (P4PORT) needs to be changed, use a terminal with administrator privileges and run:

p4 set -S Perforce P4PORT=1666

Backup and maintenance

Refer to Helix Core Server Administrator Guide — Backup and recovery.

TL;DR: Create checkpoint/rotate journal routinely:

Note: This command must be sent with the perforce root set as the present working directory.

D:\P4ROOT\> p4d -jc

Verify weekly:

p4 verify -q //...

Note:

Google Drive real-time sync is not a suitable long-term backup solution. Real-time backups are a first line of defense, and offer convenience in case of small disruptions.

A minimum backup workflow would entail zipping the versioned files and saving them, along with the checkpoints/journals, in multiple places in addition to Google Drive. The backups, and the recovery procedure, need to be regularly tested in actual practice.

Configure Project

The project needs some final configuration before it is ready for development, testing, and deployment.

Objectives

  • Install UnrealVS extension
  • Install Visual Studio Integration Tool from Epic Games launcher and copy into UE source
  • Install Linux Cross-Compilation Toolchain
  • Build project and open Unreal Editor
  • Connect Unreal Editor to Perforce
  • Enable Visual Studio Integration Tool in Unreal Editor

Prerequisites

Procedure

The rest of the configuration is almost exactly as described in Unreal Engine Documentation — Using Lyra with Epic Online Services. Some of these tasks have already been completed, and some of these remaining steps might be described in a different order. Follow the order of the directions below.

  1. Install UnrealVS extension

    1. Locate the extension in C:\UnrealEngine\Engine\Extras\UnrealVS\VS2022, and double-click it to begin installation

      image


  2. Install Visual Studio Integration Tool from Epic Games launcher and copy into UE source

    1. Search the Unreal Engine Marketplace for Visual Studio Integration Tool and click Install to Engine

      image


      Note: The plugin can also be compiled from source, see GitHub: microsoft / vc-ue-extensions.

    2. Copy the newly installed Visual Studio Integration Tool from the launcher build into the UE source plugins directory

      The tool will be located in C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Marketplace. Copy the entire VisualStudioTools directory to C:\UnrealEngine\Engine\Plugins.

      image


  3. Install Linux Cross-Compilation Toolchain

    Refer to Unreal Engine Documentation — Linux Development Requirements.

    1. Download and install the linux toolchain as described in the above referenced article

      For Unreal Engine 5.1, download here: cdn.unrealengine.com/CrossToolchain_Linux/v20_clang-13.0.1-centos7.exe

      For Unreal Engine 5.2, download here: cdn.unrealengine.com/CrossToolchain_Linux/v21_clang-15.0.1-centos7.exe

  4. Build project and open Unreal Editor

    Refer back to Unreal Engine Documentation — Using Lyra with Epic Online Services.

    1. Run GenerateProjectFiles.bat from C:\UnrealEngine

      image


    2. Locate UE5.sln in C:\UnrealEngine and double-click it to open it in Visual Studio

      image


    3. In the Solution Explorer tab of Visual Studio, right click the main project Echelons, and select Set as Startup Project

      image


    4. In Visual Studio, click the button with the play icon labeled Local Windows Debugger to build the project and open it in Unreal Editor

      image


      Note:

      If the Engine has not previously been built, it will also build now. This might take some time.

      To build the project without launching the editor, right click the Echelons project, and select Build.

  5. Connect Unreal Editor to Perforce

    Refer to Unreal Engine Documentation — Source Control.

    1. Open the project in Unreal Editor

    2. Click the Source Control button in the bottom-right corner of the Unreal Editor window and choose Connect to Source Control...

      image


      Select Perforce as the provider, configure, then select the workspace.

      image


      image


  6. Enable Visual Studio Integration Tool in Unreal Editor

    1. From the Unreal Editor main menu bar select Edit -> Plugins search for Visual Studio Integration Tool and enable the plugin

      image


      Note: Unreal Editor will automatically save the project .uproject file and add it to the default Perforce changelist.

    2. Restart Unreal Editor

    3. From Unreal Editor, submit the default changelist to the Perforce depot by selecting from the bottom-right corner Source Control -> Submit Content

      image


      image


      image


      Note: The changelist may also be submitted from P4V.

Project Configuration Notes

The game project is now ready for single-player development. Continue to the next section to enable multiplayer testing and packaging.

Configure LyraGameEOS

The project will be prepared for multiplayer capabilities using Epic Online Services (EOS).

Objectives

  • Set up EOS Dev Organization
  • Set up EOS Product
  • Install EOS Artifact
  • Configure EOS Packaging for Linux

Prerequisites

Procedure

Complete the EOS-related steps from Unreal Engine Documentation — Using Lyra with Epic Online Services.

  1. Set up EOS Dev Organization

    1. In a web browser, navigate to EOS Developer Portal

      Note: Ensure the primary Epic Games account is logged in and has two-factor authentication enabled.

    2. Accept licenses, and when prompted select to start As an Organization

    3. Invite the secondary Epic Games account to the organization, with Community Tools role access

      Note: Accept the invite on the secondary account then continue with the primary account for all configuration.

  2. Set up EOS Product

    1. Create a new product exactly as described in the above referenced documentation

    2. Add new a client and Peer2Peer client policy exactly as described in the above referenced documentation

    3. Link project with Epic Account Services exactly as described in the above referenced documentation

    4. Enable permissions for Online Presence and Friends exactly as described in the above referenced documentation

    5. Link the client to the application exactly as described in the above referenced documentation

  3. Install EOS Artifact

    This will be the first in-editor/nightly deployment artifact.

    1. In P4V, right-click the DefaultEngine.ini file, which is located in the project folder at C:\UnrealEngine\Echelons\Config\Custom\EOS, and choose Check Out and Open...

      image


      Uncomment the artifact line and copy/paste the applicable values from the EOS Dev Portal... exactly as described in the above referenced documentation.

      ;+Artifacts=(ArtifactName="OSSv1EOS",ClientId="xxxx",ClientSecret="xxxx",ProductID="xxxx",SandboxId="xxxx",DeploymentId="xxxx",EncryptionKey="0")
      
    2. Save DefaultEngine.ini

    3. Submit the changelist

      image


  4. Configure EOS Packaging for Linux

    Note:

    The next two steps involve modifying the Unreal Engine source. These changes must be maintained as the engine source is upgraded from version to version. Keep track of the changes in a branch of the UE source on git/GitHub or just track and apply them manually.

    1. Add Linux as a whitelisted platform for OnlineSubsystemEOS in the Unreal Engine source code plugins directory

      Engine\Plugins\OnlineSubsystemEOS\OnlineSubsystemEOS.uplugin @@ -17,11 +17,12 @@:

                "Type": "Runtime",
                "LoadingPhase": "Default",
                "PlatformAllowList": [
                   "Win64",
                   "Mac",
      -            "Android"
      +            "Android",
      +            "Linux"
                ]
             },
             {
                "Name": "OnlineSubsystemEOSPlus",
                "Type": "Runtime",
    2. Copy and rename the MacEOSHelpers.h file from \Engine\Plugins\Online\OnlineSubsystemEOS\Source\OnlineSubsystemEOS\Private\Mac

      Rename the file to LinuxEOSHelpers.h and place it in a directory called Linux: \Engine\Plugins\Online\OnlineSubsystemEOS\Source\OnlineSubsystemEOS\Private\Linux

    3. Copy and rename the WindowsEngine.ini project configuration file from \Echelons\Config\Windows\Custom\EOS

      Rename the file to LinuxEngine.ini and place it in a directory called Linux\Custom\EOS: \Echelons\Config\Linux\Custom\EOS

      Note: This step is in the game project itself and should be checked into perforce.

LyraGameEOS Configuration Notes

Lyra Starter Game is now set up for multiplayer testing with EOS.

Configure Git

The project's source code and other distributable text-based files are tracked by Git, to facilitate collaboration on GitHub.

Objectives

  • Create local Git repository
  • Configure local Git username, email, and settings
  • Create .gitignore
  • Create .gitattributes
  • Create README.md
  • Add and commit all files
  • Create public Git repository on GitHub
  • Push to GitHub
  • Reconcile .git/ and submit to Perforce depot

Prerequisites

Procedure

  1. Create local Git repository

    1. Open Git GUI from the Windows Start Menu

      image


    2. Click Create New Repository

      image


    3. Select the project directory C:/UnrealEngine/Echelons

      image


  2. Configure local Git username, email, and settings

    1. Open Git Gui Options via Edit -> Options...

      image


    2. Enter GitHub Username and the private email address provided by GitHub

      image


      Note: Do not put a real email address unless absolutely certain this is the correct choice — use the GitHub-provided email instead.

      image


      Note: Locate this on the GitHub website under Settings -> Emails -> Keep my email addresses private

      image


      Note: Find the email address ending with @users.noreply.github.com next to the checkbox option to enable private email addresses.

    3. In a terminal, run the following command to ensure that EOL characters are never adjusted automatically

      git config --global core.autocrlf false
      

      Note: This sets the option globally for all git repositories on the computer.

      image


      Note: This option can be set when git is first installed.

  3. Create .gitignore

    1. In the project root directory C:\UnrealEngine\Echelons, create a .gitignore file

      # Lyra Starter Game project directories
      /Binaries/
      /Build/
      /Config/
      /Content/
      /DerivedDataCache/
      /Intermediate/
      /Platforms/
      /Plugins/AsyncMixin/
      /Plugins/CommonGame/
      /Plugins/CommonLoadingScreen/
      /Plugins/CommonUser/
      /Plugins/GameFeatures/ShooterCore/
      /Plugins/GameFeatures/ShooterExplorer/
      /Plugins/GameFeatures/ShooterMaps/
      /Plugins/GameFeatures/ShooterTests/
      /Plugins/GameFeatures/TopDownArena/
      /Plugins/GameplayMessageRouter/
      /Plugins/GameSettings/
      /Plugins/GameSubtitles/
      /Plugins/LyraExampleContent/
      /Plugins/LyraExtTool/
      /Plugins/ModularGameplayActors/
      /Plugins/PocketWorlds/
      /Plugins/UIExtension/
      /Saved/
      /Source/
      
      # Visual Studio files and directories
      /.vs/
      *.sln
      .vsconfig
      
      # Perforce ignore file
      .p4ignore
      
      # Bnary file formats
      *.exe
      *.dll
      *.lib
      *.app
      *.dylib
      *.stub
      *.ipa
      *.so
      *.pdb
      *.uasset
      *.umap
      *.upk
      *.udk
      *.ubulk
      *.png
      
      # Directories always ignored anywhere
      **/ArtSource/
      **/Binaries/
      **/Intermediate/
      

      Note:

      This will ignore the initial contents of the Lyra Starter Game project. This .gitignore file will need to be kept up to date to ignore specific content as it is added to the project. See Git Configuration Notes later in this document.

  4. Create .gitattributes

    1. In the project root directory C:\UnrealEngine\Echelons, create a .gitattributes file

      #
      # This file contains rules that control how Git handles binary and text files, including line endings
      #
      
      
      # Make sure Windows batch files preserve CR/LF line endings, otherwise they may not be able to execute.  Windows
      # batch files require a CR/LF for labels to work properly, otherwise they may fail when labels straddle 512-byte
      # block boundaries.  This is important when files are downloaded through a zip archive that was authored on a
      # Linux machine (the default behavior on GitHub)
      
      *.bat eol=crlf
      *.sh eol=lf
      

      Note: This file is identical to the one found in the Unreal Engine source code repository.

  5. Create README.md

    1. In the project root directory C:\UnrealEngine\Echelons, create a README.md file

      # Echelons of Deception and Survival
      
      This is the official GitHub repository for the above-titled game.
      
      Issue tracking, source-code version control, pull-requests, SDK (binary distributable asset) releases, and Wiki documentation are conducted here.
      

      Note: This file is just a placeholder and will later be used to describe the project to new visitors on GitHub.

  6. Add and commit all files

    1. In a terminal with the present working directory set as the project root C:\UnrealEngine\Echelons, run the following commands to stage all files and commit them locally

      git add -A
      git commit
      

      Note:

      A text editor will appear — enter a commit message, save the file, and close the text editor window.

      Ensure that only the three files that were just created have been staged for commit.

  7. Create public Git repository on GitHub

    1. Click the + icon next to the user profile picture in the top right corner of the GitHub website and select New repository

      image


    2. Name the repository and accept the defaults

      image


      Note: Do not add any of the files or license options listed under Initialize this repository with — import the existing repository instead.

  8. Push to GitHub

    1. In a terminal, run the following commands to add the GitHub repo

      These commands will add the GitHub repository as a remote tracked repository, ensure the current branch is named main, and then push the files to GitHub.

      git remote add origin https://github.com/n8bot/Echelons.git
      git branch -M main
      git push -u origin main
      

      Note:

      Replace n8bot with the GitHub username and Echelons with the project/repository name as shown on the GitHub page.

      Git credential manager, or some other form of authentication, needs to already be configured. See GitHub Documentation — Caching your GitHub credentials in Git.

  9. Reconcile .git/ and submit to Perforce depot

    Every time changes are pushed to the GitHub repository, the Perforce depot should have the .git/ folder reconciled and submitted. This must always be done after pushing to GitHub — the Git repo must be in a finalized state before submitting to Perforce, to avoid multiple unnecessary changelists.

    Note: Some care and attention should be paid to the state of the Git repo when submitting to the Perforce depot — cleaning, compressing, etc. While not critical, this can help prevent bloating of the perforce depot versioned files.

    1. In P4V, right-click on the empty area of the Workspace tab and choose Filter Workspace Tree -> Show Hidden Files

      image


    2. Right-click the .git directory, which is now visible, and choose Reconcile Offline Work...

      image


    3. Submit the changelist to the depot

Git Configuration notes

The Unreal Engine source code is already tracked by a Git repository, and the project folder is contained within this repository — there are now nested Git repositories.

Visual Studio 2022 17.4+ supports multiple git repositories in a convenient manner, so changes may be pushed to the project repo only, when using the engine source. However, when working in Visual Studio with the project-only Echelons.sln, the engine-repo is not of any concern anyway.

As content is added to the project, it will be important to update the .gitignore file to properly exclude all binary content, and any non-distributable text files. This can help crafting an ignore list for the SDK streams (see later sections of this document). SDK streams can mirror .git/ and source code for convenience — no need for SDK users to also pull from github. The .gitignore file needs to be updated to ignore all binary assets, while the SDK ignore needs to be updated to ignore only un-distributable binary assets.

Working with the Project

The project is ready to use. There are several main project task roles that will work with the project.

  1. Maintainer
  2. Developer
  3. Designer

The roles can be placed on a table of environment setup combinations as follows:

UE Source Launcher Engine
With Visual Studio Maintainer Developer
Without Visual Studio Designer

The main methods of interaction can be seen in these ways:

  1. Content-Creation
    1. Development (C++)
    2. Design (Binary Art)
  2. Distribution
    1. Packaging with EOS Online Subsystem
    2. Packaging with Null Online Subsystem

These interaction methods can be achieved with the environment setup combinations as follows:

UE Source Launcher Engine
With Visual Studio - Packaging with EOS or null subsystem
- Development and Design (C++/Binary Art)
- Packaging with null subsystem only
- Development and Design (C++/Binary Art)
Without Visual Studio - Design only (Binary Art)

Note: Items above in bold mark the primary purposes of that environment setup combination.

The project can be opened in Visual Studio and Unreal Editor in the following ways according to environment setup combination:

UE Source Launcher Engine
With Visual Studio Open UE5.sln in Visual Studio, then press Debug/Play to Open Unreal Editor Open Echelons.sln in Visual Studio, then press Debug/Play to Open Unreal Editor
Without Visual Studio Open Unreal Editor directly by double-clicking Echelons.uproject in Windows Explorer

The project can also be opened in Unreal Editor directly, by passing the Echelons.uproject path and filename to the desired UnrealEditor.exe (either UE source-built or launcher engine).

A Windows shortcut would have something similar to this as the target:

"C:\Program Files\Epic Games\UE_5.1\Engine\Binaries\Win64\UnrealEditor.exe" C:\UnrealEngine\Echelons\Echelons.uproject

Objectives

Immediate Procedures

  • Install EOS Dev Auth Tool
  • Test EOS multiplayer in-editor

Ongoing Procedures

  • Package EOS build for Windows
  • Package EOS build for Linux
  • Update and merge upstream changes to Lyra
  • Slip-stream in between mainline and Lyra to make portable changes to Lyra
  • Create virtual stream to limit scope with mainline-only workflow
  • Package release builds
  • Create virtual stream for zipping SDK of sharable binary assets

Prerequisites

  • Epic Games Launcher
    • Epic Games user account
  • Unreal Engine From Epic Games Launcher
  • Unreal Engine Source (if packaging nightly or release builds)
  • VS 2022 (if packaging nightly or release builds)
  • P4V and perforce server setup like in this doc

Immediate Procedures

The following are important procedures for setting up the testing and development environment.

  1. Install EOS Dev Auth Tool

    1. In Windows Explorer, navigate to C:\UnrealEngine\Engine\Source\ThirdParty\EOSSDK\SDK\Tools, open the file EOS_DevAuthTool-win32-x64-1.1.0.zip, and extract its contents into any location

      image


      Note: This is a portable application and can be run from any location with appropriate privileges — no installation needed

  2. Test EOS multiplayer in-editor

    Follow the directions from the section Testing EOS in an Editor Build in Unreal Engine Documentation — Using Lyra with Epic Online Services.

    Play-in-Editor EOS multiplayer testing can be achieved as follows, depending on the environment setup combination:

    UE Source Launcher Engine
    With Visual Studio Add EOS arguments to UnrealVS toolbar (UE5.sln) Add EOS arguments to UnrealVS toolbar (Echelons.sln)
    Without Visual Studio Add EOS arguments to Windows UnrealEditor.exe shortcut

    With any environment setup/combination, when launching the game in-editor as Standalone Game, the EOS arguments can be passed in editor preferences: Edit -> Editor Preferences... navigate to the Level Editor -> Play section, and find Play in Standalone Game -> Command Line Options.

    Note: When testing the null subsystem, no special procedures or arguments are required.

    For initial testing, open either .sln file in Visual Studio.

    1. In the UnrealVS toolbar Command-line box enter the following arguments and click the debug play button

      -game -customconfig=EOS
      

      image


      Note: This will result in an expected Login Failure dialog upon entering the Lyra Main Menu.

    2. Close Lyra and the Unreal Editor, run the Developer Authentication Tool from the previous step, and enter port 6666

    3. Click login, authenticate with the primary Epic Games account, and name the credential

    4. Repeat authentication with the secondary Epic Games account

    5. Back in Visual Studio, in the UnrealVS Command-line, add the following arguments while replacing Player1 with the named credential for the primary Epic Games account

      -AUTH_LOGIN=localhost:6666 -AUTH_PASSWORD=Player1 -AUTH_TYPE=developer
      

      Note: Also keep the -game -customconfig=EOS argument.

    6. Click the debug play button to launch Lyra with the primary account logged-in

    7. Start an online game in Lyra

    8. Keep Lyra open, go back to Visual Studio, and from the VS main menu bar select Debug -> Detach All

    9. Replace the credential name from the -AUTH_PASSWORD part of the argument in the UnrealVS Command-line with the credential name given to the secondary Epic Games account

    10. Click the debug play button to launch Lyra with the secondary account logged-in

      Note: There will be two game windows open.

    11. Browse for the session hosted by the primary account and join

    12. Pew pew

EOS Authorization Notes

Using the AccountPortal method of authentication will allow a user to login to their Epic Games account from directly within the game executable if they do not wish to use the EOS Dev Auth Tool. They will need to log in each time the game is launched.

To use the AccountPortal method, instead of passing the -AUTH_LOGIN=localhost:6666 -AUTH_PASSWORD=Player1 -AUTH_TYPE=developer arguments to the executable, pass the following argument only, excluding the -AUTH_LOGIN and -AUTH_PASSWORD arguments altogether:

-AUTH_TYPE=accountportal

See Unreal Engine Documentation — The EOS Online Subsystem (OSS) Plugin for more information.

Ongoing Procedures

The following procedures are meant to demonstrate how these actions would be performed as they become necessary — do not perform these actions now.

A release-type stream is used to hold the Lyra Starter Game, which can be merged back into the project as Lyra is updated by Epic. Merging lyra down into mainline is also how mainline is initially populated.

An intermediate stream can be slipped in-between mainline and lyra, if any changes made to the Lyra Starter Game itself are intended to be pushed upstream, or re-used in other projects.

A continuous-delivery-via-mainline model is used — with a single mainline branch being the only working stream. All submissions to the game project are directed to mainline. See YouTube: GDC — Adopting Continuous Delivery (In Sea of Thieves) for a general ideology. Virtual Streams can be used to limit scope for different disciplines i.e. design, dev, etc.

Nightly releases can be made directly from mainline. Cycle EOS artifact of mainline after doing so — in-editor artifact is always ahead of (newer than) nightly artifact. Nightly users play with former in-editor artifact.

Note: For more information about using the EOS Deployments, see Epic Developer Resources Documentation — Product, Sandbox, and Deployment IDs and Unreal Engine Documentation — The EOS Online Subsystem (OSS) Plugin

Full release-type streams are copied up to make a full branched stream. The EOS Artifact is changed for each release — not part of the nightly/editor cycle — the release artifacts will have never been used in-editor or for nightly builds. Small patch changes can be made to releases in rare circumstances, in which case the artifact can remain the same and the same stream can be reused. A release stream is major.minor — a patch can be done from the previous major.minor stream. Any resulting bugfixes or changes need to be carefully manually merged — editing the stream spec to allow this, careful not to merge the release EOS artifact. Ideally, bugfixes are just done on mainline and put into the next release, but sometimes a patch might be desirable. This will be done on a manual case-by-case basis.

Note: Client compatibility is very sensitive to any changes in packaged content. Any time a release stream is used to create a patch for an existing release, a new EOS artifact must be cycled in.

A virtual stream for SDK export limits the scope of mainline or a release stream, to facilitate easy zipping up of the binary assets (along with the code and git repos — everything that can be shared) in the true state of the stream at the time the nightly or release build was made. (Nightly is less reliable, because theoretically some changes might be made to depot if not careful but just be careful to export SDK at the right time, without getting latest.). The SDK streams can be cycled similar to the EOS artifact. Update the nightly SDK virtual stream as content is added to the project, then cycle that stream in for the release build. That SDK stream now becomes attached to that releases stream, while a new one is copied over for a new nightly sdk stream.

  1. Package EOS build for Windows

    Find the Packaging LyraGameEOS section in Unreal Engine Documentation — Using Lyra with Epic Online Services.

    Note: Packaging the game with EOS, or as a dedicated server, requires doing so from the UE source build.

    1. Totally clean the perforce workspace (do not apply p4ignore when cleaning)

      Note:

      It is a good idea to make a new workspace just for nightly/weekly packaging. This way, the binaries and intermediate files can be carried over to save time, and then cleaning the workspace is not necessary.

      A third maintainer workspace could be created when packaging full release builds, too, so that the nightly/weekly intermediate files are retained for maximum time savings.

    2. Run GenerateProjectFiles.bat from C:\UnrealEngine

      Note: This must be done when building from source, because the Intermediate/ project files submitted to the depot are generated from the launcher engine build.

    3. Open UE5.sln into Visual Studio

    4. Remove the added arguments to the UnrealVS Command-line so it shows only the project name

      image


    5. Click the debug play button to open the project in Unreal Editor

    6. In Unreal Editor, click the Platforms dropdown toolbar button above the main viewport, and choose Windows -> LyraGameEOS to select the BUILD TARGET

    7. From that same Platforms menu, select Windows -> Package Project and choose a destination directory

      Note:

      Building a full release for distribution requires additional steps and possibly also modification to project files themselves. See instructions later in this document.

      If packaged builds are launched from the Epic Games Launcher (in the future, published), the user credentials and authentication method will be passed to the game executable automatically. In order to pass credentials from the EOS Dev Auth Tool, supply the following arguments to the game executable, as with the in-editor testing:

      -AUTH_LOGIN=localhost:6666 -AUTH_PASSWORD=Player1 -AUTH_TYPE=developer
      

      Replace Player1 with the credential name given to an Epic Games account that is currently logged-in to the EOS Dev Auth Tool.

      Optionally, use the AccountPortal method of authentication as described in the above section's notes instead of the EOS Dev Auth Tool.

  2. Package EOS build for Linux

    1. Follow the same steps as above for packaging EOS build, but select Linux from the Platforms menu instead of Windows

      Note: The EOS Dev Auth Tool does not come pre-compiled for Linux. Users wishing to test multiplayer on Linux using a packaged build of the project should use a different authentication method, or can run the DevAuth server from a Windows machine using the precompiled windows binaries found in the Unreal Engine source on GitHub.

  3. Update and merge upstream changes from Lyra

    1. Switch the workspace to the lyra stream by dragging-and-dropping the workspace icon from mainline

      image


    2. Delete the entire contents of the workspace directory from Windows Explorer

      image


      Note: Some of these files are not in the lyra stream on the depot — they are user-specific temporary content that can be re-generated.

    3. Install the updated version of Lyra Starter Game from the Epic Games launcher into LyraStarterGame then move it into the workspace directory

      image


      Note: The destination directory needs to be empty.

      image


      image


      Note: The empty LyraStarterGame directory can be deleted after the contents are moved.

    4. Select Reconcile Offline Work from the menu after right-clicking the workspace root

      image


      image


      Note: No .p4ignore file exists in this stream, so all content from the LyraStarterGame project will be added — including the Binaries/, Intermediate/, and DerivedDataCache/ directories.

    5. Submit the default changelist

      image


    6. Switch the workspace to the mainline stream, double-click on the lyra stream, and click Merge changes to merge down the update

      image


      Note: The green arrow and line indicates that changes are available for merge.

      image


      Note: Click Cancel if this notification is received. The workspace has not been switched to the mainline stream. Do it now — a new workspace must not be created.

    7. Check the box for Automatically resolve files after merging, accept the defaults (no merging), then click Merge

      image


    8. Some conflicts will arise — click OK

      image


      Find the referenced changelist, right-click, and select Resolve Files....

      image


    9. Choose Automatic resolve (allow merging) this time, then click Auto Resolve

      image


    10. At least one conflict will remain — switch to the Interactively resolve files one at a time mode, then click Run Merge Tool

      image


    11. The Merge Tool window will appear — select which version of the change to use by clicking on the corresponding icon in the top left

      image


      Click Yes.

      image


      Click save and close the merge tool.

      image


      Click Yes.

      image


    12. Submit the changelist

      image


  4. Insert stream in between mainline and lyra to make portable changes to Lyra Starter Game

    If changes need to be made to Lyra Stater Game, and they are suitable for submitting as a pull request to Epic Games, or for use in other projects, it might be a good idea to make those changes in an intermediate stream between lyra and mainline.

    1. Create a new release-type stream as a child of mainline

      image


      Name it lyra-custom, ensure the box for Branch files from parent stream on creation is unchecked, and set Change propagation as allowed To parent only. Accept other defaults.

      image


      Note:

      Optionally, on the Advanced tab, check the boxes for Locked and Submitting files to the stream restricted to stream owner. When using the continuous-deployment-via-mainline model, this is a good practice, to avoid inadvertent changes.

      In order to see the newly-created stream in the Stream Graph, check the box for it, and click Apply

    2. Reparent the lyra stream onto lyra-custom from the Stream Graph by clicking lyra and dragging-and-dropping it ontop of lyra-custom

      image


    3. Switch the workspace to the new lyra-custom stream

      Click Yes when asked to get latest.

      image


      image


      Note: There might be errors about clobbering time — check the box for Ignore additional errors and click OK.

    4. Click Get latest again to try and fore Perforce to refresh and delete the old stuff

      image


      Click Continue when asked to delete the files.

      image


    5. Merge down the lyra stream to populate the lyra-custom stream with the current version of lyra

      image


      Note: Double-click the lyra stream to bring up the Merge Changes option.

      image


    6. Submit the changelist

      image


    7. Modify a file

      image


      image


    8. Merge down to mainline

      image


      image


      image


      image


      image


      image


      image


  5. Create virtual stream to limit scope with mainline-only workflow

    Use virtual streams to provide restricted views for different disciplines, such as excluding source code from design streams.

    Note: Virtual Streams submit files directly to their parent streams — no files are duplicated in the depot.

    1. Create a virtual stream as a child of the mainline stream

      image


      Name it something like design, and in the Ignored text area, define the ignore patterns to exclude from the view, e.g.:

      Source/...
      

      image


    2. Switch the workspace to the new design stream

      image


      Click Yes to get latest revisions.

      image


      Note: All directories with the name Source and all of their contents are now ignored in the virtual stream view.

  6. Package release build

    Release builds are made from fully-branched release-type streams, so that the exact state of the project is captured discretely. Small modifications needed — such as installing a different EOS artifact, or changing build/version info — can be made to this stream with no intention of merging down. In rare circumstances, small patches can be submitted directly to a release stream and then can be considered for manually-overridden merge-down by the project maintainer.

    The release streams continue to exist as long as they are needed to reference. Once the release has reached end-of-life, the decision can be made to remove the stream or not and/or obliterate its files from the depot.

    Each time a <major>.<minor> release is prepared, a new stream is made: 1.0, 1.1, 1.2, 1.3, etc.

    1. Create a new release-type stream as a child of mainline

      image


      Name it something like release-0.1, check the box for Branch files from parent stream on creation, and disable all Change propagationuncheck both To parent and From parent.

      On the Advanced tab, check the boxes for Locked and Submitting files to the stream restricted to stream owner.

      image


    2. Switch the workspace to the new release-type stream

      image


    3. Totally clean the perforce workspace (do not apply p4ignore when cleaning)

    4. Run GenerateProjectFiles.bat from C:\UnrealEngine

      Note: This must be done when building from source, because the Intermediate/ project files submitted to the depot are generated from the launcher engine build.

    5. Make any changes that need to be made for release, and submit them directly to the release stream — changes such as EOS artifact rotation or version identification.

    6. Build the project from UE source

    7. Before packaging, when everything is ready to package, reconcile the workspace and submit changes

      This ensures that the release stream left in the minimal state to commence packaging, without the added bloat of the resulting generated content.

      Note: Submit Binaries/ (including from all plugins), Build/, Intermediate/, and optionally DerivedDataCache/ — anything generated in preparation for the packaging.

    8. Package the game, then clean the workspace if desired

      Note: Do not submit any resulting files after packaging is performed.

  7. Create virtual stream for zipping SDK of sharable binary assets

    The binary assets of the game project are not stored in the public GitHub repo. Instead, they are packaged into a .zip file for distribution to outside collaborators via GitHub Releases.

    These binary asset SDKs need their scope filtered to prevent the distribution of content contrary to the license agreement of said content. Instructions will be provided to outside collaborators on how to reproduce the project's binary asset contents — installing Lyra from the launcher, acquiring free marketplace content, creating and acquiring the MetaHumans.

    1. Create a new virtual stream as a child of the release-type stream

      image


      Lock the stream, and add share paths only to the content that should be distributed via the SDK.

      image


      image


      The same virtual SDK stream can be used to zip an SDK from mainline for nightly builds. It might be best to keep these attached to their respective release-type stream, to enhance record-keeping. They could be named to specify exactly which release they belong to — SDK-0.1, SDK-0.2 SDK-nightly, etc.

      The paths that are shared in the SDK will need to be manually updated as content that needs to be shared is added to the project.

      Nightly SDK specs could be updated, then copied to the release SDKs

      image


Stream Notes

Make sure to clean the workspace when switching streams, and be aware of what the .p4ignore is doing. DerivedDataCache and Saved directories are ignored, so they will not be cleaned. To clean those workspace directories, disable p4ignore for the reconcile/clean.

When building binaries for individual use or for checking-in, always start with a perfectly cleaned workspace — including cleaning the DerivedDataCache and Saved directories. Building from source and from launcher engine require different intermediate files, so the GenerateProjectFiles.bat file needs to be run to build from source.

The DerivedDataCache checked into the depot is from stock Lyra. Never check-in any other DDC unless there is an explicitly known reason. Binaries/, Build/ and Intermediate/ directories will be carefully managed — built and submitted only from clean/reconciled states.

Be very careful about what is checked-into the depot. Never submit binaries, build, or other important files unless absolutely certain it is the correct time to do it.

Final Notes

The Git repo for the UE source will now have untracked files and folders from the project. There is no need to fork the UE source repo on GitHub, or to push any of these changes to keep (except possibly the Linux EOS configuration changes). You may disregard them, or add the project folder to the UE source .gitignore

GenerateProjectFiles.bat needs to be run when new content is added to the project, in order for them to appear in VS 2022 solution explorer.

Perforce stores all text files with only LF (Linux-style) line endings. They are automatically converted to the client's OS style when syncing. This is something to be aware of.

Clone this wiki locally