October 8, 2008
[ - 5:04 pm ]

I’ve authored a series for IBM developerWorks called 3d10 Game Scripts You Can Write With PHP. These scripts are simple utilities that can be used in various different types of games. I’ve provided working examples of the scripts linked below. To get the code for these scripts, you will have to view the Articles.  Here is the link to Part One.

Part 1

  • A Basic Die Roller – The working example of the simple die roller described in the article;
  • Random Name Generator – Randomly generates alternating male and female names from a set list;
  • Scenario Generator – Generates a basic RPG scenario from stock lists of situations;
  • Deck Shuffler – Generates a basic 52 card deck and draws a random card;
  • Odds Calculator : Card Draw – Given a pair of hands, calculates the odds of drawing a few specific cards;
  • Simple Poker Dealer – Generates a deck, deals out five cards, and lets you pick which ones to get rid of;
  • Hangman Generator – Creates a simple hangman game;
  • Crossword Helper – Given a word of X length with Y known letters, provides some possibilities;
  • Mad Libber – Creates a stock Mad Lib from a set list of words and a specific phrase;
  • Lotto Picker – Looks at historical lotto picks (user entered) and specifies the 6 least picked numbers;

Part 2

Part 3

9 Comments | RSS |

  1. Hi there,
    I have recently downloaded the Simple Blackjack Dealer from the IBM development website but I appear to be having a few problems fixing the bugs. Do you think you could upload an updated working copy or possibly email it to me? I will be most grateful,
    Thanks

    Comment by Dylan MartinNo Gravatar — February 18, 2009 @ 7:46 pm


  2. Can you indicate what bugs you are running into, or what problem you are having?

    Comment by DuaneNo Gravatar — February 18, 2009 @ 9:24 pm


  3. Whenever the player goes to hit I get this error

    Warning: array_shift() [function.array-shift]: The argument should be an array in blackjack.php on line 80

    And also when the player hits stay nothing happens, in the example on your site it shows what the dealer ended up getting.

    Any help would be great!!
    Thanks

    Comment by BevanNo Gravatar — May 17, 2009 @ 9:29 am


  4. sorry….forgot to say im working with the blackjack dealer!

    Comment by BevanNo Gravatar — May 17, 2009 @ 9:30 am


  5. I have the same problem with Dylan Martin. Can anyone help?

    Comment by huiNo Gravatar — June 23, 2009 @ 9:33 pm


  6. I’ve put up working text at http://aterribleidea.com/3d10/3d10-simple-blackjack-dealer.txt

    Can you tell me more about what your problems are?

    Comment by DuaneNo Gravatar — June 24, 2009 @ 12:53 pm


  7. I am trying to create a simple php blackjack game. I can show the cards image, but I am stuck at the hit and stand part, I cant hit the card appearing with the dealercard and playercard together. This problem has troubled me a long time. Should I create $_Session varaible to store the dealercard and playercard?

    Comment by huiNo Gravatar — June 26, 2009 @ 11:12 pm


  8. Can I ask what is inside the the file of include.php?

    thanks

    Comment by huiNo Gravatar — June 26, 2009 @ 11:23 pm


  9. The include.php file just has the links that appear at the top of the scripts. No functional code.

    Comment by DuaneNo Gravatar — July 13, 2009 @ 10:43 am


Sorry, the comment form is closed at this time.

site ©2009 by duaneobrien.com -