Book Image

Multiplayer Game Development with Unreal Engine 5

By : Marco Secchi
Book Image

Multiplayer Game Development with Unreal Engine 5

By: Marco Secchi

Overview of this book

If you’re fascinated by the immersive gaming experiences that enable multiple users to engage in collaborative or competitive gameplay, this Unreal Engine 5 game development book is for you. In this book, you’ll learn the foundational principles behind multiplayer games. Starting with a sample project, you’ll learn how to set up a networked system and make it work. Once the prototype of the project is functional, you’ll start adding game logic, including obstacles and AI opponents, to heighten the challenges and engagement, offering a captivating experience for players. Next, you’ll learn how to debug and optimize the project, before finally deploying the game build and integrating it with cloud services such as the Epic Online Services system. By the end of this book, you’ll have the confidence to develop and manage multiplayer experiences using the Unreal Engine environment, taking your newfound programming skills in your upcoming projects.
Table of Contents (22 chapters)
1
Part 1:Introducing Multiplayer Games
5
Part 2:Networking and Multiplayer Games in Unreal Engine
10
Part 3:Improving Your Game
15
Part 4:Deploying Your Game Online

Technical requirements

As you may already know, the Unreal Engine Editor may be very demanding in terms of hardware prerequisites but don’t be scared. Luckily, this book is more focused on game programming than on real-time visual effects.

Here, let’s look at the hardware and software requirements, as well as some pre-requisite knowledge you will need to follow this book.

Pre-requisite knowledge

Before you get started, it is my duty to remind you that this book is meant for people who already have some knowledge about Unreal Engine development. As such, you should already be familiar with the following topics:

  • The Epic Games Launcher and the Unreal Engine Editor
  • Blueprint classes and Blueprint programming
  • C++ programming with your IDE of choice
  • A minimum level of understanding of C++ programming with Unreal Engine.

Hardware requirements

The following are some basic requirements officially recommended by Epic Games at the time of writing this book; if you have at least this hardware, you should be guaranteed a nice experience throughout the chapters:

  • Windows OS:
    • Operating System: Windows 10 64-bit version 1909 revision .1350 or higher, or versions 2004 and 20H2 revision .789 or higher
    • Processor: Quad-core Intel or AMD, 2.5 GHz or faster
    • Memory: 8 GB RAM
    • Graphics Card: DirectX 11- or 12-compatible graphics card
  • Linux:
    • Operating System: Ubuntu 22.04
    • Processor: Quad-core Intel or AMD, 2.5 GHz or faster
    • Memory: 32 GB RAM
    • Video Card: NVIDIA GeForce 960 GTX or higher with the latest NVIDIA binary drivers
    • Video RAM: 8 GB or more
  • macOS:
    • Operating System: Latest macOS Ventura
    • Processor: Quad-core Intel, 2.5 GHz or faster
    • Memory: 8 GB RAM
    • Video Card: Metal 1.2-compatible graphics card

In my case, I’ve been writing this book with the following hardware:

  • Desktop:
    • Operating System: Windows 10 64-bit version
    • Processor: Intel Core i9 9900K @3.60GHz
    • Memory: 64 GB RAM
    • Graphics Card: NVIDIA GeForce RTX 3090ti
  • Laptop:
    • Operating System: Windows 10 64-bit version
    • Processor: Intel Core i7 9750H @ 2.60GHz
    • Memory: 16 GB RAM
    • Graphics Card: NVIDIA GeForce RTX 2070

Software requirements

This book assumes you have the Epic Games Launcher and Unreal Engine 5 installed and fully working on your computer.

Note

At the time of writing this book, the latest version of Unreal Engine is 5.1.1 but you will be able to follow along with any version more recent than 5.1.1.

Additionally, you’ll need an IDE supporting C++ and Unreal Engine. If you already have some past experience, chances are you have already installed Visual Studio 2019/2022 or JetBrains Rider; if you don’t, you will need to install one of them by the start of Chapter 4, Setting Up Your First Multiplayer Environment.

Note

This book assumes you have Visual Studio 2019 or 2022 installed and fully functional; however, it’s totally fine to use JetBrains Rider.

Setting up Visual Studio for Unreal Engine development

Once you have Visual Studio installed, you’ll need the following extra components to make it properly work with Unreal Engine:

  • C++ profiling tools
  • C++ AddressSanitizer
  • Windows 10 SDK
  • Unreal Engine installer

To include these tools, follow these steps:

  1. Open Visual Studio Installer.
  2. Select Modify from your own Visual Studio installation, selecting the version you will be using, as shown in Figure 1.1:
Figure 1.1 – Visual Studio Installer

Figure 1.1 – Visual Studio Installer

  1. Once the Modifying modal window opens, in the top bar, make sure you are in the Workloads section.
  2. Then, activate the Game development with C++ option by clicking the checkmark.
  3. Next, if it is closed, open Installation details | Game development with C++ | Optional from the right sidebar.
  4. Select C++ profiling tools, C++ AddressSanitizer, the latest Windows 10 SDK version available, and Unreal Engine installer, as shown in Figure 1.2.

Figure. 1.2 – Visual Studio with Unreal Engine installer activated

  1. Click the Install while downloading button (or the Download all, then install button) to start the installation process.

Once the download and installation process is finished, you will be ready to develop your own C++ games with Unreal Engine.

IDE support for Unreal Engine

Microsoft has recently introduced a new Unreal Engine integration extension for Visual Studio 2022 called IDE Support for Unreal Engine. This tool adds some new features such as Blueprint references, Blueprint assets, and CodeLens hints on top of Unreal Engine classes, functions, and properties.

To include this tool, follow these steps:

  1. Open the Workloads section if it has been closed.
  2. Activate the Game development with C++ option by clicking the checkmark.
  3. If it is closed, open Installation details | Game Development with C++ | Optional from the right sidebar.
  4. Select IDE support for Unreal Engine, as shown in Figure 1.3.
Figure 1.3 – Installing the IDE support

Figure 1.3 – Installing the IDE support

  1. Now install the tool.

Now that your IDE is properly configured, it’s time to gain some understanding of where multiplayer games come from. In the next section, you’ll learn a little bit of video game history.