3d10 Game Scripts

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