Making an installed build of Unreal Engine 5

As I’ve mentioned in previous blog posts, I’m working on a game in Unreal Engine. I’ve come to the point where I’m starting to work on the online part of my game, and was considering using dedicated servers. Unfortunately, the version of the engine I was using from the Epic Games Launcher did not include the server build configuration.

For those that are unaware, there are two main ways to get and use Unreal Engine 5. The most common way is to install the pre-compiled binaries from the Epic Games Launcher. For most people wanting to use UE5, this is the easiest method. However, in some cases, developers may want to build the engine themselves from source. Obviously, if you want to make any modifications to the base engine, you’ll need to get UE5 using this method rather than the pre-compiled version. More commonly, however, developers may want to build dedicated server versions of their game projects.

For awhile, I was using the source version of UE5 just fine, but occasionally the engine would decide to do a full rebuild, even when only game code was changed. On my machine, this could sometimes take over an hour. Since I didn’t plan on making any engine changes, and only wanted to have access to the server build configuration, I decided to try to to make my own installed version of UE5 to speed up iteration time. In this post I will walk you through the basics of making an installed build and identify some snags I faced that you may too.

Prerequisites

You will need to download the UE5 source code from GitHub. To get access to the UE5 source code, you will need to create a GitHub account and then link your GitHub account with your Epic account. When you do this, you will receive an invitation to the Epic Games organization on GitHub. From there you can clone the UE5 repository.

The README in the repository explains what you need to do to finish setting up before you build UE5. You will need to get the project dependencies and then generate the project files for your platform.

Additionally, before making an installed build, you’ll want to get the platform SDK for each platform you plan on supporting. In my case I also wanted to be able to cross-compile and package my game for Linux. You can look at this page in the documentation to find the right tool-chain for the version of the engine you are building. For me, I was building Unreal Engine 5.0.3 so I installed -v20 clang-13.0.1-based cross-compilation tool-chain. You can check to see if the tool-chain installed successfully by running the following from the command line:

%LINUX_MULTIARCH_ROOT%x86_64-unknown-linux-gnu\bin\clang++ -v

You should see an output like this:

You may need to restart after installing the tool-chain to get this output

You should also regenerate your UE5 project files after installing the Linux tool-chain. If you open your UE5.sln Visual Studio project, you should see Linux as a platform target.

If you see Linux in the platform dropdown in Visual Studio then tool-chain was setup correctly

Using Unreal Automation Tool

An installed build can be made using Unreal’s BuildGraph system. Epic provides a BuildGraph script ready to go at [YourUnrealEngine5SourceDirectory]\Engine\Build\InstalledEngineBuild.xml. To run this script, use the following command after navigating to [YourUnrealEngine5SourceDirectory]\Engine\Build\BatchFiles:

RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -clean -set:WithClient=true -set:WithServer=true -set:WithLinux=true -set:WithLinuxArm64=false -set:WithWin64=true -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithHoloLens=false -set:WithFullDebugInfo=true -set:BuiltDirectory="C:/UE5Custom/"

This will run a clean build of the installed version of UE5. You can see what the various parameters do on this page. The particular example above makes an installed build with Client and Server build configurations, and packaging support for Linux and Windows.

One snag I faced when building was running out of memory when the UnrealAutomationTool was working with large pre-compiled headers. I ended up having to increase the size of my pagefile to 32gb to get this build to run successfully.

Another snag I hit was running out of disk space when trying to build. The UE5 source directory grew to almost 500gb with all the intermediate files the build produced. The output directory with the installed build was almost 200gb. Make sure you have enough space before attempting to build.

Conclusion

As you can see, we are able to package a server target using a pre-compiled binary build of UE5
You switch your game projects to use your custom engine version just like you would with different versions of Unreal from the Epic Games Launcher

Once the build succeeds you can use it like you would with a version downloaded from the Epic Games Launcher. You can switch your Unreal projects to use this custom version of the engine. Most importantly, you now have the option to package a server version of your game from the editor.

Welcome to my site 2.0!

It has been awhile since I utilized this site and made any posts. Needless to say a lot has changed in my life since 2019. I wanted to make a re-introduction post to explain what I’ve been up to recently and what’s new since I created this site.

Starting a game company

My “side hustle” is no longer trying to start a game company, at least right now. At some point after making that original introduction post, I realized I enjoyed game development much more when I treated it purely as a hobby in my free time. I like being able to focus on making what I want at the pace I want. By treating gamedev as just a hobby, I can make fan games or small standalone demos since I don’t have to worry about marketability or anything like that.

I still want to release an original game of my own one day, but I’m less interested in making a career out of game development. If I happen to eventually release something that sells enough or gets enough support to sustain me full-time, then that’s great, but it is no longer the end goal. For now, I just want to work on improving my skills and getting game projects out into the world for people to play.

Engine development

I am also no longer trying to learn OpenGL and make a game engine from scratch. In the same way I realized I enjoy game development as a hobby rather than a “side hustle,” I realized I enjoy designing and implementing gameplay systems and levels more than I’m interested in making a game engine. Since the beginning of 2020, I’ve been using Unreal Engine 4 and have been enjoying its workflow. I’ve since made a couple game projects in it, to varying levels of completeness. I may revisit some of those unfinished projects in a future post.

What’s next?

My main goal for this year is to release more game projects. There are a couple fan game projects I have in mind and I want to release betas for them by the end of this year. Another goal of mine is to be more active with this site. My main focus for the site will be making tutorials and writing technical articles about game development problems I faced and how I solved them. I think within the Unreal Engine community, we’re lacking in community-made resources compared to other engines like Unity and Godot. I’m a big proponent of knowledge sharing, and want to make sure there are high quality guides out there for Unreal Engine.

New site features

I’ve started to add more pages to the site aside from blog posts. Along with the site, I’ve also set up a self-hosted Git service for my game projects and libraries. You can find that under the “Portfolio” tab at the top of the page. You can also find links to my GitLab and GitHub under that same tab as well.

Like always, I hope you enjoy your stay! Stay tuned for more blog posts in the near future.