Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Game Development Projects with Unreal Engine
Game Development Projects with Unreal Engine

Game Development Projects with Unreal Engine: Learn to build your first games and bring your ideas to life using UE4 and C++

Arrow left icon
Profile Icon Reis Profile Icon Hammad Fozi Profile Icon Gonçalo Marques Profile Icon David Pereira Profile Icon Devin Sherry +1 more Show less
Arrow right icon
$35.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (35 Ratings)
eBook Nov 2020 822 pages 1st Edition
eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m
Arrow left icon
Profile Icon Reis Profile Icon Hammad Fozi Profile Icon Gonçalo Marques Profile Icon David Pereira Profile Icon Devin Sherry +1 more Show less
Arrow right icon
$35.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (35 Ratings)
eBook Nov 2020 822 pages 1st Edition
eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m
eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Game Development Projects with Unreal Engine

2. Working with Unreal Engine

Overview

This chapter will focus on many of the basic concepts and features within Unreal Engine. You will be shown how to create a C++ project, how to perform some basic debugging, and how to work with character-specific animations.

By the end of this chapter, you'll be able to create C++ template projects, be able to debug code within Visual Studio, understand the folder structure and the best practices involved, and finally, be able to set up character animations based on their states.

Introduction

In the previous chapter, we went through the basics of the Epic Games Launcher, along with Unreal Editor fundamentals. We saw how to work with Objects and what Blueprints are on a basic level, in addition to exploring the First Person Template. In this chapter, we'll be building upon those fundamentals by exploring the Third Person Template and working with Input and Animations.

Game development can be done in a wide variety of languages, such as C, C++, Java, C#, and even Python. While each language has pros and cons, we will be using C++ throughout this book as it is the primary programming language used within the Unreal Engine.

In this chapter, we will get you up to speed on how to create a C++ project and basic level debugging in UE4. It is very important to be able to debug code as it helps the developer while dealing with bugs. The tools provided come in very handy and are essential for any Unreal Engine developer.

Following this, we will get up close...

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...

Content Folder Structure in Unreal Engine

In your project directory (E:/UnrealProjects/MyBlankProj in our case), you will observe a Content folder. This is the primary folder that your project uses for different types of assets and project-relevant data (including Blueprints). The C++ code goes into the Source folder in your project. Please note that the best practice is to create new C++ code files directly through the Unreal Editor as this simplifies the process and results in fewer errors.

There are many different strategies you can use to organize the data inside your Content folder. The most basic and easy-to-understand is using folder names to depict the type of content inside. Therefore, a Content folder directory structure may resemble the example at https://packt.live/3lCVFkR. In this example, you can see that each file is categorically placed under the name of the folder representing its type on the first level, with the following levels further grouping it into meaningful...

Working with the Visual Studio Solution

Every C++ project in Unreal Engine has a Visual Studio solution. This, in turn, drives all the code and provides developers with the ability to set up execution logic and debug code in its running state.

Solution Analysis

The Visual Studio solution (.sln) file that's produced inside the project directory contains the entire project and any associated code that's been added to it.

Let's have a look at the files present in Visual Studio. Double-click the .sln file to open it within Visual Studio.

In Solution Explorer, you will see two projects called Engine and Games.

The Engine Project

At the base level, Unreal Engine itself is a Visual Studio project and has its own solution file. This contains all the code and third-party integrations that work together in Unreal Engine. All the code within this project is called the "source" code.

The Engine project consists of the external dependencies, configurations...

Importing the Required Assets

Unreal Engine gives users the ability to import a wide range of file types for users to customize their projects. There are several import options that developers can tweak and play around with to match their required settings.

Some common file types that game developers often import are FBX for scenes, meshes, animations (exported from Maya and other similar software), movie files, images (mostly for the user interface), textures, sounds, data in CSV files, and fonts. These files may be obtained from the Epic Marketplace or any other means (such as the internet) and used within the project.

Assets can be imported by dragging and dropping them into the Content folder, or by clicking the Import button in the Content Browser.

Now let's tackle an exercise where we'll learn how to import FBX files and see how this is done.

Exercise 2.03: Importing a Character FBX File

This exercise will focus on importing a 3D model from an FBX file...

The Unreal Game Mode Class

Consider a situation where you want to be able to pause your game. All the logic and implementation required to be able to pause the game will be placed inside a single class. This class will be responsible for handling the game flow when a player enters the game. The game flow can be any action or a set of actions occurring in the game. For example, game pause, play, and restart are considered simple game flow actions. Similarly, in the case of a multiplayer game, we require all the network-related gameplay logic to be placed together. This is exactly what the Game Mode class is there for. 

