A Simple Card Deck Simulator

Testing a tabletop game is often very tedious because there are so many bits and pieces to track and manage. Today, I want to share one of the tools I coded to reduce the time spent shuffling decks. You can download it and use it for your own projects.

Everyday I’m Shufflin’

One of the most utilized components in tabletop games are cards. Cards are great in so many ways: they are small, light, compact, easy to hold, can be randomized, can contain images and text, and so much more. They are a versatile component only held back by the designer’s imagination.

However, one problem with cards during the development cycle is that they are tedious to handle and setup. When you consider how many playthroughs you have to do to test a game, you can imagine how all the time spent shuffling, sorting, writing, sleeving, etc can compound. All this time is taken away from what the designer should really be doing- analyzing and making changes to their design.

Game Design Software Tools

To cut down on the wasted time, I plan to create a collection of tools that can replace some tabletop components during tests so I spend less time with meticulous work and more time designing.

In an earlier post about prototyping cards quickly, I mentioned the first program I made: it lays out the images of your cards on a short bond paper for quick and easy printing. I still have to make it user-friendly but once I do I will share it.

The second is a program that simulates a simple deck of cards: The Random Draw Tool.

How cool would it be to shuffle a deck in the press of a button? To be able to track the cards you’ve drawn? To edit an entire card database by simply copy-pasting from my excel sheet? Well, download and find out!

Readme.txt

Downloading the Prerequisites

First you have to download the prerequisite libraries of the program.

Windows

If you are using Windows, you have to download and install the GTK# library which you can find in this link.

MacOS

MacOS is a little bit trickier but first you have to download and install Mono which can be found here.

Downloading the program

Download RandomDrawTool.exe.

Run the RandomDrawTool.exe

Windows

Simply double click RandomDrawTool.exe.

MacOS

Open up the terminal. Go to the directory of RandomDrawTool.exe then enter “mono RandomDrawTool.exe”.

A Brief Description

Here’s what the program looks like. Don’t worry if it seems a lot. It’s very straightforward once explained. If you forget, a short instruction on how to use the program and a sample deck will always appear when you start the program.

Screen Shot 2016-07-05 at 3.15.20 PM
Random Draw Tool v1.0

The Deck Window

deck window
The Deck Window with sample MtG cards

The Deck Window is where you input the details of the deck of cards you want to simulate. Each line is a new card. Each card has 3 details: Quantity, Name, and CardText. It’s important that each detail is separated by a ‘tab’.

In the example above, my deck has 5 “CardName” cards, 2 Lightning Bolts, 5 Mountains, and 4 Raging Goblins.

If you setup your card spreadsheet so that column 1 is the number of cards, column 2 is the name of the card, and column 3 is the ability of the card, then you can copy-paste from your spreadsheet directly unto the Deck Window (and vice-versa).

The Play/Stop Simulation Button

Play button.png
Found on top of the Deck Window

Once you’ve typed the details of your deck, press the Play Simulation Button to start the simulation. This button becomes the Stop Simulation if a simulation is running.

It’s important to state that you have to stop and start a new simulation when you are making changes to the deck in the Deck Window for the changes to appear in the simulation.

The Log

log.png
It’s better than bad, it’s good!

The Log shows the history of your past actions. For example, having ran my example from above, the log first shows how the program prepared the deck of cards. Then, it shows what cards I drew for my first to tenth draw. Below the Log is a status showing if a simulation is running. On the upper right is a button that clears the Log.

Simulation Actions and Status

commands

Once the simulation is running, you can:

  • Draw a Card
  • Restart the Simulation

The program shows how many cards are remaining in the deck and how many are in the discard pile. The Drawn Card window shows the last drawn card; in this case, it’s a Mountain.

Restarting the simulation means returning the discard pile to the deck then shuffling the deck. You won’t get the same order of draws after a restart.

Open and Save

Don’t bother with these buttons as I haven’t implemented them.

Using the Random Draw Tool

For all intents and purposes, this program is in no way able to simulate each and every way a deck of playing cards can be used in a tabletop game. Instead of making one all encompassing program, I plan to make many lightweight mini-programs of different uses.

I made this tool because a game I’m designing has a card-driven event system. It’s one of those mechanics that work something like this:

“Every turn/round, reveal the top X card/s of the Event deck then do it’s effects.”

You can find a mechanic like this in games like Elder Sign, Eldritch Horror, Game of Thrones Board Game, Pandemic, Dungeons and Dragons Wrath of Ashardalon, and many more. You can use the program in whatever way you like.

More tools

In the future, I’m going to be making more tools as I need them. If you have any ideas for useful tools, let me know. If it will be handy to me, I might code it.

If there any bugs or problems with the Random Draw Tool, let me know. If there any feature requests, let me know too. Hope this little program helps. Thank you 🙂

 

Follow Nico Valdez:

Game Designer

Nico is a game designer, programmer, songwriter, ex-audio engineer, amateur fiction writer, and president of Balangay Entertainment®. One of the less competitive members of Balangay, Nico only wins against 2k, Marx, and Aya when he's played the game before and they haven't. Nico always wins against Aa. He'll play almost anything as long as it's not loud. He likes euro games for their strategy and thematic games for their roleplaying. He doesn't like party games that much because they get too noisy for his ear disability.

Leave a Reply