Overview

This (sub)assignment is primarily about getting the Unreal Engine built from source without the pressure of having to be working on a coding assignment at the same time. Expect it to take a couple of hours to overnight for the thousands of build steps, even if everything goes perfectly. If you have updated either your OS or build tools since the release of UE 5.6.1, plan for the possibility that you may also need some time to roll back those changes if they are not compatible.

Assignment
Goals

The primary goals of this assignment are:

  1. Make a working build of the Unreal Engine from source.
  2. Use it to create a project.

Development
Environment

System

Ideally, you'll use the Mac or PC you have been using the rest of the semester. If it is short on cores or memory such that you want to use something faster, there are three 24-core computers in ENG 005a which you could use with your personal SSD. Everyone in the class should have card swipe access to this lab. Expect that the build could take up about an additional 170 GB on your drive, 270 GB if you haven't run the Setup script yet. Be sure you have enough free disk space before you start.

It is also possible to do the work in this class on an Amazon EC2 instance. You would set it up, install Visual Studio, can make a new clone of your github. If you go this route, I recommend a 4-core g4ad.xlarge Windows instance using the NICE DCV template, with EBS root volume drive size increased to 350 GB. At current rates, this instance costs $0.56/hour that it is actively running, plus $35/month in storage costs. The g5's and g6's are newer GPUs, but we will be fine with the cheaper g4's. The g4ad instances have AMD GPUs, while the g4dn instances have NVIDIA (and are a little more expensive to run). You can temporarily switch to a 64-core g4ad.16xlarge at $6.41/hour for faster compiles (e.g. about 20 minutes!). At these rates, I'd expect work in on assn6 would cost you about $50. If you do use Amazon, be sure to stop the instance when you are done to avoid racking up continuous charges while it is sitting idle. I usually set up an Amazon CloudWatch event to stop the instance if the CPU load is low for more than about 20 minutes, though this won't help if you accidentally leave something running on the instance.

Directory limits

By default, Windows has a 260-character maximum path length. If your g4g2025 directory already has a long path, directories deep in the build will be too long. Either make sure your g4g2025 directory is near the root of the drive (almost certain if it is on its own SSD), or enable long path support in the Windows registry and Unreal build settings. Look online for more info on that second option.

Some of the Unreal build scripts do not handle non-ASCII characters well, and I'd be wary of having any spaces in the path as well. If you normally have unicode characters or spaces in your path, you should probably move the g4g2025 location on your disk to avoid those before you start.

Details

Here's a detailed description of what you need to do for this assignment. Numbered items are things you need to do, bullets below them are possibly helpful comments. The steps that have some waiting time (from a few minutes to a many hours) are marked with one or more ⏱, giving at least a rough scale of what to expect.

Ensure you have the non-github large files

  1. (Re)run the Setup script in your g4g2025 directory. ⏱
    • Setup.bat for windows, Setup.command for Mac, Setup.sh for Linux
    • If you have not done this yet, this will download about 97 GB of additional large files that are not in the git repository. If your internet connection is slow, it can take a while.

Build UE5

  1. Run the GenerateProjectFiles script (bat for Windows, command for Mac, or sh for Linux).
    • You will only need to re-run this again when you add or remove source files.
  2. Open the generated build file (The newly created UE5.sln Visual Studio solution or "UE5 (Mac).xcworkspace" XCode project).
  3. Do a build. ⏱⏱⏱
    • In Visual Studio:
      • Right click on UE5 in the Solution Explorer window, and choose "Set As Startup Project".
      • Make sure the configuration boxes in the toolbar just below the menus are set to Development Editor, Win64, and UE5 (they should be already).
      • Build just UE5, not the entire solution, either by pressing the play button in the top menu bar (this will start the next step as well when the build is done), from the menu that pops up when you right click on UE5 in the Solutuion Explorer, from the Build menu, or using Ctrl+B when UE5 is selected in the solution explorer menu. Building the entire solution includes dozens of additional auxilliary tools that we do not need that will make the already long build time even longer.
      • Watch the Output window for progress.
      • If build errors happen, it will switch to an error list window, but usually the full message in the build Output window is more useful for figuring out what went wrong. At this stage, this is most likely running out of disk space or path problems, though it is possible you could have a message indicating something else should be installed to complete the build on your computer.
    • In Xcode:
      • Select UnrealEditor in the toolbar box at the top of the XCode window.
      • Build just UE5, either by pressing the play button in the top menu bar (which will also start running when the build is done), from the Product menu, or using ⌘B
      • Follow the build progress by opening the Build window in the Report Navigator (last tab icon just below the play button)
    • This will likely take at least an hour, and quite possibly many hours. Fortunately, you will not need to do a full build often.
  4. Run the UE5 Editor to make sure it worked. ⏱⏱

Create an Unreal Project

  1. Using your new UE5 Editor, create a new blank C++ project. Call the project "assn6" and save it at the top level of your g4g2025 directory (so it'll be g4g2025/assn6).
    • I'll be able to tell from the project that it was created using a source build rather than the installed UE 5.6.1 binary version we have been using the rest of the semester.
  2. Once created, it'll show up in the Games section of your UE5 Visual Studio solution / XCode project, and you can launch it from there.
    • In Visual Studio, set the assn6 project as your startup project, then hit the play button
    • In XCode, pick assn6Editor in the active project drop-down at the top of the window, then hit play
  3. Commit and push this project to github

Submitting

Add an assn6a.txt file to your assn6 directory. Describe your test computer (at least OS and number of cores), and approximately how long your build took.

Make sure everything is submitted and tagged with an assn6a tag.

For this assignment, you do not need to worry about multiple git commits or screen shots.