This page has any samples discussed in class, links to useful documents, exam preparation material, tutorials or any other demonstration-type class materials.
WARNING! A state-of-the-art game development tool like Unreal Engine is always being improved, which means there will often be differences, large and small, between the latest available official documentation (not to mention information you find in user forums) and the current release you are using (e.g., UE4.15). Navigating such issues is an unavoidable part of professional game development. Use the online class forum at InstructAssist to get help and share relevant information with your classmates, TA's and faculty.
A short collision tutorial showing three different ways to create a collision in Blender, brining it in to UE4, and then within the UE4 editor.
Exposing Gameplay Elements to Blueprints - a "cheatsheet" for all the macros for variables and functions to access them in blueprints.
Draw Text/HUD Blueprint - a very fast tutorial of how to create HUDs in game (only 6 minutes long).
A useful debug technique includes printing to the log. Don't forget to #include "Engine.h" to print debug messages to the screen (this wiki doesn't tell you that). Also, helpful UE4 String Conversions may be helpful for debug messages.
It's helpful to know the differences between AActor types (most importantly, APawn, ACharacter, and AController). AScreenCapture is used for splitscreen, minimaps, etc.
The Collisions Responses document is helpful for understanding how collisions work in UE4.
A quick tutorial on nav meshes for basic AI navigation. Note, this only covers the blueprints aspects of it.
If you are familiar with Unity, you might try the Unity3D Developer's Guide to UE4.
A guide showing how to line trace in UE4 in C++.
The UE4 directory structure. The most important directories to focus on are the Content and Source directories. Content holds all art assets relevant to your game. Source holds all source files.
Events used for editing of objects properties within the UE4 editor. PostEditChangeProperty triggers when an actor's properties (details panel) are changed and PostEditMove triggers when an actor is moved in the world. These allow the UE4 Level Editor to communicate with C++ code. Function signatures are in the UE4 Documentation linked.
The Coding Standard for UE. It helps understand some of the code samples you might see. Although not required, you might use the same standard for your code. From the guide:
Health
and UPrimitiveComponent,
but not lastMouseCoordinates or delta_coordinates.
UE4 comes with 3D Drawing features that are enabled in debug mode to help visualize/debug your program. See: Draw 3D Debug Points, Lines, and Spheres: Visualize Your Algorithm in Action. Includes many different shapes, but points and lines may be the most useful.
Game Development Stack Exchange had a nice question and answer on Decision Trees vs. Behavior Trees.
Content examples and new features - Try the "Learn" menu in the "Epic Games Launcher" for a lot of great examples of the various features in UE4. Some are merely artistic examples while some are more advanced tech demos of AI and interactions between C++ and blueprints. The best map may be the "Content Examples", which is a project created by the UE4 developers in order to showcase various capabilities of the engine. Some examples will create a new project (such as a full game) while some can just be imported into an existing project (such as materials).The FBX content pipeline to get FBX (e.g, Maya, 3ds) content into UE4. Relevant is a tutorial video to set up project and download the required FBX files from the Unreal Engine wiki site. With assets to download.
Some other coding tips:
BeginPlay()
function or make your own initialization function.
#if WITH_EDITOR // code here #endifExamples of functions that reference the editor are PostEditChangeProperty(...)and PostEditMove(...).
Tick(float val)
, add the following line to your constructor.PrimaryActorTick.bCanEverTick = true;This will allow the actor to call the tick function. If this still doesn't work, you might want to try adding this line also:
PrimaryActorTick.bStartWithTickEnabled = true;
DrawDebugLine(this->GetWorld(), StartTrace, Hit.TraceEnd, FColor::Black, true, 1000.f, 10.f);
A* related topics:
A good paper on generating NavMesh's automatically:
[Leo14]Timothy Leonard. Procedural Generation of Navigation Meshes in Arbitrary 2D Environments, Open Journal Systems Game Behavior, Volume 1, Number 1, 2014. Online: http://computing.derby.ac.uk/ojs/index.php/gb/article/view/13
A set of implementation tutorials on understanding steering behaviors.
Mat Buckland. Programming Game AI by Example, Wordware, ISBN-13: 978-1556220784, 2005. Sample materials from this book include source code for all the examples and executables for all the examples.
Game Development Stack Exchange had a nice question and answer on Decision Trees vs. Behavior Trees.
Return to the IMGD 4000 Home Page
Send all questions to the staff mailing list (imgd4000-staff at cs.wpi.edu).