In this course, you will learn about gameplay programming in Unreal Engine 4, using examples from the well-known Real Time Strategy (RTS) genre. You will become familiar with how versatile the structure of the Unreal Engine is, and how it can be used to create many kinds of game. Beginning with implementing an RTS-style free roaming camera from scratch, you will then move on to selecting Non-Playable Characters (NPCs) through mouse input, and using basic Artificial Intelligence (AI) and Pathfinding to have selected NPCs move around a level. Finally, the course will cover how to modify Navigation Mesh (Nav Mesh) Data to provide varied and interesting gameplay.
Then, in Volume 2, you will add a second unit to the game, make a unit attack, create destructible environments, and finally bring everything together with an RTS-style user interface using Unreal Motion Graphics (UMG).
The topics covered in this course will not only form the basis for an RTS game, but will also introduce various concepts that underlie gameplay programming in Unreal Engine 4.
About the Authors
Jonathan A. Daley is a co-founder of independent game studio Nacelle Games, which he founded with his wife Carrie Daley, in 2014. Since then they've shipped several games and apps for iOS and tvOS, as well as consulted on several VR projects. Jonathan has programmed and designed over 20 games and apps since 2013, using everything from the Unreal Engine 4 and Unity 3D game engines, to programming games and apps from scratch in Xcode and Visual Studio.
The template we are using in Unreal Engine 4 does not use a free roaming camera. We have to create one utilizing a Pawn class. We alsohave to integrate it into the GameMode.
The Top Down Template comes with some key bindings, but we will add some more. Then we will implement controlling the camera's movement through the use of Input Axis Events, and finally we will test the camera setup.
Most games in the RTS genre allow their camera to zoom in on the action. We can implement this functionality by modifying the SpringArm's Target Length dynamically, using Action Mappings.
The TopDown Character Blueprint that came with the Top Down Template has a lot of what we need for an infantry unit, but it also has a lot of extra things we don't need.
Utilizing a Blueprint Interface, we will implement a unit's ability to be selected, and will also implement tracking, in the GameController about what units have been selected.
We need to modify the Decal Material, and how it is used in the Infantry_CharBluepint so that it can be used as an indication to the player that a unit is selected.
In this video we’ll be creating an AIController, and an Input Action, to allow us to begin programming movement for our infantry unit.
In this video we’re going to setup the User Interface for sending commands to our Infantry Units.
In this video, we will take advantage of Unreal Engine 4's powerful navigation and pathfinding system by utilizing the AIController class to direct Infantry Units to move to a specific location chosen by the player clicking in the game world.
In this video, we’ll discuss several ways to begin modifying Navigation in your levels, including how to set Actors with collision interact with the Nav Mesh, reviewing Area Classes for Navigation, and how to use the Nav Modifier Volume.
In this video, we add some stairs and a platform to demonstrate how to use the Nav Mesh Bounds Volume to add verticality to our levels when using a navigation mesh.
In this video, we will review how characters use the Navigation Mesh to determine where they can safely traverse a level. Then we will add custom paths into the Navigation System by using a Nav Link Proxy, and finally, we will link together several Nav Link Proxies to create complex custom paths.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.