How to Make Card Game Software

Written by darrin koltow
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Make Card Game Software
Writing pseudocode helps you write card game source code. (Playing card. The ace of hearts. image by L. Shat from

Card games like blackjack, go fish, and poker can be converted to software programs using programming languages like Java or C++. A key step in making a card-game program is getting thoroughly familiar with the original card game. Also, designing a user interface that lets users manage their cards easily is essential, if you're writing a game from scratch. Making a card game lets you design custom "cheats" and other features that make gameplay easier or more interesting.

Skill level:

Other People Are Reading


  1. 1

    Play some existing open-source card games, like Wizard or Yaniv.

  2. 2

    Get the source code for a game you want your game to be like. You'll find this code on the same site you got the game's executable.

  3. 3

    Open the source files in a word processor and read them, including all comments, which can speak volumes about how a game works.

  4. 4

    Make a list of variable names on a piece of paper, and in the second column on the paper write what you think each variable's purpose is, based solely on the variable's name. This list will help you understand the program.

  5. 5

    Install a compiler for the programming language that the developers made the original card game with. Read the documentation that came with the source code to determine what this language is. If the language is Java, get a Java development kit from Oracle's site. If the language is C, get a C development kit from the GNU organisation.

  6. 6

    Compile the code using the instructions that came with it, and your compiler's instructions.

  7. 7

    Step through the code using your development system's debugger. Read the debugger's user guide for detailed instructions on using this tool. Stepping through code is executing a program one statement at a time. By doing this, you can see exactly how the game's variables and data structures change, and how and when essential game logic plays out. In short, you're teaching yourself how the game works.

  8. 8

    Write, as you step through the code, comments in the source code files that describe what each statement does. For example, for the statement "while (nAces < 10) keepDrawingCards();" you may write the comment "This statement makes the game continue to draw new cards as long as the number of aces is less than 10." Once you've written a comment for each statement in the game, you'll understand the game well enough to customise it. Continue to the next step when you've reached that point. Until then, continue stepping through the code.

  9. 9

    Write the code that produces a change you'd like to see in the game. For example, if you want to customise the deck so that swords appear in place of diamonds, write the code that draws swords on the cards. The knowledge you gained from stepping through the code will let you complete this step.

  10. 10

    Continue writing code to implement new changes until the original card game becomes unrecognisable. This event marks the completion of your custom card game.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.