Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore 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
Unreal Engine 4.X By Example
Unreal Engine 4.X By Example

Unreal Engine 4.X By Example: An example-based practical guide to get you up and running with Unreal Engine 4.X

Arrow left icon
Profile Icon Carnall
Arrow right icon
Mex$631.99 Mex$902.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (6 Ratings)
eBook Jul 2016 506 pages 1st Edition
eBook
Mex$631.99 Mex$902.99
Paperback
Mex$1128.99
Subscription
Free Trial
Arrow left icon
Profile Icon Carnall
Arrow right icon
Mex$631.99 Mex$902.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (6 Ratings)
eBook Jul 2016 506 pages 1st Edition
eBook
Mex$631.99 Mex$902.99
Paperback
Mex$1128.99
Subscription
Free Trial
eBook
Mex$631.99 Mex$902.99
Paperback
Mex$1128.99
Subscription
Free Trial

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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

Unreal Engine 4.X By Example

Chapter 2. Blueprints and Barrels – Your First Game

Welcome to Blueprints and Barrels! During this chapter, you will be introduced to the visual scripting system called Blueprint. This system will be your first entry point toward creating customized functionality and content, using UE4. This chapter will show you the basics of how to create and work with Blueprints to achieve the same level of freedom that any other text based scripting language can provide. You will also expand on the engine navigational skills you learned in the previous chapter as we delve into the more complicated facets of the Editor panel and how you can communicate between the different components of the engine. You will learn all this by creating your very first UE game project, Barrel Hopper.

This chapter will cover the following points:

  • Creating Blueprints
  • Navigating the Blueprint GUI
  • How to find Blueprint functions
  • Basic coding functionality with Blueprint (logical nodes, objects, and events)
  • Game...

Creating your first Blueprint

Now, it is time to create your first Blueprint. Instead of jumping straight into a new project, I can't think of a better place to create your first Blueprint than our Hello World project. It is time to give our Hello Sphere an upgrade! The first thing we need to do is create a Blueprint from our actor. To do this, we need to select the HelloSphere actor by clicking on the Actor in the viewport or selecting the HelloSphere name in the World Outlier. This will populate our Details Panel with the appropriate options. Just next to the Add Component button, there is a Blueprint/Add Script button, click on this now:

Creating your first Blueprint

You will be prompted to save the Blueprint we are about to create in some folder within our Content Browser. For now, save the blueprint in the Content folder directly. Name this Bluerpint HelloUnrealBP and press the green Create Blueprint button.

The Blueprint window

You will have been presented with an entirely new window, the Blueprint window....

Modifying the Hello Sphere Blueprint

Double-click on the HelloUnrealBP to open it. Now, you should be able to see our spherical friend front and center within the Viewport. You will also notice that the components we added to our Hello Sphere can be found in the Components panel and as variables in the My Blueprint panel. This is so that we can get references to our components within our Blueprint Graphs.

Our goal is to have it, so we can approach our Hello sphere and the 3D text will change from Hello World to Hello Player. To do this, we are going to need to add another component, work with the Blueprints Event Graph, and utilize an Event.

The first thing we need to do is provide a volume we can use to detect other overlapping actors. To do this, we need to add a SphereCollision component via the Add Component button in the top-left corner of the Blueprint window. Do this now, and name it SphereCollision. With the new component selected in the Components panel, you should be able to see...

Creating the Barrel Hopper project!

We are going to create our Barrel Hopper project the same way we created our Hello World project. Load the UE4.11 clients and create a new project that is a Blank Blueprint project titled Barrel Hopper. For this project, we are going to need a few things. We are going to need a Character that can move around and jump, a camera that provides us a side on view, barrels that can spawn and will despawn the player when collided with, and a level for all of these elements to exist in.

Creating our Character

