Book Image

Mastering Unreal Engine 4.X

By : Muhammad A.Moniem
Book Image

Mastering Unreal Engine 4.X

By: Muhammad A.Moniem

Overview of this book

Unreal Engine 4 has garnered a lot of attention in the gaming world because of its new and improved graphics and rendering engine, the physics simulator, particle generator, and more. This book is the ideal guide to help you leverage all these features to create state-of-the-art games that capture the eye of your audience. Inside we’ll explain advanced shaders and effects techniques and how you can implement them in your games. You’ll create custom lighting effects, use the physics simulator to add that extra edge to your games, and create customized game environments that look visually stunning using the rendering technique. You’ll find out how to use the new rendering engine efficiently, add amazing post-processing effects, and use data tables to create data-driven gameplay that is engaging and exciting. By the end of this book, you will be able to create professional games with stunning graphics using Unreal Engine 4!
Table of Contents (22 chapters)
Mastering Unreal Engine 4.X
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Preface

This book is an in-depth guide through the process of creating a high quality game from scratch, starting from importing and implementing assets and ending up with packaging the game for release and making patches, with all the steps in-between. The main aim of this book is to make a game that looks awesome, and cover advanced stuff using C++ extensively to build the logic for the game.

What this book covers

Chapter 1, Preparing for a Big Project, shows how to create a new project, set it up, edit its settings and making it ready to rock. Also, the advanced assets pipeline will be discussed so that readers can bring in their models into Unreal Engine.

Chapter 2, Setting Up Your Warrior, explains how to make the game's hero! We will be building a character controller mapped to the keyboard and mouse using C++. You will learn how to create the logic for the character, switch weapons, attack, and move with C++. The class will be converted to blueprints. You will learn how to add in animations and physics to make it move using C++.

Chapter 3, Designing Your Playground, shows how to build the game world! We will be using the editor tools and brushes to build a level, apply lighting and materials to it, and make it ready for the first round of testing the game's logic.

Chapter 4, The Road to Thinkable AI, shows how to build the game's creatures AI, which are going to detect the player and attack them based on distance, sight, and/or the noise made by the player. All scripting will be done in C++. Animations will be taken care of by the editor and some other cool options.

Chapter 5, Adding Collectables, spices things up with some collectables! We will learn about some of the triggering and overlapping events, more about adding new classes, and adding some physics to the collectable items.

Chapter 6, The Magic of Particles, shows how to add in some particles to complete the coolness! We use cascade to build particles for the enemies, weapons, and collectables, and learn to tie these to the game logic.

Chapter 7, Enhancing the Visual Quality, shows how to make the game better looking by focusing on the most important rendering features of the engine, to make things pretty. You will learn to bake light maps.

Chapter 8, Cinematics and In-Game Cutscenes, covers the tools required to build an in-game cut-scene for a better gameplay experience and story direction.

Chapter 9, Implementing the Game UI, shows how to add a solid UI to the game is what will get the players going "Hell Yeah!" Make use of Unreal Motion Graphics (UMG) to tinker with different screen sizes and build a superb looking UI for your game.

Chapter 10, Save the Game Progress, shows how to write a "save and load" function in order to save the progress in order to be able to resume the game later.

Chapter 11, Controlling Gameplay via Data Tables, shows how to use data tables to drive the gameplay values for the enemies and so on (it is widely used in tons of game genres, such as Tower Defense, RPG, Roguelike, RTS and so on)

Chapter 12, Ear Candy, shows how to add audio experience to the gameplay. You will learn how to cue the audio and use the clips in the scenes.

Chapter 13, Profiling the Game Performance, masters the various editor debugging and profiling tools to define the performance issues.

Chapter 14, Packaging the Game, you will learn how to make an executable of the game for release. We also add a splash screen to show you're the boss, cook the game, and then use the project launcher to release it.

What you need for this book

In order to be able to follow along with this book, you need to have a good foundation of C++, as the book mostly focuses on building an Unreal game using C++. You also need to have Unreal Engine installed and Visual Studio, and both be available for free.

If you are on a Mac or Linux, you'll definitely need another IDE to use with Unreal Engine, as Visual Studio is not supported on those platforms, but you'll still be able to go with the book smoothly.

Good game design and level design skills are great and will help, but they are not essential!

Who this book is for

This book is for game developers who have basic knowledge of Unreal Engine and also have basic C++ scripting knowledge. This is ideal for those who want to take the leap from a casual game developer to a full-fledged professional game developer with Unreal Engine 4.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The game we are going to create during the course of this book is called Bellz."

A block of code is set as follows:

UCLASS(config = Game)
class AGladiator : public ACharacter
{
  GENERATED_BODY()

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Otherwise inside the launcher, just hit the Launch button of the editor version you want."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-Unreal-Engine-4X. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/MasteringUnrealEngine4X_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.