Book Image

Game Development Projects with Unreal Engine

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

Game Development Projects with Unreal Engine

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

Overview of this book

Game development can be both a creatively fulfilling hobby and a full-time career path. It's also an exciting way to improve your C++ skills and apply them in engaging and challenging projects. Game Development Projects with Unreal Engine starts with the basic skills you'll need to get started as a game developer. The fundamentals of game design will be explained clearly and demonstrated practically with realistic exercises. You’ll then apply what you’ve learned with challenging activities. 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. In this project, you'll explore line traces, collisions, projectiles, user interface, and sound effects, combining these concepts to showcase your new skills. You'll then move on to the second project; a side-scroller game, where you'll implement concepts including animation blending, enemy AI, spawning objects, and collectibles. The final project is an FPS game, where you will cover the key concepts behind creating a multiplayer environment. By the end of this Unreal Engine 4 game development book, you'll have the confidence and knowledge to get started on your own creative UE4 projects and bring your ideas to life.
Table of Contents (19 chapters)
Preface

Creating and Setting Up a Blank C++ Project

At the start of every project, you might 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 might need to set up a blank or an 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.

The following steps will help you complete this exercise:

  1. Launch Unreal Engine 4.24 from the Epic Games Launcher.
  2. Click on the Games section and click Next.
  3. Make sure the Blank project template is selected and click Next.
  4. Click the Blueprint section dropdown and select C++.

    Note

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

    When everything is set up, click on the Create Project 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 follow 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).

    You will notice that after it's done generating code and creating the project files, the project will be opened, along with its Visual Studio solution (.sln) file.

    Note

    Make sure 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, we now know how to create an empty C++ project on UE4, along with its considerations.

In the next section, we'll be talking a bit about the folder structure, along with the most basic and most used folder structure format that's used by Unreal developers.