We are going to be creating our first UE Character. To construct our character, we will create a new Blueprint that inherits from the UE4 UCharacter class. UCharacters are designed to be possessed and controlled by various controllers while utilizing UE character movement and physics backend. As UCharacter is at the bottom of the UObject hierarchy, it is the most developed of the objects, inheriting all of the parent object's public or protected functionality. The relationship between UCharacters and the engine will be described in more detail in Chapter 4, Unreal Engine, C++, and You.

Before we create the character, we need to set up our file hierarchy in the Content Browser so that our assets are organized in a logical manner. To create folders simply right-click on the folder hierarchy on the left-hand side of the Content Browser panel and select New Folder. Create a folder now titled Barrel_Hopper, and within that folder, create one titled Character. Every...

Game modes and how to make them

Game Modes in Unreal Engine are a set of instructions that inform the engine which objects to use for things such as the players default pawn (default character to use), the game rules, and what state objects to use for processes such as HUD, Player states, and Game states. We will not only be creating custom game modes but also custom objects for each of the game mode classes. To create a game mode, simply open the blueprint wizard by right-clicking on the appropriate content browser folder and choose to create Game Mode Blueprint.

As we are creating a new category of objects, I would also advise creating a Game_Mode folder in our content browser. Name this new game mode BH_GameMode and save it within the new Game_Mode folder. When you open the game mode blueprint, you will be presented with the standard Blueprint window. You will notice that this object does not have many components, only itself and a default scene root. This is because game modes will...

Creating your first Blueprint


Now, it is time to create your first Blueprint. Instead of jumping straight into a new project, I can't think of a better place to create your first Blueprint than our Hello World project. It is time to give our Hello Sphere an upgrade! The first thing we need to do is create a Blueprint from our actor. To do this, we need to select the HelloSphere actor by clicking on the Actor in the viewport or selecting the HelloSphere name in the World Outlier. This will populate our Details Panel with the appropriate options. Just next to the Add Component button, there is a Blueprint/Add Script button, click on this now:

You will be prompted to save the Blueprint we are about to create in some folder within our Content Browser. For now, save the blueprint in the Content folder directly. Name this Bluerpint HelloUnrealBP and press the green Create Blueprint button.

The Blueprint window

You will have been presented with an entirely new window, the Blueprint window. This will...

Modifying the Hello Sphere Blueprint


Double-click on the HelloUnrealBP to open it. Now, you should be able to see our spherical friend front and center within the Viewport. You will also notice that the components we added to our Hello Sphere can be found in the Components panel and as variables in the My Blueprint panel. This is so that we can get references to our components within our Blueprint Graphs.

Our goal is to have it, so we can approach our Hello sphere and the 3D text will change from Hello World to Hello Player. To do this, we are going to need to add another component, work with the Blueprints Event Graph, and utilize an Event.

The first thing we need to do is provide a volume we can use to detect other overlapping actors. To do this, we need to add a SphereCollision component via the Add Component button in the top-left corner of the Blueprint window. Do this now, and name it SphereCollision. With the new component selected in the Components panel, you should be able to see...

Creating the Barrel Hopper project!


We are going to create our Barrel Hopper project the same way we created our Hello World project. Load the UE4.11 clients and create a new project that is a Blank Blueprint project titled Barrel Hopper. For this project, we are going to need a few things. We are going to need a Character that can move around and jump, a camera that provides us a side on view, barrels that can spawn and will despawn the player when collided with, and a level for all of these elements to exist in.

Creating our Character


We are going to be creating our first UE Character. To construct our character, we will create a new Blueprint that inherits from the UE4 UCharacter class. UCharacters are designed to be possessed and controlled by various controllers while utilizing UE character movement and physics backend. As UCharacter is at the bottom of the UObject hierarchy, it is the most developed of the objects, inheriting all of the parent object's public or protected functionality. The relationship between UCharacters and the engine will be described in more detail in Chapter 4, Unreal Engine, C++, and You.

