Mastering Game Development with Unreal Engine 4 - Second Edition

Book description

A comprehensive guide with coverage on AudioFX, Particle system, shaders, sequencers, and the latest features of Unreal 4.19 that will take your game development skills to the next level

Key Features

  • Create a high-performance Combat game using the essential features of Unreal Engine 4.18+.
  • Master the complex competitive features needed in modern games such as Volumetric Lightmaps and Precomputed Lighting on Volumetric Fog, and build an impressive UI.
  • Experience not only VR support for your game but also the inbuilt support of Apple's ARKit and Google's ARCore with UE4's newly released support for these platforms.

Book Description

To make a basic combat game from scratch, you will quickly override existing UE4 classes, and add and implement simple C++ functions while running and building them. These are all discussed as a short summary for new developers and as a quick refresher for experienced developers. Next, you will build a combat player character with expanded controls, create logic for a character, swap weapons, attack and move, bridge over scene changes and transitions, retain data between scenes, and manage the scene-change process.

You will then build an intelligent enemy AI and add physics based particles for weapon impacts. You will also get acquainted with cutting-edge features such as Volumetric Lightmaps for precomputed lighting, and Atmospheric and Volumetric Fog, to build advanced visuals in our ongoing GitHub project.

Moving on, you will explore the tools required to build an in-game cut-scene for a more professional gameplay experience and story direction.

Along the way, you will implement a solid game UI, including writing a full in-game load and save system that will enable players to resume their game from any point. You will also prepare, build, and work on VR and AR taking them from editor to real-world, building two new projects one in each of these brand new areas of UE4 and integrate classes from the main project into AR!

By the end of the book, you will have mastered all major UE features and will be able to bring self-imagined games to life through Unreal Engine 4.18+.

What you will learn

  • The fundamentals of a combat-based game that will let you build and work all other systems from the core gameplay: the input, inventory, A.I. enemies, U.I., and audio
  • Manage performance tools and branching shaders based on platform capabilities in the Material Editor
  • Explore scene or level transitions and management strategies
  • Improve visuals using UE4 systems such as Volumetric Lightmaps, Precomputed Lighting, and Cutscenes
  • Implement audio-to-animation timelines and trigger them from visual FX
  • Integrate Augmented Reality into a game with UE4's brand new ARKit and ARCore support
  • Perform almost any game logic needed via Blueprint Visual Scripting, and know when to implement it in Blueprint as opposed to C++

Who this book is for

This book is for game developers who want to build high-performance games with amazing UIs. Experience with C++ is required and some knowledge of working with Unreal Engine 4 would be an advantage.

Publisher resources

