Skip to content

Designing the Mission

Jay Stevens edited this page Nov 29, 2017 · 1 revision

We're going to start by making a folder to hold all data related to our mission. Remember that the mission is the directed graph which determines the general challengers a player will face in our dungeon.

We're going to be creating a simple dungeon:

The player will start in the entrance room. They then find a key, which they can use to open a lock, which reveals the ending room. The double lines connecting the lock room to the ending room means that the ending room has a "tight coupling" to the lock room -- the ending room will come directly after the lock room, and won't be placed next to the entrance room or anywhere else.

Here's a couple of potential room combinations:

There are a few more than this, but you can see that the lock room can be placed next to either the key or the entrance room. Once you start getting into more complex dungeons, the possibilities grow exponentially. For the purposes of this tutorial, however, we're going to keep things simple.

Mission generation uses simple grammars to determine what the mission should look like. These grammars take a node and replace it with a different node, or a string of nodes. Here's what we'll be making for our mission:

Square nodes are "non-terminal" nodes -- they don't have any rooms associated with them, and are simply there to serve as the beginnings of replacement rules. Circle nodes are nodes which will eventually have a room associated with them, which will be selected from a list of rooms the designer provides.

For right now, we're only going to keep one simple replacement. However, you can see Figure 4 of the source paper this generator is designed around as an example of more complex replacement rules, and Figure 5 for an example of a generated mission from those rules. Combined with the exponentially-growing ways of placing rooms as well as potentially dozens of unique rooms that could be placed in a single node, this makes every single dungeon have a completely unique layout.

But back to Unreal!

Creating the Mission Symbols

This system uses a class called a Dungeon Mission Symbol as its way of representing these nodes. This class inherits from Unreal's Data Asset class, so you have a physical file describing each node (as opposed to a struct or what have you).

We'll start by right-clicking inside of that Mission folder we created earlier, then clicking on Miscellaneous->Data Asset.

From here, find Dungeon Mission Symbol and select it as the class for our Data Asset. Name it "Entrance".

We're going to make a few adjustments to the properties of our node. Double-click on it to open it up, then go ahead and check "Is Terminal Node" and enter a description for this node (here, I named it "Entrance").

Repeat this 3 more times for the rest of our terminal nodes:

Then do it once more for the starting node (the node that we'll be replacing with our dungeon graph). This time, we're leaving "Is Terminal Node" unchecked.

That does it for all the nodes we're going to need. All our data assets share the same thumbnails, so I'm going to move these ones into a separate folder, "Symbols", so that way we can find them again later. If you'd like, you can also preface their filename with S_ (or whatever you'd like), similar to how Static Meshes are SM_ and Materials are M_.

Next step: Making the Tile Replacement Rules

Clone this wiki locally