DEV Community

Cover image for How to Think About Games: Unreal Engine
OP-Bright
OP-Bright

Posted on

How to Think About Games: Unreal Engine

Welcome! This article is the second in the series of “How to Think About Games”. Each article focuses on the philosophy of different game engines. We explore each engine in isolation, attempting to avoid comparison where possible, and focus more on just how it works, and where the head of a developer working on the software should be at. You won’t know how to make a game by the end of it, but you’ll know how one would be structured, so you can start imagining how to apply your ideas to this framework. The goal is to give you a better idea of how each engine works behind the scenes so you can decide which one makes the most sense for you.

Background on Unreal Engine

This article is about the Unreal engine, one of the longstanding powerhouses, especially for making 3d games. It is known for its high visual fidelity, being used not just in games, but by some film-making studios to create effects or full digital sets.

  • It is heavily specialized into 3d, it’s not that it’s impossible to make 2d games, from what I can see, but it seems incredibly rare in the engine.
  • Updates are consistently made to the newest version of unreal-engine, currently on unreal engine 5, but there are apparently talks of an unreal engine 6 in the coming few years. Unreal engine 4 seems to still be actively used but as they re-add more features to 5 people will continue to switch over.
  • Publishes to PC and most major consoles, as well as mobile.
  • It uses C++, but features a robust visual-coding feature called blueprints, which execute basic game functions and can be connected to each other.

Now that you know its basic background, let’s get into how they think about games.

How to Think About Unreal

Setup

A game in unreal is made up of various basic libraries and game functions that can be used in “Levels”. A level establishes its environment layout, physics, and more. I do not believe Levels are strictly actual in game levels, I believe they could be something like, for example, a title screen. Each level contains “Actors” that aren’t strictly characters in a scene, but can be.

Each level should have a GameMode ‘actor’, these establish the basic rules of the game in the current “level”, like a win condition. As you play the game, the GameState is updated based on the current state of the game. Sometimes that game could also be affected by the PlayerState, which would be something like a player’s rank in a large online game.

The player gets access to the scene through a PlayerController attached to an actor. Player controllers don’t just take your input, you can also populate the screen with a HUD and control how the camera follows the character with the PlayerController.

Game Flowchart from the Unreal Documentation.

Game Flowchart from the Unreal Documentation.

Creating Actors to Populate Your Level

To populate your level, you’re going to want Actors. Actors can represent a lot of things, like in the last example, a character is likely to be a SkeletalMeshActor with a Controller attached. When an actor has a controller attached, whether it be an AIController that you use to build out game enemies, or a PlayerController to give the player a character to operate, this is known as a pawn.

There’s a lot more than Pawns though in games. For example, you could build out level geometry with a StaticMeshActor, or a Brush if you’re still in development. You can use Triggers to cause events to occur as you move through a level, or different Lights to build up a scene. They also have a MatineeActor that lets you give characters special animations for cutscenes. You can also add AmbientSound to play music on a loop, or when a certain Trigger is activated.

Icons of some of the different Actor Types discussed, sourced from the Unreal Documentation.

Icons of some of the different Actor Types discussed, sourced from the Unreal Documentation.

Actors have properties, which you can set. There are different properties for different types of actors, so it would be hard to cover them all. Using components you can establish the different properties an actor has, and you can use game code blueprints to change them over time.

Building from Blueprints

To give special functionality to an actor, like reacting to triggers or some kind of consistent behavior, you can code this with c++, but you can also use blueprints to build out basic behavior, like functions and objects that you want. Blueprints are built out visually, different functionality able to be connected with ‘wires’. You can connect up these functions to the GameStart trigger, or a trigger every tick of game time. You could also have them react to special placed scene triggers.

Blueprints allow for incredibly basic functionality, like printing a string, but also can perform some more complex actions like determining the reactions your pawn would take to different controls or actions from the player.

A screenshot of the blueprint editor from the Unreal Documentation.

A screenshot of the blueprint editor from the Unreal Documentation.

Final Thoughts

So, if you want to make a game in Unreal, you have to ask yourself if this abstraction makes sense. Your success will vary depending on your style of development and your game idea. It’s a big player in the scene and if you’re looking to make a visually stunning 3D game it does seem to be a good choice. Many games have been built with Unreal, most notably Fortnite in recent years, but also games that aren’t shooters, like the Live-A-Live remake with a vastly different art style. Although there certainly are limitations, they aren’t so steep that it should close off many game ideas at all, and most certainly the structure isn’t the limiting factor, as you can see with the very different types of games made.

On a more opinionated note, I found Unreal to be very interesting, especially figuring out what games have been made with it made me realize there’s definitely more flexibility there than I thought. Admittedly for my personal ideas, I struggle to see how I would apply this engine to these ideas. It's less of a structural issue, I’m just less interested in making 3d games. I think if I were to make one, this would be a very tempting engine to turn to. The visuals it’s capable of are very impressive and the blueprints seem very approachable, although I’m sure it would help to understand C++ for further customization. I hope that if you are someone interested in Unreal that this article gave you an idea of how to think about making your game. Thank you for reading!

Sources

Unreal in 100 Seconds - I found entering into trying to figure out the engine behind the scenes was difficult without some background or seeing it done, and this video does an excellent job of giving you the absolute basics of how things look to make behind the scenes.

Unreal Architecture Documentation - They explain the structure of an unreal game well, especially with their nice chart that I used.

Common Actors Documentation - More detailed information on actors.

Introduction to Blueprints Documentation - More details on Blueprints.

Unreal Wikipedia - Just some extra bits for additional background on the software.

List of Unreal Engine Games Wikipedia - A list to help me reference what games I know of that are made in Unreal.

Top comments (0)