
Mastering Unreal Engine 4.X
Beschreibung
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- [*]Take your C++ scripting skills to the next level and use them extensively to build the game
- [*]An advanced practical guide with a tutorial style approach that will help you make the best of Unreal engine 4
Book DescriptionUnreal 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! What you will learn - [*] Script your player controls in C++
- [*] Build a superb and engaging level with advanced design techniques
- [*] Program AI with C++
- [*] Use Cascade to add life to your games
- [*] Use custom shaders and advanced shading techniques to make things pretty
- [*] Implement an awesome UI in the game
- [*] Control gameplay using data tables
Who this book is forThis book is for game developers who have a basic knowledge of Unreal Engine and C++ scripting knowledge. If you want to take the leap from a casual game developer to a full-fledged professional game developer with Unreal Engine 4, this is the book for you.
Alle Preise
Weitere Details
Weitere Ausgaben
Andere Ausgaben

Person
Muhammad A.Moniem started in the industry at a very early age. He taught himself everything related to the game development process even before he joined college. After being a software engineer, he started to teach himself the art of game design and game art techniques. As a self-taught person, he was able to find his way into the industry very easily, which led him to be hired for big, medium, and small companies, titles, and teams. Throughout his career, he was able to contribute as a full-time or part-time employee or freelancer to games for a wide range of platforms, including Windows, Mac, iOS, Android, PS4, Xbox One, and OUYA. He has also worked with technologies, such as VR, AR, and Kinect. Finally, he was able to establish his own one-person game company/team as a part-time independent developer. A lot of his indie games got recognition or have been finalists at international indie game events, such as IGF, Indie Showcase, IGC, and Tokyo Game Show. He has written another Unreal Engine book before and he has also designed an amazing website, www.mamoniem.com. He has also worked on Learning Unreal Engine iOS Game Development, Packt Publishing, which is available at https://www.packtpub.com/game-development/learning-unreal-engine-ios-game-development.
Inhalt
- Cover
- Copyright
- Credits
- About the Author
- Acknowledgments
- About the Reviewer
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Preparing for a Big Project
- Overview of the game
- Creating a C++ project
- The project settings
- The editor settings
- Mapping the inputs
- Migrating assets
- Using MarketPlace assets
- Retargeting animations
- Summary
- Chapter 2: Setting Up Your Warrior
- The code project
- Creating the C++ class
- Editing and adding code
- The Gladiator header (.h) file
- The Gladiator source (.cpp) file
- The includes
- The constructor
- BeginPlay
- SetupPlayerInputComponent
- Jump
- StopJumping
- OnAttack
- OnPostAttack
- OnChangeWeapon
- TurnAtRate
- LookUpAtRate
- OnSetPlayerController
- OnChangeHealthByAmount
- MoveForward
- MoveRight
- Compiling the code
- Animation assets
- Adding sockets to the skeleton
- Creating the blend space
- The animation blueprint
- Building the blueprint
- Adding the blueprint to the GameMode
- Summary
- Chapter 3: Designing Your Playground
- The art of level design
- Placing assets into the world
- Using brushes to enhance level design
- Adding lights to the level
- Building lightmaps for a level
- Creating water surfaces
- Player Start
- The navigation mesh
- Summary
- Chapter 4: The Road to Thinkable AI
- The overall idea
- The AI assets
- Behavior Tree
- BTTask
- BTService
- Blackboard
- The animation blueprint
- Building the C++ logic
- EnemyAIController
- EnemyAIController.h
- EnemyAIController.cpp
- Enemy
- Enemy.h
- Enemy.cpp
- Building the behavior tree
- Creating the blueprint
- Adding notifies
- What else?
- Summary
- Chapter 5: Adding Collectables
- The idea behind collectables
- The base class
- PickupBase.h
- PickupBase.cpp
- The coin class
- CoinPickup.h
- CoinPickup.cpp
- Making it collectable
- Building the blueprint
- Going forward
- Summary
- Chapter 6: The Magic of Particles
- The particles editor
- Toolbar
- The viewport panel
- The emitters panel
- The details panel
- Particle system
- Thumbnail
- LOD
- Bounds
- Delay
- Macro UV
- Occlusion
- Materials
- The particle emitter
- Particle
- Cascade
- Particle modules
- Cascade
- Curve Editor
- Interpolation modes
- Organizing curves
- Adding curves to the graph
- Removing curves from the graph
- Organizing the curve editor with tabs
- Spawning particles
- Changing parameters at runtime
- Summary
- Chapter 7: Enhancing the Visual Quality
- The lightmass
- The Swarm Agent
- The ambient occlusion
- AO settings
- Lightmass settings
- World Settings
- Importance volume settings
- The post process project settings
- The post process volume
- The properties
- The available effects
- Reflection Capture
- Reflection Capture actors
- The fog effects
- Atmospheric Fog
- Adding it
- Exponential Height Fog
- Adding it
- Summary
- Chapter 8: Cinematics and In-Game Cutscenes
- Matinee actor (cinematic actor)
- Matinee Editor
- Groups
- Tracks
- Bellz cinematic
- The animated fog
- Color
- Animating exponential height fog
- Saving the cinematic as video
- Summary
- Chapter 9: Implementing the Game UI
- UMG as Unreal's UI system
- The game UI widget
- UMG Designer
- The Toggle mode
- Palette
- The hierarchy
- Animations
- Canvas
- The Details panel
- Constructing the UI
- Adding animations to the UI
- Connecting the UI with the game logic
- What else?
- Summary
- Chapter 10: Save the Game Progress
- Building the SaveGame class
- Saving and loading game data in C++
- The *.sav file
- Saving and loading game data in blueprints
- Summary
- Chapter 11: Controlling Gameplay via Data Tables
- Data table sheets
- Creating the data table asset
- Creating a data structure
- Blueprint data structure
- C++ data structure
- GameDataTables.h
- GameDataTables.cpp
- Reading from data tables
- Reading data through C++
- Reading through blueprints
- Summary
- Chapter 12: Ear Candy
- Importing audio files
- Sound assets
- Dialogue Voice
- Dialogue Wave
- Media sound wave
- Reverb effect
- Sound attenuation
- Sound Class
- Sound cue
- Sound mixes
- Sound cue editor
- Audio volumes
- Playing sound effects
- Summary
- Chapter 13: Profiling the Game Performance
- The blueprint debugger
- The Collision Analyzer
- The console
- The FPS charts
- The view modes and visualizers
- The GPU visualizer
- The Device Manager
- Device Profiles
- Summary
- Chapter 14: Packaging the Game
- Preparing the project for building
- Packaging settings
- Maps & Modes settings
- Description settings
- Platform settings
- Adding different screens
- Packaging the game
- Cooking the content
- Project Launcher and DLCs
- Packaging a release
- Packaging a patch or DLC
- Summary
- Index
The Gladiator header (.h) file
Now let's jump back to the header file again, and let's start adding some more functions and variables to it so we can start building gameplay logic for the character and make something that fits our target.
Considering that a class based on FTableRowBase and called AGameDataTables will be used later to read the gameplay data from Excel tables; here is the header file code I ended up with.
To make it easier to understand the code, I would like to breakdown all the variable components and methods into a set of chunks; that way it will be very easy to understand them.
Everything starts with the includes, just like any form of C++ coding you are used to making, including the header files that are going to be used or referenced and must be done at the top of the code.
#pragma once #include "GameDataTables.h" #include "GameFramework/Character.h" #include "Gladiator.generated.h"Defining the class itself is essentially a step directly after the include statements.
BeginPlay: This is the virtual void of the override BeginPlay from the Character class base and this one will be called once the game is started.
CameraBoom: This is a USpringArmComponent that will be added to the character blueprint that is based on that class. This component will be used to control the camera.
FollowCamera: This is the camera itself that will be viewing the game and following the player. This one will also be added to the blueprints.
EffectSprite: This is a Paper2D sprite component (Paper 2D is the main 2D framework for Unreal Engine 4.x). There are lots of ways we can use this to achieve an on-screen draw texture, but this one is the easiest and most flexible. I managed to add a sprite component that is very close to the camera, and then we can use it to draw whatever effect we need.
AGladiator: This is the constructor, and as mentioned earlier, it is used to build the object in edit mode.
BaseTurnRate: This is a float variable in degrees to control the camera turn rate.
BaseLookUpRate: Another float variable to control the camera, but this time it's for lookups. This one is also in degrees.
JumpingVelocity: This is a float variable to determine the jump velocity.
IsStillAlive: This is a Boolean variable to tell us what the current state of the layer is. It is a very important variable, as most of player behavior and inputs will be based on it.
IsAttacking: Another Boolean variable to report if the player is attacking now or not. It is important for animations.
WeaponIndex: This is an integer to determine the current active weapon index. The player could have several weapons; to be able to load the weapon's data, it is a good idea to give each weapon its own index.
IsControlable: Sometimes the player is not dead, but you also need to take the control out of his hands, maybe because the character is carrying out an attack, or maybe because the player paused the game. So this is a bool variable meant to tell us if the player is in control now or not.
TablesInstance: A datatable variable to hold the active instance of the game tables. It is just here to load some data.
GetIsStillAlive: A getter method to return the value of the IsStillAlive Boolean variable.
OnSetPlayerController: A method that takes a parameter of true or false, and uses it to set the status of the player controller. So it is here we take the control from the player, or give it to him at a certain moment.
OnChangeHealthByAmount: A method that takes a float value, and reduces the total player health using it. It is usually used when the player gets damaged.
OnGetHealthAmount: This is a getter function that returns the TotalHealth value of the player as a float value.
OnPostAttack: A method that holds some procedurals after the player has done an attack.
GetCameraBoom: A getter method to return the CameraBoom component variable.
GetFollowCamera: Another getter method to return the FollowCamera component variable.
MoveForward: A method that holds the code responsible for player movement to the forward and backward. Notice that it is a BlueprintCallable in order to be able to use it from the Gladiator class blueprint instances.
MoveRight: A method that holds the code responsible for player movement to the left and right.
Jump: A method that is responsible for applying the jump action to the character based on the base character class.
StopJumping: A method that is responsible for stopping the jump, and resuming the idle/run animation.
OnAttack: A method that is responsible for attacking.
OnChangeWeapon: A method that is responsible for switching between weapons.
TurnAtRate: A method that is responsible for applying turns to the following camera.
LookUpAtRate: A method that is responsible for applying the camera look-up rate to the follow camera.
TotalHealth: A float variable that holds the player's total health (the current health), as at any moment the player's health gets reduced, that will be the final value. Some people like the approach of creating two variables:
TotalHealth: This is the base and default...
Systemvoraussetzungen
Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.
Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.