The other day, as I worked on Peggy (tabletop game engine), I had an epiphany about the game pieces. For this engine, it takes into account three kinds of game pieces: cards, dice, and pawns. As I worked on how to track the changes of game pieces and how to define how each piece should behave, most of the pieces share the same characteristics. Then, it hit me…Most of Peggy’s game pieces are basically variants of a playing card.
I know. It sounds crazy to claim the different pieces are cards. In the confines of Peggy, it makes perfect, crazy sense. Plus, it simplifies a lot of the design.
Let’s back up a moment. First, picture in your mind a typical playing card. Think about the characteristics of that card. Consider its physical aspects and how it functions.
An average playing card essentially has two sides. Yes, I know it also has a very thin depth, but game-wise, players are mostly concerned with its two sides. One side is the back, which most often shares the same image as the other cards in the deck. This is to help obscure its position in the order of the deck. The other side is the face. Unless decks are combined or there are duplicates, most often, the face is a unique image between the other cards in deck. It has various symbols to help identify the face (suit and rank). That is what a playing card looks like. How does it behave?
Think of the various ways you can manipulate a playing card. The card exists in three-dimensional space. It can move in various directions, like tossed into a hat or slid across a table. You can flip the card over to show the back or the face. It can be rotated.
When using cards as a deck, there are even more ways to manipulate the cards. They can be dealt or drawn from the deck. They can be stacked as the deck or discard pile. They are separated and assigned to the players. Sometimes they are played individually or as a set. They can be collected into tricks. The deck can be ordered or shuffled. When it comes to their physical location, they can be positioned together to build a card house.
Now, applying rules of a game to the deck of cards, things get even more complex. Cards are provided greater meaning, like Chance cards in Monopoly, or the Suits and Ranks as in Bridge. The Monopoly cards declare an action which assists or hinders the player(s). At casinos, there are even rules when players are allowed to interact with the cards.
Got all those concepts in your head? Yeah. It is a lot. And, that is why there are so many different games people can play with something as simple as a deck of cards.
For Peggy, I focus on roughly two-thirds of the above characteristics and manipulations of the game pieces. That is why I want to leave the enforcement of the game rules and protocols to the players. There are already enough other aspects of cards for the game engine to consider and maintain.
All that is complicated enough, and we have not even discussed pawns or dice. Oh, man. I have to worry about those pieces, too? (Sigh)
Yes and no. This is where treating them like cards helps. Dice and pawns share many of the same characteristics. When you think about dice and pawns as a variant of a card, there really is not much more to think about apart from what has already been established for cards.
How is a pawn a card? Think of a pawn as a one-sided card which may be moved two-dimensionally around the game board. That game board is also a one-side card, but it does not move. It is positioned on the table and left alone. For Peggy, it is one piece that is established at set up and does not need to be tracked. Even game currency is essentially pawn-cards in various denominations.
Ok. What about dice? How are dice cards? Think of a single die as a deck with a certain number of cards and each card is one of the die’s faces. Put enough of these decks together, you have a set of dice. Rolling the dice is equivalent to drawing a card from each deck. The decks are ordered if the value ever needs to be incremented of decremented.
For Peggy, when I consider all game pieces (or most pieces) as cards and program the card behaviors, the other game pieces fall into place. Tracking pieces becomes tracking subsets of various decks of card types. If all pieces are treated as cards, I can even make game pieces difficult to replicate in real life, like a seven-sided die or a card with three sides.
Plus, there are some elements I can ignore. I am not building an engine to stack cards into a card house. Nor, am I allowing cards to be tossed into a hat. Other pieces, like a score board, would be considered an additional feature which will be tracked differently and independently to the other pieces.
As I said…It is all in the cards.
Hello!
Good cheer to all on this beautiful day!!!!!
Good luck 🙂