Book Image

Elevating Game Experiences with Unreal Engine 5 - Second Edition

By : Gonçalo Marques, Devin Sherry, David Pereira, Hammad Fozi
Book Image

Elevating Game Experiences with Unreal Engine 5 - Second Edition

By: Gonçalo Marques, Devin Sherry, David Pereira, Hammad Fozi

Overview of this book

Immerse yourself in the Unreal game projects with this book, written by four highly experienced industry professionals with many years of combined experience with Unreal Engine. Elevating Game Experiences with Unreal Engine 5 will walk you through the latest version of Unreal Engine by helping you get hands-on with the game creation projects. The book starts with an introduction to the Unreal Editor and key concepts such as actors, blueprints, animations, inheritance, and player input. You'll then move on to the first of three projects, building a dodgeball game, where you'll learn the concepts of line traces, collisions, projectiles, user interface, and sound effects. You’ll also discover how to combine these concepts to showcase your new skills. The second project, a side-scroller game, will help you implement concepts such as animation blending, enemy AI, spawning objects, and collectibles. And finally, you'll cover the key concepts in creating a multiplayer environment as you work on the third project, an FPS game. By the end of this Unreal Engine book, you'll have a broad understanding of how to use the tools that the game engine provides to start building your own games.
Table of Contents (21 chapters)

Creating and setting up a blank C++ project

At the start of every project, you may want to start with any of the templates provided by Epic (which contain ready-to-execute basic code) and build on top of that. Most/some of the time, you may need to set up a blank or empty project that you can mold and sculpt to your requirements. We’ll learn how to do that in the following exercise.

Exercise 2.01 – creating an empty C++ project

In this exercise, you will learn how to create an empty C++ project from the template provided by Epic. This will serve as the foundation for many of your future C++ projects.

Follow these steps to complete this exercise:

  1. Launch UE5 from the Epic Games Launcher.
  2. Click on the BLANK PROJECT section and click Blank.
  3. Under the Project Defaults section on the right pane, select C++.

Note

Make sure that the project folder and project name are specified with an appropriate directory and name, respectively.

  1. When everything is set up, click on the Create button. In this case, our project directory is inside a folder called UnrealProjects, which is inside the E drive. The project name is set to MyBlankProj (it is recommended that you use these names and project directories, but you can use your own if you wish to do so).

Note

The project name cannot have any spaces in it. It is preferable to have an Unreal directory as close to the root of a drive as possible (to avoid running into issues such as the 256-character path limit when creating or importing assets into your project’s working directory; for small projects, it may be fine, but for more large-scale projects, where the folder hierarchy may become too complex, this step is important).

  1. After it’s done generating the code and creating the project files, the project will open, along with its Visual Studio solution (.sln) file.

Make sure that the Visual Studio solution configuration is set to Development Editor and that the solution platform is set to Win64 for desktop development:

Figure 2.1 – Visual Studio deployment settings

Figure 2.1 – Visual Studio deployment settings

By completing this exercise, you know how to create an empty C++ project on UE5, along with its considerations.

In the next section, we’ll talk about the folder structure, along with the most basic and most used folder structure format that’s used by Unreal developers.