Dungeon Generator: Part 1
For a generated level to be successful, it should be constructed within the constraints of the game rules. The dungeon generator tool is intended for designers to use, within Unity, for games with these design goals:
• Physics and scope of the gameplay world
o Genre: ARPG (Action Role Playing Game) e.g. Diablo, Torchlight
o 3D environment using standard unity physics and collisions
• Abilities and limitations of the player’s in-game character
o Basic movement (Walk, Run, Jump), Attack, Interact
• Abilities and limitations of the non-player characters
o Basic movement (Walk, Run, Jump), Attack, Interact
• Objects and Challenges
o Simple items that can be used to overcome obstacles
• Positive reinforcement schedule
o Rewards and collectible items in the form of pickups
The level design and structure are important early decisions, having a profound impact on the designer’s choices and the actual creation of the level. There are typically three approaches to choose from.
Level Structure Types
• Linear – Gameplay events follow a strict line laid out for the player, often referred to as On Rails. In this type of system progression is only possible if the player goes through the events in the predetermined order imposed by the designer (Kremers, 2009, p. 56-7).
• Semi-linear – Similar to linear progression but the player can direct their own experience to a certain extent. This could be completing a set of tasks in any order for example or following a path of their own choosing. They would be led back to a bottleneck where directorial control can be re-established (Kremers, 2009, p. 57-8) .
• Non-linear - Here the player has much more control and freedom over the order and timings of game events. This type of structure is most commonly used where emergent gameplay is the desired outcome, with multiplayer games providing the clearest example. It is the actions of other players and not the designer that provide the bulk of gameplay (Kremers, 2009, p. 59-61).
For the dungeon generator, the levels design should also serve as a teaching mechanism to the player, the level’s design teaches the player how to employ the various gameplay mechanics to achieve a reward. If the gameplay is taught well and the player gets tested in an enjoyable manner the level designer has done a good job (Kremers, 2009, p. 28).
Often the most important determining factor of structure is a game’s genre (Kremers, 2009, pp. 55-61). The dungeon generator has been designed to produce levels that fit within the semi-linear structure type. Semi-linear gameplay allows players the freedom to direct their own experience to a certain extent but requires players to follow a script in others. Within the dungeon generator this is accomplished by creating a series of pinch points or bottlenecks (Figure 1). These could be in the form of a physical barrier such as a locked door requiring the player to have found a key, or a conditional barrier such as a broken bridge that requires repair with items found during previous exploration (Kremers, 2009, pp. 57-59).
Advantages of Semi-linear structure
Using a semi-linear structure gives the designer a degree of control over the events the player will experience and affords the player some freedom. This creates for them the illusion of full player freedom and helps to deepen the sense of immersion (Kremers, 2009, p. 142-3; Madigan, 2010). Where possible techniques should be employed to hide bottleneck restrictions from the player. If players have limited progression choices, but are made to believe they have many, they will be more immersed in the experience (Madigan, 2010; Schell, 2008, pp. 179-181). For the dungeon generator a series of additional corridors, rooms or tunnels can be discovered or unlocked by the player. This creates the illusion they are forging their own path. In this way spatial presence is created, where the player starts to feel immersed in the game’s world (Despain, 2013, p. 202; Madigan, 2010). The dungeon generator will also highlight to the designer the critical path, this is the way the player must go in order to complete the level. To encourage players to follow the 'correct' path, designers may choose to place rewards such as coins, but also enemies. This seems counter intuitive, but assuming combat is a fun central feature of the game (i.e. ARPG), players will look forward to an opportunity to engage in combat. This pulls the player forward (Short, 2014).
The dungeon generator gives the designer options to automatically create challenges for the player to overcome. The concept is to segment the dungeon into a traditional three-act structure (Nantz, 2012; Mitchell, 2012, pp. 176-7). The resulting segments will each have a bottleneck that the player must pass through in order to continue progress (Figure 1.1). The bottleneck will be in the form of a challenge, this could take many forms, for example a locked door, a draw bridge, a mini boss. In the body of each segment preceding the pinch point challenge, a solution will be placed. This could take the form of a key, a handle to lower the bridge or a magic sword to help defeat the boss. This is very similar to Gustav Freytag’s pyramid (Kremers, 2009, p. 67) (Figure 1.2).
This structure can be illustrated further by using a plot clock (Figure 1.3). Which is an expanded interpretation of the three-act structure into 6 components. It is worth noting that, the larger an experience is, the more Acts 1 and 3 shrink in relative size and the more Act 2 grows.
When looking at the plot clock in Figure 3, imagine the story starting at 12:00 noon, moving clockwise through the acts of the structure until the story ends at 12:00 midnight. The purpose of each section of the three-act structure is to fulfil a specific, psychological need that every player has, and which needs to be realised before they can emotionally invest in the story (Despain, 2013, pp. 154-5; Schell, 2008, pp. 126-7). Before players can care, they need to empathise; before they empathise, they need to understand (Short, 2014).
Act 1: Context
In the first section of each generated dungeon, the player will be given the opportunity to orient themselves within the setting and learn about some aspects of the characters abilities, which will form a framework through which the drama can take place (Kremers, 2009, p. 68; Perry, 2009, p. 74). Traditionally, Act 1 satisfies the need to know why what’s about to happen will matter (Short, 2014). In respect of the dungeon generator the designer could provide this exposition through use of a cutscene or dialogue with a Non-player character (NPC). This could be prior to entering the level or immediately upon entering the dungeon. This inciting moment, provides the catalyst for action, giving the player clear goals to achieve and thus encouraging the desired exploration (Kremers, 2009, p. 68; Perry, 2009, p. 74-5; Schell, 2008, pp. 118-122). This teaches the player about the stakes involved and foreshadows the challenges to come. What happens if the player succeeds? What happens if they fail? What’s to be gained if they win? What might be at risk if they lose? (Perry, 2009, pp. 669-671). When designing the dungeon generator, a rule will be created to ensure the starting area will be free of enemy NPC’s. This allows space for acclimatisation and is a good place to introduce helpful items such as mana potions and food. The desire to satisfy these physiological needs help to motivate the player according to Maslow’s Hierarchy of needs (Despain, 2013, pp. 154-155; Schell, 2008, pp. 126-127).
Act 2: Building Investment
Through our exposition the player is now motivated to explore the generated dungeon. Dramatic tension can now be built through rising action. By increasing the level of conflict, a sense of momentum is created. The semi-linear structure of the dungeon section is employed to create the sense that the current activity is a direct result of what the player did immediately beforehand. A story where each event feels unrelated to the last can reduce momentum, so it is smart to ensure that some events create the need for the subsequent events (Kremers, 2009, p. 68-75; Kuelz, 2018; Short, 2014, p. 90). Within the dungeon structure this could be realised by having an object that is broken into three parts, some or all of which are required in order to solve the challenge at the bottleneck. An exciting climax to the level will only be realised if the player has something fresh for comparison. That is why the Three Act Structure contains a section for things by which a finale is fuelled: uncertainty, darkness, failure or loss-aversion. In this section the generator should place items that will be of direct value to the player in overcoming the challenge of the climax, maintaining the players’ investment in the story and providing a build-up to the eventual payoff (Kuelz, 2018).
Act 3: Payoff
The final section of the level should have built up to the climax. The players previous actions, and the conflict that has arisen, has been given context in Act 1. Will have built up the player’s investment during Act 2. And now comes to a peak, and is concluded as a result (Kuelz, 2018; Nantz, 2012). Within the generated dungeon it is envisioned this will happen as a boss battle directly before the bottleneck at the end of the second section. It cannot happen too early, because too much empty level remaining after the boss fight could cause the player to lose interest. The resolution in the final section of the generated dungeon will be unique to each level. Maybe it involves finding the remaining items required to complete a quest, maybe it involves finding a treasure that will upgrade the players abilities. Successfully building tension and generating player excitement, to then immediately exit them from the dungeon would not be the best call. Emotion without resolution it is not satisfying, it is frustrating. As such, the generator will be designed to include a final reward or payoff near the exit (Kremers, 2009; Nantz, 2012; Short, 2014).
The semi-linear level design approach, when applied to the dungeon generator should produce levels consistent with the stated design goals. Designers will be able to invisibly guide players to a series of co-ordinated challenges. And players will feel they have the freedom to explore and make choices.