Book Image

Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition

By : John P. Doran, William Sherif, Stephen Whittle
Book Image

Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition

By: John P. Doran, William Sherif, Stephen Whittle

Overview of this book

Unreal Engine 4 (UE4) is a popular and award-winning game engine that powers some of the most popular games. A truly powerful tool for game development, there has never been a better time to use it for both commercial and independent projects. With more than 100 recipes, this book shows how to unleash the power of C++ while developing games with Unreal Engine. This book takes you on a journey to jumpstart your C++ and UE4 development skills. You will start off by setting up UE4 for C++ development and learn how to work with Visual Studio, a popular code editor. You will learn how to create C++ classes and structs the Unreal way. This will be followed by exploring memory management, smart pointers, and debugging your code. You will then learn how to make your own Actors and Components through code and how to handle input and collision events. You will also get exposure to many elements of game development including creating user interfaces, artificial intelligence, and writing code with networked play in mind. You will also learn how to add on to the Unreal Editor itself. With a range of task-oriented recipes, this book provides actionable information about writing code for games with UE4 using C++. By the end of the book, you will be empowered to become a top-notch developer with UE4 using C++ as your scripting language!
Table of Contents (16 chapters)

Installing Unreal Engine 4 (UE4)

There are a number of steps to follow to install and configure UE4 properly. In this recipe, we'll walk through the correct installation and setup of the engine.

Getting ready

UE4 takes up quite a few GB of space, so you should have at least 20 GB or so free for the installation on the target drive. Note that every project is also at least 1 GB as well, so you will need more space on your computer (or an additional hard drive) for more projects you wish to create.

How to do it...

  1. Visit unrealengine.com in your web browser of choice:
  1. On the top-right corner of the screen, click on the Download button. You'll then be asked to create an Epic Games account. If you already have one, you can scroll down to the bottom of the screen and click the Sign in option.
  2. Run the installer for the Epic Games Launcher program by double-clicking the EpicGamesLauncherInstaller-x.x.x-xxx.msi installer. Install it in the default location.
  3. Once the Epic Games Launcher program is installed, open it by double-clicking its icon, which can be found on your desktop or in the Start menu:
  1. You'll need to sign in with the same login information you created or used earlier, and then you'll arrive at the main page of the launcher:
  1. There are a lot of available options, but we want to click on the Unreal Engine option on the top-left of the screen.
  2. Browse the start page and take a look around. Eventually, you will need to install an engine. Click on the large orange Install Engine button on the screen, as shown in the following screenshot:
  1. A pop-up dialog will ask you to agree to an End Licence Agreement. Afterwards, you'll be asked to choose an install location. Then, click the Install button:

The launcher will start downloading the engine. It is about 7 GB, so it may take a while. Once finished, your screen should look something like this:

After the engine has installed, the Install Engine button will change to a Launch Engine button.

How it works...

The Epic Games Launcher is the program that you need to start up the engine itself. It keeps a copy of all your projects and libraries in the Library tab.

There's more...

As you learn more about working in UE4, you should check out some of the free library packages in the Library | Vault section. For that, click the Library item on the left-hand side and scroll down until you see Vault, underneath My Projects.