Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Gamasutra: The Art & Business of Making Gamesspacer
What I Did During My Summer Vacation: Developing a Game in 13 Weeks
View All     RSS
May 27, 2019
arrowPress Releases
May 27, 2019
Games Press
View All     RSS

If you enjoy reading this site, you might also want to check out these UBM Tech sites:


What I Did During My Summer Vacation: Developing a Game in 13 Weeks

December 1, 2001 Article Start Page 1 of 2 Next

The Start

In the short span of time from June 13 to September 22, 2001, Reel Deal Poker Challenge went from a concept to a gold master. Some preliminary artwork, concept art and minimal documentation were available at the start. The game was desinged for Phantom EFX, a small publisher and developer whose strength is in their superb graphics and audio (they have an in-house sound studio).

The Concept
Phantom EFX's first title was Reel Deal Slots and Video Poker, and they desired to continue in the gambling genre with a poker game. Reel Deal Poker Challenge presents a variety of poker games inside an elegant Poker Palace. There are three floors of play where the opponents play better on each level and the stakes get higher. Each floor has a poker room for regular play against four animated, talking players or eight basic players (a standard poker view) and a tournament room where four players play one variation for 20 hands and the player with the most money is the winner. A cashier area to register players, get more cash when your wallet is looking empty and see your statistics. There is a slot room with a few slot machines to promote the previous title, and an elevator allowing players access to the other floors when they have earned enough " reputation points" by playing in tournaments. One of the popular concepts used in the first title was a prize room where players win valuable prizes when they do well. In Poker Challenge, when a player wins certain tournaments, they win a valuable prize. The prizes are unknown to the player and collecting all of them is a secondary goal in the game.

The goal of the game is to earn enough "reputation points" and money to challenge to World's Best Poker player in a winner take all $2.5 Million game.

Reel Deal Poker Challenge four player mode.

The Plan
A good poker engine takes time to develop. From 1993 to 1995, I had been director of development at Villa Crespo Software, then the premier gambling entertainment software company with titles like Stanford Wong's Video Poker, Amarillo Slim's Dealer's Choice, The Gold Sheet Football Analyzer and Dr. Thorp's Blackjack. For Poker Challenge, we licensed a poker engine from one of the developers I had worked with at VCS. The next issue was using DirectX 8.0, which had recently been released. For artwork, the easiest format to work with was BMP. I tried using the PNG format, but the time needed to write and properly implement the routines was not available. Sound was to initially be outputted via the "play" function, with Direct Sound to be implemented later.

The Eye Openers
The DirectX sample code for Direct Draw and Direct Input uses MFC and Dialog Boxes which, when they compiled cleanly, didn't relate to what I needed. MFC and window/dialog boxes were not used in this project. One issue that came up was that in Direct Draw full screen, exclusive mode, debugging became impossible except by using Message Boxes. To debug properly, the following code was used frequently by commenting and uncommenting the code below.

Note: include Ddutil.h and Ddutil.cpp (provided in DirectX8.0)

void InitializeGraphics(HWND hWnd)
RECT qrect={0,0,800,600};

MessageBox(0,"Your hWndNULL",TEXT("Poker2000"),MB_ICONERROR| MB_OK); exit(0);
//************** USE THIS IN FINAL NON-WINDOW VERSION if(FAILED(DXscreen->CreateFullScreenDisplay(hWnd,800,600,32)))
MessageBox(hWnd,"Unable to find a compatible display mode. The program will now exit.",
TEXT("Poker2000"), MB_ICONERROR | MB_OK);
// if (FAILED(DXscreen->CreateWindowedDisplay(hWnd, 800, 600)))
// exit(0);

The poker engine was written in MS Visual BASIC and played several poker variations (Draw Poker No Openers and Jacks or Better to Open, Five Card Stud, Seven Card Stud, Chicago Hi (Seven Card Stud with the High Spade in the Hole/ down cards the second winner), and Hold 'Em. The first issue was to convert the BASIC code to C++ code.

The poker AI was primarily in one VB module, but the variables were defined and used in numerous modules. After rewriting the original code several items had to be fixed. The engine did not account for equal poker hands, as when four players each have a Royal Flush. The engine designer's reaction was it would never happen. Well, what about a straight flush or a flush with the same ranked cards? This issue was fixed by allowing a suit order (Spades, Hearts, Diamonds then Clubs) and allowing multiple players to be the winner. The original AI also didn't look at other tie breaking issues. The new version resolved tiebreak by having two components of the "handresult" which comprised of Result Type and a Long Tie Factor. The Result Type is a number comprised of a best hand number (pair is 20, two pair is 40, to a straight flush as 160 and a royal flush as 180) plus the rank of the key card (2 through Ace or 14). The Long Tie Factor is a long (4 bytes) where each card's rank in Importance order is stored. A hand of three kings, two aces, a 3 and a 5 is stored as {13, 13, 13, 14, 14, 5, 3}. If two players have the same Result Type such as a pair of kings each (value 33) then the Long Tie Factor number is used to break the apparent tie. Reel Deal Poker Challenge poker added two variations, Chicago Low (the opposite of Chicago Hi where the lowest spade in the down cards shares as winner) and Omaha (a very popular poker variation). In games like Texas Hold 'Em and Omaha, the best possible hand must be determined. Texas Hold 'Em is a poker game where each player is dealt two cards down and five cards are dealt as community cards (used by all players). Omaha is similar to Hold 'Em except each player is dealt four cards down and five cards are dealt as community cards. In Omaha, the final hand is the best hand comprised of two of the four down cards and three of the five community cards. In Texas, the player uses their two down cards and three of the five community cards to make their best hand. The AI was programmed to analyze and determine a player's best hand.

Reel Deal Poker Challenge eight player mode.

Know the Rules
As a programmer, we often give tasks to the computer rather than let events happen naturally. In Draw Poker: Jacks or Better to Open variation, the code was originally written to allow only a player having a hand of a pair of Jacks or Better to open betting and continue the hand. If no player had a pair of Jacks or better, the hand was redealt. The program decided the course of play not the players. This method was incorrect. The final version gives each player the choice to "check" (pass), "fold" or "bet." If all players "check," the hand is redealt. If a player "bets" and they do not have the required hand, the "check" option is substituted. In Five Card Stud, Seven Card Stud and Chicago, the first bet is a forced bet for the player with the lowest up card. In Hold 'Em and Omaha, the player to the dealer's left must make a forced bet called the "blind bet. " The ace is always the high card except the Ace of Spades in Chicago Lo where, according to several websites on poker, the ace can be the lowest hole (down) card. This information changed the Chicago Lo AI where the Two of Spades was the lowest card.

Article Start Page 1 of 2 Next

Related Jobs

Sucker Punch Productions
Sucker Punch Productions — Bellevue, Washington, United States

QA Manager
Digital Extremes Ltd.
Digital Extremes Ltd. — London, Ontario, Canada

Senior Lighting Artist
Dream Harvest
Dream Harvest — Brighton, England, United Kingdom

Technical Game Designer
Deep Silver Volition
Deep Silver Volition — Champaign, Illinois, United States

System Designer (Player Progression)

Loading Comments

loader image