WPI Worcester Polytechnic Institute

------------------------------------------

Technical Game Development II

Resources

This page has any samples discussed in class, links to useful documents, exam preparation material, tutorials or any other demonstration-type class materials.


General

Some resources to help prepare for the mid-term exam include:

  1. Topic outline
  2. Practice exam
  3. Practice exam solution
  4. Review slides (pdf, pptx)

Some resources to help prepare for the final exam include:

  1. Topic outline
  2. Practice exam
  3. Practice exam solution

There is an Instruct Assist Forum for UE4 for IMGD 4000. Use it to post good resources you find or ask questions.


UE4

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.

4.6 Transition Guide - helpful tips for converting older versions of Unreal to version 4.6 (e.g., if you find code samples or tutorials made for older versions).

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:

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.

Some tips:

  • Note, constructors for AActors are not like constructors for native C++ classes - they must all have the same argument because they are used by blueprints in the editor. The editor actually runs the constructor to initialize the properties before you expand upon them in the blueprint. If you want to have functionality that runs when an object is created, you can put it in the BeginPlay() function or make your own initialization function.

  • UE4 Editor Compiler Flag - Make sure to surround any code that refers to the UE4 editor with the following compiler macro:
      #if WITH_EDITOR
      // code here
      #endif
    
    Examples of functions that reference the editor are PostEditChangeProperty(...)and PostEditMove(...).

  • AActor Ticks - Actors do not execute the tick function by default. If you want an actor to call 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;
    

  • Line Trace Debugging - Useful for determining how your line tracing is working:
      DrawDebugLine(this->GetWorld(), StartTrace, Hit.TraceEnd, FColor::Black, true, 1000.f, 10.f);
    

  • 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).

    Game Development Stack Exchange had a nice question and answer on Decision Trees vs. Behavior Trees.

    Art Pipeline

    There is a pretty good video on 2D Game Creation with Paper2D and another with a tutorial for a 2d Side Scroller Blueprint.

    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.


    Pathfinding

    A* related topics:

    1. There are numerous possible improvements to A* in addition to those we talked about in "Advanced Pathfinding". One such is A* with jump points.
    2. A nice overview of basic pathfinding algorithms, including A* can be found in An Introduction to A*, by Red Blob games.
    3. Pathfinding (using A* or something else) in 3d can be tricky, but some thoughts can be found in part1, part2, and part3.

    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


    Steering

    A set of implementation tutorials on understanding steering behaviors.


    AI

    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.


    Return to the IMGD 4000 Home Page

    Send all questions to the staff mailing list (imgd4000-staff at cs.wpi.edu).