Game Mode is a class that drives the game logic and imposes game-related rules on players. It essentially contains information about the current game being played, including gameplay variables and events, which are mentioned later on in this chapter. Game Mode can hold all the managers of the gameplay objects, it's a singleton class, and is directly accessible...

Levels

Levels, in gaming, are a section or a part of a game. Since many games are quite large, they are broken down into different levels. A level of interest is loaded into the game for the player to play, and then when they are done with that, another level may be loaded in (while the current one will be loaded out) so that the player can proceed. To complete a game, a player usually needs to complete a set of specific tasks to move on to the next level, eventually completing the game.

A Game Mode can be directly applied to the level. The level, upon loading, will use the assigned Game Mode class to handle all logic and gameplay for that particular level and override the game mode of the project for this level. This can be applied using the World Settings tab after opening a level.

A Level Blueprint is a blueprint that runs with the level, but cannot be accessed outside the scope of the level. Game Mode can be accessed in any blueprint (including the level blueprint) by...

Animations

Animation is essential for adding life and richness to a game. Superb animations are one of the major factors that differentiate average games from the good and the great from the best. Visual fidelity is what keeps gamers excited and immersed in games, and hence animations are a core part of all games and experiences created in Unreal Engine.

Note

This chapter seeks to cover animation basics. A more in-depth approach to animation will be taken in Chapter 13, Blend Spaces 1D, Key Bindings, and State Machines.

Animation Blueprints

An Animation Blueprint is a specific kind of blueprint that allows you to control the animation of a Skeletal Mesh. It provides users with a graph specifically for animation-related tasks. Here, you can define the logic for computing the poses of a skeleton.

Note

A Skeletal Mesh is a skeleton-based mesh that has bones, all of which come together to give form to the mesh, whereas a Static Mesh (as the name suggests) is an un-animatable...

Summary

To summarize this chapter, we first learned how to create an empty project. Then, we learned about the folder structure and how to organize files in the project directory. After that, we looked at template-based projects. We also learned how to set breakpoints in code so that we can watch variable values and debug entire objects while the game is running, which would help us find and eradicate bugs in our code.

Thereafter, we saw how Game Mode, Player Pawn, and Player Controller are relevant classes used in Unreal Engine for setting up game flows (the execution order of code), as well as how they are set up inside a project.

Finally, we transitioned toward animation basics and worked with State Machines, Blend Spaces 1D, and Animation Blueprints to make our character animate (walk/run and jump) within the game according to the keyboard input.

Throughout this chapter, we became more familiar with the powerful tools in Unreal Engine that are essential to game development...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Kickstart your career or dive into a new hobby by exploring game design with UE4 and C++
  • Learn the techniques needed to prototype and develop your own ideas
  • Reinforce your skills with project-based learning by building a series of games from scratch

Description

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.

Who is this book for?

This book is suitable for anyone who wants to get started using UE4 for game development. It will also be useful for anyone who has used Unreal Engine before and wants to consolidate, improve and apply their skills. To grasp the concepts explained in this book better, you must have prior knowledge of the basics of C++ and understand variables, functions, classes, polymorphism, and pointers. For full compatibility with the IDE used in this book, a Windows system is recommended.

What you will learn

  • Create a fully-functional third-person character and enemies
  • Build navigation with keyboard, mouse, gamepad, and touch controls
  • Program logic and game mechanics with collision and particle effects
  • Explore AI for games with Blackboards and Behavior Trees
  • Build character animations with Animation Blueprints and Montages
  • Test your game for mobile devices using mobile preview
  • Add polish to your game with visual and sound effects
  • Master the fundamentals of game UI design using a heads-up display

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 27, 2020
Length: 822 pages
Edition : 1st
Language : English
ISBN-13 : 9781800203488
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 27, 2020
Length: 822 pages
Edition : 1st
Language : English
ISBN-13 : 9781800203488
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$12.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$129.99 billed annually
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$179.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 177.97
Blueprints Visual Scripting for Unreal Engine
$89.99
Game Development Projects with Unreal Engine
$43.99
Hands-On Artificial Intelligence with Unreal Engine
$43.99
Total $ 177.97 Stars icon
Visually different images

Table of Contents

