A6: UE4 and C++

Note: this assignment was handed out via e-mail on the 17th. It is reproduced here for archival purposes.

What To Do

  1. Individually or in pairs, work through the "C++ Programming Quickstart" for UE4:
    https://docs.unrealengine.com/latest/INT/Programming/QuickStart/index.html
    (this will walk you through making a basic actor subclass that bobs up and down)
  2. Modify your subclass so that the direction, amplitude, and frequency of the actor's bobbing motion can be configured from the editor.
    See: https://docs.unrealengine.com/latest/INT/Programming/Tutorials/VariablesTimersEvents/2/index.html
    (talks about using the UPROPERTY() tag to expose data members.)
  3. [if you have time]) build a cool little scene or interaction that uses one or more custom actor classes.

What To Hand In

Due before class on Thursday, March 19th

E-mail me your actor subclass code from (2); if you worked in a pair, please indicate who your partner was.

We will take some time on Thursday to look at the results from (3); I hope there are some cool geometric animations.

Extra Credit [1pt]

Due before class on the 24th.

Dig through the source code to UE4 and figure out how the engine implements the UPROPERTY() tag [and class introspection in general -- there are also tags for functions]. Produce a 1-page write-up describing the implementation in detail, supporting your claims with references to the UE4 source code. What (if anything) does UPROPERTY() actually compile to? How does the editor know what fields have been marked with UPROPERTY()? What -- if anything -- is the runtime overhead of implementing introspection this way?