Before we create the character, we need to set up our file hierarchy in the Content Browser so that our assets are organized in a logical manner. To create folders simply right-click on the folder hierarchy on the left-hand side of the Content Browser panel and select New Folder. Create a folder now titled Barrel_Hopper, and within that folder, create one titled Character. Every time...

Game modes and how to make them


Game Modes in Unreal Engine are a set of instructions that inform the engine which objects to use for things such as the players default pawn (default character to use), the game rules, and what state objects to use for processes such as HUD, Player states, and Game states. We will not only be creating custom game modes but also custom objects for each of the game mode classes. To create a game mode, simply open the blueprint wizard by right-clicking on the appropriate content browser folder and choose to create Game Mode Blueprint.

As we are creating a new category of objects, I would also advise creating a Game_Mode folder in our content browser. Name this new game mode BH_GameMode and save it within the new Game_Mode folder. When you open the game mode blueprint, you will be presented with the standard Blueprint window. You will notice that this object does not have many components, only itself and a default scene root. This is because game modes will...

Creating and receiving input events


Now that we can see our character in the game world, it is time to get him moving! We are going to create some input events via our project settings, then receive those events in our BH_Character Blueprint. Let's start by setting up some input axis mappings and input action mappings. These mappings simply bind an input, that is, a key press or mouse change, to an axis event or action event that we can receive in our objects. Axis mappings should be used when you wish to receive varying levels from an input, these are most commonly used for analogue inputs such as joysticks and mouse movements. Whereas action mappings should be used when you wish to input from something that has no variable movement, for example, a button or key press.

Creating the input Events

Sometimes, you may need to create action or axis mappings that receive input from multiple sources. You may need to create an axis mapping for aiming that can take in input from both the mouse and...

Building the level!


UE provides a very in-depth and multi-use editor. From this editor, developers are able to create amazing and high-detail levels, the combination of editor tools present in UE4 creates a developer environment where the most limiting factor is the imagination! For the scope of this chapter, we will be using a limited tool set of the editor to act as an introduction to building levels with UE4. Each of the game projects you will create during the course of this book will require a new approach to building levels. This chapter will teach you the fundamentals of level creation and manipulation while teaching you some tricks to make position world geometry a breeze. We are going to take the default level arrangement from this:

To a more realized gameplay level, like this:

For this process, we are going to be creating a new level. To do this navigate to File | New Level and select the option default. Save this level as Barrel_Hopper_Map.

Camera tips and tricks

It's time for us...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • A unique resource on Unreal with an interactive example based approach that is sure to get you up and running immediately
  • Will feature four unique game projects that increase in complexity which will enable readers to build their game development skills using Unreal Engine 4 and the C++ programming language
  • Will be the most up to date book in the market on Unreal with full coverage of the new features of UE4

Description

With Unreal Engine 4 being made free to use, for any keen game developer it is quickly becoming the most popular game engine in today’s development industry. The engine offers a rich feature set that can be customized and built upon through the use of C++. This book will cover how to work with Unreal Engine’s tool set all the way from the basics of the editor and the visual scripting system blueprint to the in-depth low-level creation of content using C++. This book will provide you with the skills you need to create feature-rich, captivating, and refined game titles with Unreal Engine 4. This book will take you through the creation of four unique game projects, designed so that you will be ready to apply the engine’s rich development capabilities. You will learn not only to take advantage of the visual tools of the engine, but also the vast and powerful programming feature set of Unreal Engine 4.

Who is this book for?

Unreal Engine 4.X by Example was written for keen developers who wish to learn how to fully utilise Unreal Engine 4 to make awesome and engrossing game titles. Whether you are brand new to game development or a seasoned expert, you will be able to make use of the engine with C++. Experience with both C++ and other game engines is preferred before embarking on the Unreal by Example journey, but with a little external research into the basics of C++ programming, this book can take a complete game development novice to an Unreal Engine Developer!