18 Chapters
1. Unreal Engine Introduction Chevron down icon Chevron up icon
2. Working with Unreal Engine Chevron down icon Chevron up icon
3. Character Class Components and Blueprint Setup Chevron down icon Chevron up icon
4. Player Input Chevron down icon Chevron up icon
5. Line Traces Chevron down icon Chevron up icon
6. Collision Objects Chevron down icon Chevron up icon
7. UE4 Utilities Chevron down icon Chevron up icon
8. User Interfaces Chevron down icon Chevron up icon
9. Audio-Visual Elements Chevron down icon Chevron up icon
10. Creating a SuperSideScroller Game Chevron down icon Chevron up icon
11. Blend Spaces 1D, Key Bindings, and State Machines Chevron down icon Chevron up icon
12. Animation Blending and Montages Chevron down icon Chevron up icon
13. Enemy Artificial Intelligence Chevron down icon Chevron up icon
14. Spawning the Player Projectile Chevron down icon Chevron up icon
15. Collectibles, Power-Ups, and Pickups Chevron down icon Chevron up icon
16. Multiplayer Basics Chevron down icon Chevron up icon
17. Remote Procedure Calls Chevron down icon Chevron up icon
18. Gameplay Framework Classes in Multiplayer Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(35 Ratings)
5 star 77.1%
4 star 17.1%
3 star 0%
2 star 2.9%
1 star 2.9%
Filter icon Filter
Top Reviews

Filter reviews by




Christopher May 30, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Fantastic tool for Unreal Engine beginners! You can't go wrong with making this investment to motivate yourself learning more about UE4. With UE5 around the corner, it's a great time idea to start at the beginning and get knowledgeable about the fundamentals of Unreal Engine. I highly recommend.
Amazon Verified review Amazon
Frederico Ribeiro Barnabe Aug 03, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ótimo produto eu recomendo
Amazon Verified review Amazon
saiga Jan 08, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a very well thought out guide to getting you started developing with the Unreal Engine. There is a good overview of the Unreal Editor including blueprints, animations, actors, line traces, etc. There are sample game projects you build in the later chapters to use all of the core concepts learned through the first several chapters of the book. Overall this is an outstanding beginners guide to developing with Unreal and is a great place to start if you are just getting started or don't fully know how to use the engine.
Amazon Verified review Amazon
Carlos A Dec 02, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Disclaimer: I was contacted by the authors of the book and gifted a review copy.I'm reading the book and I'm loving it a lot!Great references and practical examples to start to develop in UE4. I have some experience watching some video tutorials about the engine, and I prefer this way to learn, is more specific and you can progress step by step. I would like to see expanded screenshots, or some references to find better each interface, if you are new with the engine this could be an obstacle to reading it fluidly. Except for that, the book is an excellent resource.
Amazon Verified review Amazon
Terrance C. May 26, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Regardless of your level of experience, I think this book does a good job of leading the reader through the journey of learning how to build games with the Unreal Engine. I’m an experienced game developer, but my experience with Unreal is dated. So this was a great opportunity for me to brush-off and update my Unreal knowledge. I’m thankful that an Editor from Packt Publishing offered me a free copy of this book for my honest review here.I will say, I’m not sure who is the target audience for this book. On one hand, its instruction is step-by-step from the very basics of using Visual Studio, to some of the more advanced topics like roles and authority in multiplayer programming. That’s a lot of ground to cover. And someone who’s familiar enough with C++ to be implementing multiplayer logic is likely to already be familiar with Visual Studio. But this book is successful at making few assumptions about the reader’s level, and takes the reader through every step.The risk with trying to accommodate a wide range of experience levels, is that books like this will inevitably lose beginners, or bore experts. I think that this book strikes an excellent balance between filling-in the gaps, while still offering enough meat for experienced developers to pick up tips & tricks, and to learn some things they’ve missed.Another tricky balance that technical tutorials of this kind must make, is covering theory for the generalized cases, while drilling down into specific examples to ground the theory. Again, this text does a good job of balancing those. The concepts are presented well, and then grounded in the continuous thread of building a simple but real-world game with Unreal.The only criticism I would have is that the language and grammar isn’t perfect. Examples abound. In some instances, I’ve had to read a sentence or paragraph multiple times to follow the idea. This was not because of the technical discussion (I’m on the more experienced end), but because the language is a bit confusing. It’s not often, and does not substantially detract from the learning process. But if you’re not a native English speaker, or are sensitive to precise grammar, you may struggle with some parts of the book. The topic is already an advanced one, so concise and readable language makes a difference. This book is successful, but with some friction.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.