UE architecture explained?

Have you ever worked within a large OOP framework before? UE4 is “event driven”, “events” are how different modules interact, in theory not much unlike Win32, GTK, QT or MFC.

I started working in large event driven frameworks with Win32 (same theory, but in C not C++) and then CryEngine3, and coming to UE4 it appears to be much the same (to CE3). The whole framework relies heavily on Polymorphism, and Generic Programming (templates). Quite a bit different than low level systems programming i’m sure. Although some parts of the framework are low level, the focus for game development is more on high level logic and design instead of low level binary and pointer math. To learn, I would suggest just working on implementing some basic derived types to get yourself in the trenches, and moving forward from there. A custom GameMode wouldn’t be a bad place to start.

My Hello Slate tutorial could be taken as a basic UE4 Polymorphism tutorail, I implament a derived HUD class but all other types follow the same workflow. The workflow itself is pretty basic.

  1. derive from some type
  2. register your type with game so it game uses your derived type instead of it’s base, how this is done depends on your base type.
  3. override base type with your implementation, implement anything expected, rely on base type for basic functionality.

In other words, Polymorphism. Not that it’s super-easy, the devil is in the details.