What you will learn

  • Use C++ with Unreal Engine to boost the development potential of any Unreal Engine project
  • Vastly improve workflow and content creation with the visual scripting system blueprint
  • Design, test, and implement interesting game worlds using Unreal Engines built-in editor
  • Build a networked, feature-rich first person shooter that you can play with others over LAN
  • Build design-centric game worlds that play to needs of your game ideas
  • Paint your game worlds via the creation and modification of visual shaders called materials
  • Gain knowledge of other game development disciplines through the use of the Animation and Material tool sets
  • Create feature-rich game projects with a sophisticated visual quality and feature set

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 29, 2016
Length: 506 pages
Edition : 1st
Language : English
ISBN-13 : 9781785889240
Vendor :
Epic Games
Languages :
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 29, 2016
Length: 506 pages
Edition : 1st
Language : English
ISBN-13 : 9781785889240
Vendor :
Epic Games
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ 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
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ 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 Mex$85 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ 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 Mex$85 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Mex$ 3,221.97
Mastering Unreal Engine 4.X
Mex$1128.99
3D Game Design with Unreal Engine 4 and Blender
Mex$963.99
Unreal Engine 4.X By Example
Mex$1128.99
Total Mex$ 3,221.97 Stars icon

Table of Contents

11 Chapters
1. Introduction to Unreal Engine 4 Chevron down icon Chevron up icon
2. Blueprints and Barrels – Your First Game Chevron down icon Chevron up icon
3. Advanced Blueprint, Animation, and Sound Chevron down icon Chevron up icon
4. Unreal Engine, C++, and You Chevron down icon Chevron up icon
5. Upgrade Activated – Making Bounty Dash with C++ Chevron down icon Chevron up icon
6. Power Ups for Your Character, Power Ups for the User Chevron down icon Chevron up icon
7. Boss Mode Activated – Unreal Robots Chevron down icon Chevron up icon
8. Advanced AI and Unreal Rendering Chevron down icon Chevron up icon
9. Creating a Networked Shooter Chevron down icon Chevron up icon
10. Goodbyes and Thank yous Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2
(6 Ratings)
5 star 33.3%
4 star 16.7%
3 star 0%
2 star 33.3%
1 star 16.7%
Filter icon Filter
Top Reviews

Filter reviews by




Dejan Seguljev Oct 19, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent for those who have experience in development but no prior experience with Unreal Engine.
Amazon Verified review Amazon
William Lumley Jan 12, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book. Easy to read and really walks you through building some quality example projects quite well.
Amazon Verified review Amazon
Patrick Yee Feb 07, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
It's an okay instructional book, but it is not a textbook. There are portions of the book that should be rewritten where you start to think outside of the box to be inside the box, if that makes sense. It's all about the code, even blueprints, so you are not dealing with the details of a designer. So, you can go through this book really fast, but the wording and the bold face or lack of may distract you. The images to help you aren't in color and it's hard to use as reference.
Amazon Verified review Amazon
Not a fan Oct 13, 2016
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Lots of typos, variables that change names, unclear directions... If you buy this book, be prepared to spend a few hours trying to figure out what the author meant.This book is definitely not worse the price.
Amazon Verified review Amazon
Aleksandr Palatnik Nov 07, 2016
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
The information in this book is good, but somewhat outdated with the newest Unreal Engine (4.13.2), which is understandable. That's not the main issue, though.My bigger problem with this is that the book needed a lot more editing since it has MANY typos/errors, some of which are in the code examples and lead to totally cryptic errors. The book also occasionally fails to mention necessary steps, once leading to an editor segfault for me (nullptr GameMode because the book never mentions to set it as the default mode). At the time of writing, there are no errata posted on the Packt page addressing this stuff.I'm sticking with this book because, again, for the most part the information is good, but there is the added cost that I have to do quite a bit of research and/or bugfixing to deal with the errors. I expect that with any program-specific tutorial book, but there's more than usual in this book, so I can't recommend it.
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.