Download Example Code

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Mastering Game Development with Unreal Engine 4 Second Edition
  3. Dedication
  4. Packt Upsell
    1. Why subscribe?
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  7. Making a C++ Project for a First-person Shooter
    1. Introduction
    2. Technical requirements
    3. Building the FPS C++ project
      1. Installing and building UE4
      2. Running the editor and picking a template
      3. Building and running the game project
    4. Modifying our game with C++
      1. Overriding the character class
      2. Editing our class in VS and hot-reloading the editor
    5. Summary
    6. Questions
    7. Further reading
  8. Inventory and Weapons for the Player
    1. Introduction
    2. Technical requirements
    3. Adding the Weapon and Inventory classes
      1. Creating our Weapon class
      2. Converting the existing gun
      3. Creating an inventory and adding a default gun
    4. Adding a WeaponPickup class
      1. Creating a new actor class
      2. Setting up our blueprints
      3. Back to code to finish up
    5. Putting our inventory to use
      1. Adding controls to cycle weapons
      2. Adding swapping of weapons to our character
      3. Bringing it all together
    6. Summary
    7. Questions
    8. Further reading
  9. Blueprint Review and When to Use BP Scripting
    1. Introduction
    2. Technical requirements
    3. Blueprint review and Blueprint-only games
      1. Blueprint overview
      2. Blueprint-only games – is this right for you?
    4. Blueprint scripting and performance
      1. Blueprint scripting example – moving platform and elevator
      2. Blueprint tips, tricks, and performance hits
    5. Summary
    6. Questions
    7. Further reading
  10. U.I. Necessities, Menus, HUD, and Load/Save
    1. Introduction
    2. Technical requirements
    3. Integrating UMG into our player's HUD class
      1. Building icons for the inventory with screen captures
      2. Using UMG to display inventory icons on screen
      3. Synchronizing your inventory and HUD
    4. Using UMG and game save slots
      1. Creating a widget for save slots
      2. Creating a save game file
      3. Save and load from our menu
    5. Summary
    6. Questions
    7. Further reading
  11. Adding Enemies!
    1.  Introduction
    2. Technical requirements
    3. Creating an AI controller and a basic brain
      1. Proving out the basics
      2. Adding C++ decision making to the behavior tree
      3. Attacking the player
    4. More polished combat – spawn points, hit reactions, and dying
      1. Spawn points for enemy placement
      2. Hit reactions and dying
      3. Notes on load/save
    5. Summary
    6. Questions
    7. Further reading
  12. Changing Levels, Streaming, and Retaining Data
    1. Introduction
    2. Technical requirements
    3. Traditional level loading
      1. The basics
      2. Using load/save to transition
    4. Perchance to stream?
      1. Streaming advantages and disadvantages
      2. Example streaming and best practices
    5. Summary
    6. Questions
    7. Further reading
  13. Getting Audio in Your Game
    1. Introduction
    2. Technical requirements
    3. Basic sounds and triggering by animation
      1. Sounds, cues, channels, dialog, FX volumes, and more!
      2. Triggering sounds from animation
    4. Environments and sound
      1. Hitting different surfaces
      2. Player footfalls and environment FX
    5. Summary
    6. Questions
    7. Further reading
  14. Shader Editing and Optimization Tips
    1. Introduction
    2. Technical requirements
    3. Knowing and building materials
      1. Overview of materials, material instance creation, and use
      2. Working on material networks and performance tips at editor time
    4. Materials at runtime and various platforms
      1. Runtime tools and techniques to quickly iterate shaders
      2. Know Your Platform and How to Adapt Shaders!
    5. Summary
    6. Questions
    7. Further reading
  15. Adding an In-game Cutscene with Sequencer
    1. Introduction
    2. Technical requirements
    3. Sequencer – UE4's newest cutscene tool
      1. Why use sequencer?
      2. Adding a scene and triggering it
    4. Alternatives to sequencer
      1. Fast and easy in-game scenes
      2. Matinee
    5. Summary
    6. Questions
    7. Further reading
  16. Packaging the Game (PC, Mobile)
    1. Introduction
    2. Technical requirements
    3. Know your platform(s)
      1. Setting up an installable PC version and general settings
      2. Android setup
      3. iOS setup
    4. How to build, test, and deploy
      1. UE4’s play options vs package project
      2. When and how to build and test on device
      3. Making standalone builds and installing them
      4. Avoiding rebuild-hell on platforms near releases
    5. Summary
    6. Questions
    7. Further reading
  17. Volumetric Lightmaps, Fog, and Precomputing
    1. Introduction
    2. Technical requirements
    3. Volumetric lightmaps, lightmass, and fog
      1. Adding volumetric lightmaps with lightmass volumes
      2. Using Atmospheric Fog
      3. Using Volumetric Fog
    4. Lightmass tools
      1. Learning Lightmass settings and previewing tools
      2. Profiling lightmaps
    5. Summary
    6. Questions
    7. Further reading
  18. In-scene Video and Visual Effects
    1. Introduction
    2. Technical requirements
    3. Playing in-scene video with Media Framework
      1. Creating our assets
      2. Building and playing the video in-scene
    4. Adding physics particles
      1. Creating our initial emitter on projectile hit
      2. Orienting and adjusting physics of the particles
    5. Summary
    6. Questions
    7. Further reading
  19. Virtual Reality and Augmented Reality in UE4
    1. Introduction
    2. Technical requirements
    3. Making a VR project and adding new controls
      1. Making the initial VR project
      2. Building and deploying for GearVR
      3. Adding HMD controls
    4. Making an AR project and porting our projectiles
      1. Making the initial AR project
      2. Android deployment specifics
      3. Porting our projectiles and firing them in AR
    5. Summary
    6. Questions
    7. Further reading
  20. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Mastering Game Development with Unreal Engine 4 - Second Edition
  • Author(s): Matt Edmonds
  • Release date: September 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788991445