Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2006
    Posts
    16

    Help with board game

    I need help with a board game si when I get question 1 right i will move 2 spaces if i get the question i move back 1 space.

  2. #2
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Hi aquataze,

    I have attached an example that shows 15 squares. On Preload the object names of the squares (disabled buttons in my example) are indexed in a table so they can more easily be looked-up later.

    When the "Roll Dice" button is clicked, the script on the button does the following:
    1) Generates a random number between 1 and 12
    2) Displays the number
    3) Finds the target square by looking it up in a numerically index table
    4) Finds the coordinates of that square
    5) Moves the "chip" to the appropriate square

    There are a couple of checks added to ensure that the chip cannot be moved past the end square (that would produce an error).

    This example could probably use some optimization but its a start.
    Attached Files
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  3. #3
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    One more thing to note: I cheezed out on the rolling of the dice. That button produces a staight random 1 - 12, not a statistically correct result.
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  4. #4
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by TJS
    One more thing to note: I cheezed out on the rolling of the dice. That button produces a staight random 1 - 12, not a statistically correct result.
    Sounds like it would be time for:

    Math.RandomSeed()
    Intrigued

  5. #5
    Join Date
    Mar 2006
    Posts
    16
    Thank You both for the Help!

  6. #6
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    TJS... 99%, Intrigued .9 and .1 percent +/- for error

    Intrigued

  7. #7
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    I played around the the previously posted example and added a few things:
    1) Rolling the dice produces a realistic result
    2) Added motion so that the game chip "steps" from square to square
    3) Roll button gets disabled while chip is in motion
    4) Added comments throughout the script

    I don't know if this will help but it was fun for me. Most of the script should be easy to adjust to support things like backward motion. I image you could make Global Functions out of most of it for reuse across pages (if you game has different levels for example).
    Attached Files
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

Similar Threads

  1. Example: A PONG game built 100% in AMS50!
    By Corey in forum AutoPlay Media Studio 5.0 Examples
    Replies: 6
    Last Post: 01-11-2005, 04:52 PM
  2. play game.....
    By c444 in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 07-12-2004, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts