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
Arrow up icon
GO TO TOP
Game Development Projects with Unreal Engine

You're reading from   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
Product type Paperback
Published in Nov 2020
Publisher Packt
ISBN-13 9781800209220
Length 822 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (5):
Arrow left icon
 Reis Reis
Author Profile Icon Reis
Reis
Hammad Fozi Hammad Fozi
Author Profile Icon Hammad Fozi
Hammad Fozi
Gonçalo Marques Gonçalo Marques
Author Profile Icon Gonçalo Marques
Gonçalo Marques
David Pereira David Pereira
Author Profile Icon David Pereira
David Pereira
Devin Sherry Devin Sherry
Author Profile Icon Devin Sherry
Devin Sherry
+1 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

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

Blueprint Actors

In UE4, the word Blueprint can be used to refer to two different things: UE4's visual scripting language or a specific type of asset, also referred to as a Blueprint class or Blueprint asset.

As we've mentioned before, an Actor is an object that can be placed in a level. This object can either be an instance of a C++ class or an instance of a Blueprint class, both of which must inherit from the Actor class (either directly or indirectly). So, what is the difference between a C++ class and a Blueprint class, you may ask? There are a few:

  • If you add programming logic to your C++ class, you'll have access to more advanced engine functionality than you would if you were to create a Blueprint class.
  • In a Blueprint class, you can easily view and edit visual components of that class, such as a 3D mesh or a Trigger Box Collision, as well as modifying properties defined in the C++ class that is exposed to the editor, which makes managing those properties much easier.
  • In a Blueprint class, you can easily reference other assets in your project, whereas in C++, you can also do so but less simply and less flexibly.
  • Programming logic that runs on Blueprint visual scripting is slower in terms of performance than that of a C++ class.
  • It's simple to have more than one person work on a C++ class simultaneously without conflicts in a source version platform, whereas with a Blueprint class, which is interpreted as a binary file instead of a text file, this will cause conflicts in your source version platform if two different people edit the same Blueprint class.

    Note

    In case you don't know what a source version platform is, this is how several developers can work on the same project and have it updated with the work done by other developers. In these platforms, different people can usually edit the same file simultaneously, as long as they edit different parts of that file, and still receive updates that other programmers did without them affecting your work on that same file. One of the most popular source version platforms is GitHub.

Keep in mind that Blueprint classes can inherit either from a C++ class or from another Blueprint class.

Lastly, before we move on to creating our first Blueprint Class, another important thing you should know is that you can write programming logic in a C++ class and then create a Blueprint class that inherits from that class, but can also access its properties and methods if you specify that in the C++ class. You can have a Blueprint class edit properties defined in the C++ class as well as calling and overriding functions, using the Blueprint scripting language. We will be doing some of these things in this book.

Now that you know a bit more about Blueprint classes, let's create our own in this next exercise.

Exercise 1.03: Creating Blueprint Actors

In this short exercise, we will learn how to create a new Blueprint Actor.

The following steps will help you complete this exercise:

  1. Go to the ThirdPersonCPP -> Blueprints directory inside Content Browser and right-click inside it. The following window should pop up:
    Figure 1.18: The options window that appears when you right-click inside content browser

    Figure 1.18: The options window that appears when you right-click inside content browser

    This options menu contains the types of assets that you can create in UE4 (Blueprints are simply a type of asset, along with other types of assets, such as Level, Material, and Sound).

  2. Click the Blueprint Class icon to create a new Blueprint class. When you do, you will be given the option to choose the C++ or Blueprint class that you want to inherit from:
    Figure 1.19: The Pick Parent Class window that pops up when you 
create a new Blueprint class

    Figure 1.19: The Pick Parent Class window that pops up when you create a new Blueprint class

  3. Select the first class from this window, the Actor class. After this, you will automatically select the text of the new Blueprint class to easily name it what you want. Name this Blueprint class TestActor and press the Enter key to accept this name.

After following these steps, you will have created your Blueprint class and so have completed this exercise. After you've created this asset, double-click on it with the left mouse button to open the Blueprint editor.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images