Book Image

Unreal Engine 4 Game Development Quick Start Guide

By : Rachel Cordone
Book Image

Unreal Engine 4 Game Development Quick Start Guide

By: Rachel Cordone

Overview of this book

Unreal Engine is a popular game engine used by developers for building high-end 2D and 3D games. This book is a practical guide designed to help you get started with Unreal Engine 4 and confidently develop interactive games. You’ll begin with a quick introduction to the Unreal Engine 4 (UE4) ecosystem. Next, you’ll learn how to create Blueprints and C++ code to define your game's functionality. As you progress, you’ll cover the core systems of UE4 such as Unreal Motion Graphics (UMG), Animation Blueprints, and behaviour trees to further build on your game development knowledge. The concluding chapters will then help you learn how to use replication to create multiplayer games. By the end of this book, you will be well-versed with UE4 and have developed the skills you need to use the framework for developing and deploying robust and intuitive games.
Table of Contents (10 chapters)

The Profiler

By using the Profiler, we can create a recording of the game's performance as it's running, and then take a look at the stats to see how long it's taking our code to run.

To test this, we're going to need to purposely make some terrible code:

  1. Open the ThirdPersonCharacter Blueprint
  2. In the Event Graph, create the Tick event
  3. Create a ForLoop and connect it to the Tick event
  4. In the ForLoop, set the Last Index to 10000
  5. Create a new integer variable and name it TestInt
  6. Create a SET variable for TestInt and connect it to the Loop Body and Index outputs of the ForLoop

The code should look like this:

This is some horribly unoptimized code—and is perfect for our needs. Let's create the profile for our game.

Under the Play button's drop-down menu, make sure that the Number of Players is set to 1 if it was still set to 2 for our multiplayer...