Pazaak style card game project

Nov 2014

This video game project was written in C++ in a few days for one of my school project at CNAM. Since I have always liked the Star Wars universe I decided to write a small card game that looks like the one we can find in video games such as Knight of the old republic.


The development was really fast, less than 3 days in fact. The goal was to learn the basics of OpenGL. The game is written in an object-oriented way with gameplay classes such as Card, Deck, Table, Level and technical classes such as Game, Engine and Animator.

The Table class manages the cards on the table and their position. The Deck class allow the players to draw new cards randomly, the Deck also contains all the card shuffled at the beginning of the game. The Card class contains information such as card value and if the card is flipped or not. The Level class manages the rounds and turns between players and the victory conditions. It also manages the player inputs (keyboard or mouse).

The Engine class is the heart of the game and initialize OpenGL and Fmod. It also do the mapping for the spritesheets and manages texture coordinates. The Animator class is just here to plays animation such as card sliding on the table. And the Game Class is here to launch everything and keep track of the game.

The biggest challenge here was the short amount of time I had to create a small game, but it's a good way to dive into a technology quickly.


The game is a sort of Blackjack with a sidedeck that you can use to modify your score. There are plenty of cards that you can have in your sidedeck and some can be flipped to reverse their value. This is easily done in the code where you can just multiply the value by (-1). In the real game you can buy or win some really usefull cards, but the trick is to use them at the right time.