About Endless Dungeons

Endless Dungeons
Toolset: Unity/C#
Concept: Inspired by games like Puzzle Quest, Puzzle & Dragons, and Devil Maker, Endless Dungeons is a hybrid match-3/RPG prototype built in Unity using C#. My project goals were to combine versatile match-3 mechanics with basic RPG combat and then connect each fight through a simple encounter/dungeon crawling system. In a more complete project, the match-3 concepts would be used across systems such as crafting and the dungeon crawling aspect expanded upon. To that end, I strove to maintain flexibility within my code as an added project requirement.

Moreover, I had to create the foundational elements that Unity did not handle out of the box. This included both high-level and low-level component requirements such a player construct, a game state manager, and a bootloader. These would then need further extension with Endless Dungeons-specific features.

Key Features:

  • Created a block modification system that affects block & gameplay behavior
  • Designed combat system to demonstrate match-3 integrated with simple RPG attributes
  • Developed match-3 mechanics including arbitrary length matching and block type comboing
  • Coded required game infrastructure including game state manager and extended core components

Core Infrastructure: Making a Game

One of the most important core components I needed to make was a game state manager to handle the behavior of each game state and switching between them. This manager also included game initialization code as a game state. In practice, I implemented this through a stack-based system where each game state on the stack would each get a chance to respond to game events as they traveled down the stack.

Block Modifiers: Modifying Visuals & Gameplay

Setting up the block modifier system involved modularizing both code and art to avoid creating unique assets for every desired combination. Each block had to represent general behavior and value that modifiers could then manipulate or bypass altogether. And so do without disrupting matching behavior which itself could potentially change.

Prototype Block Modifier: The Super Block

One of the gameplay features I found intriguing in Puzzle & Dragons and Puzzle Quest was their block modifiers. In the case of the latter, these modifiers could be applied to any block similar to a status effect. In the case of the former, players could apply these modifiers to incoming blocks when they fulfill certain requirements such as large combos or matches.

Supporting this kind of feature where a block could have additional or replaced behavior meant I had to take a different approach in construction. Replenishing blocks had to take into consideration what happened during a player’s turn in order to generate blocks with the proper modifiers. The blocks themselves had be more similar to a set of mutable instructions that could be manipulated by an arbitrary modifier placed upon it.

Match-3: Adding Tactics and Mechanics

Similar to Puzzle & Dragons, players can move a block multiple spaces while shifting the positions of blocks they pass over. I felt this match-3 style fit better with RPG mechanics and the idea of player agency inherit to the RPG genre by injecting an element of skill and tactics that reduced random limitations on player movement options e.g. having only one available move in a given turn due to newly spawned blocks.

To prevent excessive movement and introduce an element of player tension, block movement is limited by an auto-drop timer. If a player holds on to a block for too long, the carried block is automatically dropped and the turn ends. Under a certain threshold, a player who has not moved the block can freely drop the block without that counting as a turn.
Resultantly, the game board tracks a high degree of information in order to properly reflect the game mechanics such as the number of same-type matches for use in counting combos. Because a player can manipulate multiple blocks per turn, the block matching algorithm must also considering additional match information such as intersecting matches and matches of greater than 3 in length.

RPG Combat and Other Mechanics

Combat

Combat Phase

The combat system borrows from Puzzle & Dragons and Puzzle Quest where each block type represents different actions or attributes within combat. As in Puzzle & Dragons, the more matches and the larger those matches are, the more potent the effect will be. The addition of block modifiers further influences this potency. The resultant effect can then be compared or applied within combat.

In the case of Endless Dungeons, the player has 3 types of attack blocks, 2 defense blocks, and 1 healing block. Each attack type represents a form of attack (melee, ranged, non-physical) and is countered by a corresponding resistance. The two defensive blocks improve defense by providing buffs over time which allow a player to at least partial focus on defense and survival. These defenses also have their own counter-attributes which reduce their effectiveness. Lastly, healing provides direct healing to health and similarly, can also be countered.