Book Image

Blueprints Visual Scripting for Unreal Engine - Second Edition

By : Marcos Romero, Brenden Sewell
Book Image

Blueprints Visual Scripting for Unreal Engine - Second Edition

By: Marcos Romero, Brenden Sewell

Overview of this book

Blueprints is the visual scripting system in Unreal Engine that enables programmers to create baseline systems and can be extended by designers. This book helps you explore all the features of the Blueprint Editor and guides you through using Variables, Macros, and Functions. You’ll also learn about object-oriented programming (OOP) and discover the Gameplay Framework. In addition to this, you’ll learn how Blueprint Communication allows one Blueprint to access information from another Blueprint. Later chapters will focus on building a fully functional game using a step-by-step approach. You’ll start with a basic first-person shooter (FPS) template, and each chapter will build on the prototype to create an increasingly complex and robust game experience. You’ll then progress from creating basic shooting mechanics to more complex systems, such as user interface elements and intelligent enemy behavior. The skills you will develop using Blueprints can also be employed in other gaming genres. In the concluding chapters, the book demonstrates how to use arrays, maps, enums, and vector operations. Finally, you’ll learn how to build a basic VR game. By the end of this book, you’ll have learned how to build a fully functional game and will have the skills required to develop an entertaining experience for your audience.
Table of Contents (22 chapters)
Free Chapter
Section 1: Blueprint Fundamentals
Section 2: Developing a Game
Section 3: Enhancing the Game
Section 4: Advanced Blueprints

What this book covers

Chapter 1, Exploring the Blueprint Editor, covers the Blueprint Editor and all the panels that are integrated into it. We will explore the Components tab, the My Blueprint tab, the Details tab, and the Viewport and Event Graph tabs. Then, we will go through what Components are and how to add them to a Blueprint.

Chapter 2, Programming with Blueprints, explains programming concepts that are used in Blueprints. We will learn about how to use variables, operators, Events, Actions, Macros, and Functions.

Chapter 3, Actors and the Gameplay Framework, teaches OOP concepts and explores the Gameplay Framework.

Chapter 4, Understanding Blueprint Communication, explores different types of Blueprint Communication, which allows one Blueprint to access the information of another Blueprint.

Chapter 5, Object Interaction with Blueprints, covers how to bring new objects to a Level to help build the world in which the game will be set. We will move on to manipulating materials on objects, first through the object Editor, and then by triggering during runtime via Blueprints.

Chapter 6, Enhancing Player Abilities, teaches you how to use Blueprints to generate new objects during gameplay, and also, to link actions in Blueprints to player control inputs. You'll also learn about how to create Blueprints that allow objects to react to collisions with our generated projectiles.

Chapter 7, Creating Screen UI Elements, demonstrates setting up a Graphical User Interface (GUI) that will track the player's health, stamina, ammo, and current objective. Here, you will learn how to set up a basic UI using Unreal's GUI Editor and how to use Blueprints to link the interface to the gameplay values.

Chapter 8, Creating Constraints and Gameplay Objectives, covers how to constrain the player's abilities, define the gameplay objectives for a Level, and track those objectives. We'll walk through setting up collectible ammo packs that will refill the ammo of the player's gun, as well as utilizing the Level Blueprint to define a win condition for our game.

Chapter 9, Building Smart Enemies with Artificial Intelligence, is a crucial chapter that covers how to create an enemy zombie AI that will pursue the player around the Level. We'll walk through setting up a navigation mesh on our Level and see how to use Blueprints to get enemies to traverse between patrol points.

Chapter 10, Upgrading the AI Enemies, teaches us how to create a compelling experience by modifying the zombie AI to have states, in order to give the zombies a little more intelligence. In this chapter, we'll set up the patrol, searching, and attack states for the zombies by using visual and auditory detection. Additionally, we'll explore how to make new enemies appear gradually, as the game is playing.

Chapter 11, Game States and Applying the Finishing Touches, adds the finishing touches that are required to make our game a complete experience before we finalize our game for release. In this chapter, we'll create rounds that will make the game increasingly difficult, game saves so that the player can save their progress and return, and player death to make the game's challenge meaningful.

Chapter 12, Building and Publishing, covers how to optimize graphics settings to get our game performing and looking at its best, and how to set up project information for distribution. Then, we'll learn about how to create shareable builds of the game to various platforms.

Chapter 13, Data Structures and Flow Control, explains what data structures are and how they can be used to organize data in Blueprints. We'll learn about the concept of containers and how to use arrays, sets, and maps to group multiple elements. This chapter shows other ways to organize data using enumerations, structures, and data tables. In this chapter, we'll also see how to control the flow of execution of a Blueprint by using various types of flow control nodes.

Chapter 14, Math and Trace Nodes, covers some math concepts needed for 3D games. We will learn the difference between world and local coordinates and how to use them when working with Components. This chapter shows us how to use vectors to represent the position, direction, velocity, and distance. The concept of traces is explained and various types of traces are presented. We'll see how to use traces to test collisions in the game.

Chapter 15, Blueprints Tips, contains several tips to increase the quality of Blueprints. We will learn about how to use various Editor shortcuts that speed up our work. This chapter shows some Blueprint best practices that will help you decide where and what types of implementation should be done. Finally, we'll learn about more useful Blueprint miscellaneous nodes.

Chapter 16, Introduction to VR Development, explains some VR concepts and explores the VR template. This chapter explores the functionalities of the pawn and motion controller Blueprints of the VR template. This chapter explains how to implement new objects that can be grabbed by the player using motion controllers, and we will learn about the Blueprint actions used to implement teleportation.