A deck-building, dungeon-making, rogue-like card game - Submission for GMTK Game Jam 2019
This game was my submission to the GMTK Game Jam 2019. The theme of the jam was "Only one". This game was made in PICO-8, and features my own personal interpretation of the theme.
The design of Dungeon Solitaire
This game is pretty complex, with lots of gameplay elements merged together. I'm going to talk about the design process which led to this game. I also want to talk about some of the things I was very happy about with this game, and some of the things I think need a bit more work.
Defining the Game
I define this game as a "deck-building, dungeon-making, rogue-like card game". That's a pretty loaded genre description, so it might help to break it down a little.
The object of this game is to complete 9 levels in one go. If you run out of health, or if you run out of moves, your game is over and you need to start again.
This gameplay loop is what best defines the rogue-like genre. Originally named after the game Rogue, the rogue-like genre is now generally understood as any game which resets your progression after a failed playthrough. Some modern rogue-likes include systems to allow players to purchase upgrades between playthroughs which make future playthroughs easier, while still keeping the core loop of resetting most progress between playthroughs.
Rogue-like games are pretty well suited for game jams too. Typically a single playthrough of a rougue-like game lasts a pretty short amount of time, which makes them good for development in a game jam setting.
Deck-building is a genre usually associated with card games. Which makes sense, seeing as this game is a digital card game. Deck-building is something usually associated with collectable, or trading card games, but my main source of inspiration for this was actually the card game Dominion. Unlike collectable card games, players of Dominion construct their decks during the game from a communal pool of cards.
Unlike Dominion, however, this is a single-player game. I think this merged nicely with the rogue-like genre, since it would become a game where you either win or lose. That's where the "Solitaire" in the game title comes from.
In Dungeon Solitaire, a player is constantly adding to and expending cards from a deck. The cards currently in their deck is the main resource the player needs to be thinking about.
This one is a bit of an odd one. I'm using this to describe a game in which the player is responsible for creating parts of the level that they are exploring. There are lots of games that use this kind of idea, but the one I had most in mind when creating this game was the board game Labyrinth, which I have vague memories of playing as a child.
The board game Labyrinth (Image via Amazon)
This is also where the square-shaped tiles which make up Dungeon Solitaire take their inspiration from. But aside from the general layout of the maze, Labyrinth doesn't have much to do with Dungeon Solitaire.
The game starts by giving players a chance to build a deck. They are allowed to pick 7 cards from 7 sets of 3 cards. This is in adherance to the theme of "only one", forcing players to pick one card and discard the others. It was also inspired by collectable card game drafts, but with just one player.
The player building a starting deck of cards.
On their first game, players are encouraged to aim for a balanced mixture of cards, but on repeat playthroughs players can aim for specific cards for a specific playstyle. Once the player has finished making their choices, they are taken to the game's main screen.
The game's main screen.
To clear each level, the player needs to move their character to the card with the staircase. The player moves from card to card to try to reach the staircase. When they stand next to a face-down card, it is turned face-up, revealing the shape of the room it's hiding.
The player can only move their character over cards, so if there is not a path to the goal, they will need to make one. To make a path, the player needs to use the cards in their deck.
At any point, the player can draw the top three cards from their deck and look at them. They can pick "only one" of these cards (sticking with the theme again) and play it onto the game board. This way, the player is able to construct a path to reach the staircase. The 2 cards the player does not choose are added to a discard pile.
Once the player reaches the staircase, the round ends. Any cards in their discard pile are added back into their deck and reshuffled to use in the next round. However, any cards that they played onto the game board will be gone forever at the end of each round. Each card can be used "only once".
Since the player starts the game with a deck of just 7 cards, and each time a card is used it is gone forever, the player will start to run out of cards quite quickly. To solve this, some cards feature a treasure chest.
A card with a treasure chest.
When the player steps on a card with a treasure chest, they are presented with a choice of 3 cards, just like when they were building their deck at the start of the game. The card they pick is immediately shuffled into their deck, so it's possible to use it right away. This can cause some tense situations where a specific card is needed to be able to clear a level. Cards in the player's deck can also feature treasure chests. These cards are particularly valuable, as they're effectively a "free card" when the player uses them.
Some cards have a monster blocking the paths. When the player steps on a card with a monster, they will automatically fight the monster, removing it from play, but at the cost of 1 of their hit points, or HP. HP are another resource the player needs to monitor. If they run out of HP, the game is over, so it's best not to run too low. The player can restore their HP by stepping on a tile with a heart on it. When they do this, their HP is restored by 1 point, and the heart is consumed.
Cards with a monster and a heart.
One final aspect of gameplay is special cards. As well as the cards with rooms on them, the player's deck can include cards with special effects. A player plays one of these cards in the same way they do for a room card, except it does not need to be placed on the board. There are 4 types of these cards, with the following effects:
- Immediately restore the player's HP to the maximum value.
- Increase the player's maximum HP capacity by 1. (Restoring 1 HP in the process)
- Turn all face-down cards on the board face-up.
- Remove a card from the board. (Except for the card the player is standing on, or the stairs)
The 4 types of instant-effect cards.
On the ninth level of the game, the staircase is replaced with a crown. Once the player collects this crown, they win the game.
The player can lose the game in two ways. If they run out of HP from fighting too many monsters, they will lose the game immediately. Additionally, if the player has no more cards in their deck, and there is no path from the player to the staircase, then the game declares that there are no more moves, and the player loses.
Designing the level generation system for this game took up a considerable amount of development time. It was a challenge to randomly generate levels that are possible to solve, but provide a reasonable amount of challenge. Additionally, the levels had to increase in difficulty as the player progresses through the game.
In the next few sections, I'm going to go over the steps that the game takes in order to generate each individual level.
Step 1: Fill the board with cards
First, the entire grid is filled in with random cards. The cards are set up in a way that all the exits on the cards match up. One space on the map is randomly designated as the staircase.
The initial map full of cards.
Step 2: Placing the player
The player is initially placed on the staircase. Then, the player is moved to an adjacent, connecting card. This is repeated 50 times, to make sure the player has a good chance to move far away. If the player ends up within a couple of spaces of the staircase anyway, the entire level generation process is restarted, until the player ends up far enough away.
The player's starting position.
Generating the board layout and placing the player this way is very important for making sure that the level is solvable. Doing it like this guarantees that the player will always be able to follow a path from their starting location to the staircase.
Step 3: Removing some cards
Obviously, if the board started full of cards, there would be no need for the player to place cards from their deck. Therefore, some of the cards need to be removed.
For each card that isn't the player's start space, or the staircase, there is a chance that it will be removed from the board. Additionally, anywhere a card is removed, the surrounding cards will change to have an exit facing that empty space. The reason for this is that, since the cards start face-down, the player can place a card next to a face-down card and know that it will connect.
The board after cards are removed.
Step 4: Placing objects on the cards
The next step is to add the interactable objects. Each card has a chance of holding a heart, a monster, a chest, or nothing. The probability of each object appearing is determined by what level the player is up to. Hearts and chests become rarer throughout the game, and monsters become much more prevelant.
The card with the player and the space with the staircase are not considered, and cannot have objects placed on them.
The board, populated with objects.
Step 5: Removing "useless" cards
The final step of the level generation process is to remove any cards which are unhelpful. The two factors which are used to determine whether the card is "useless" are:
- The number of exits the card has
- Whether the card has a chest/heart
This means that all cards with no exits are deleted, and all cards with 3 or more exits are kept. If a card has 1 or 2 exits, then it is only kept if it features a chest or a heart. Whether the card has a monster doesn't factor into the decision.
Useless cards are removed. In this example, only one card needed to be removed.
Final notes on level generation
For a sense of extra exploration, all cards that aren't the staircase or the player's starting card start face-down. They flip face-up when the player moves onto a connecting card.
In level 9, the final level, the staircase is replaced with a crown. This change takes place right at the end of level generation, so there is no difference in how the level is generated.
I wanted the game to feel as natural to play as possible. That can be pretty difficult for card games, which don't tend to lend themselves well to video game controls.
To make the cards feel like real cards, I added a few animations. For example, cards are animated flipping over, and have a dropshadow beneath them to suggest them being lifted up.
Cards are animated flipping over.
This flip animation is also used to show the player fighting a monster. The card flips over and a brief fight animation is played before the player's health decreases.
Cards flip over to show fights.
Whenever the game shuffles the player's deck, that is animated on screen. Additionally, the visible height of the deck changes to indicate the rough number of cards in the deck.
When the deck is shuffled, it is animated on the screen.
None of these animations were strictly necessary for the game to be playable, but I felt that having them helped players to follow the flow of the game. Animations like shuffling the deck also help with transparency, making it more obvious exactly how the game systems work. This means that players have fewer misconceptions about how the game is dealing with the cards.
However, this was a 48-hour game jam, so there were limits to the number of animations I could program and test within the time constraints. I'd have liked to have animations for the cards being dealt onto the table and tidied away after each round, but there would not have been enough time for me to implement and tweak an animation of that scale.
The GUI was also important for this game. I put arrows around the player when they are able to move, indicating which directions they can move in. This helps the player to easily see their options, when the player piece can sometimes obscure bits of the card the player is standing on.
Arrows indicate which way a player can move.
When the player presses the button to see options about drawing cards, the contextual menu appears as a word bubble above the deck. These same bubbles are also used for explaining details about specific cards. Having them as a bubble helps the player easily see what element of the game the text is about.
Contextual menus are close to the game element they relate to.
Finally, since the player is able to view the deck at any time, I felt it would help to have an animation for that. To make it clear where the cards were coming from, the deck is spread downwards, with the cards flipped over for the player. The player can then move through the cards and check them one-by-one, which helps when there are a lot of cards to look through.
The deck is spread and flipped for the player to view.
I was, overall, pretty happy with this game. I've mentioned a few things I'd have improved on, if I had more time to work on it, but I think the game is fairly well polished for just 48 hours. If I come back to expand on this concept at some point, there are a few things I'd do differently. Using the keyboard is not the most natural way to control a card game, so I'd want to make it possible to use the mouse or a touch screen to play the game. I think this kind of game would work quite well on phones or tablets, as the short game length makes it fairly easy to play in quick bursts. I'd also be able to put more time into graphics and animations, and spend more time tweaking the game balance.