matching game !!help!!

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default matching game !!help!!

    hi,
    help!! pls!! im totally doomed at this point. looking at examples but dunno how to modify the code to fit into my game... :( help!!!

    i'm trying to make a matching/concentration game similar to "http://www.i-dac.com/game/door/door3.html"

    so, i make a little prototype game by using a triangle, a square, and a circle. 1st, the user got 2sec to memorize the position. after 2 sec, those pieces will be positioned on the bottom of the stage. if the user drag one into the wrong black box, then "game over." otherwise if the user position all pieces correctly, he/she'll get the win screen. ideally, if the user using more than 5sec to play the game, then it'll also go to the "lost" screen.

    here r the problems i have...
    1) how do i make it randomized and have the pieces remember its position?
    2) how to have the pieces repositioned on the bottom?
    3) how to make the "ideal" part?

    here's the url where u can download my testing file....
    [url]http://stage.itp.nyu.edu/~yfw204/director/matching_test.dir[/url]

    thx a bunch!

    -gail




    Referring URLs
    [url]http://www.i-dac.com/game/door/door3.html[/url]
    [url]http://stage.itp.nyu.edu/~yfw204/director/matching_test.dir[/url]



    gailw20 webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. making this game multiuser game
      hi all, i am working on this, and want to know how to make it multiuser (peer-to-peer) ...
    2. Text Matching
      Hi everyone. I am working with an Illustrator 9.0 drawing that was given to my, drawn by someone else. I'm just trying to do some updating to it....
    3. matching
      I have the following code to find a quote in a string and replace it with a slashquote. ie " goes to \" How do I get it to do more than one...
    4. Matching URls
      Hi, Does anyone know of a link to or an example of a decent regexp that wil recognize internet URLs? (It needs to match urls starting with...
    5. Matching Problems
      Christopher Boyce wrote: Yes. {2,} John -- use Perl; program fulfillment
  3. #2

    Default Re: matching game !!help!!



    You'll need to use behaviours and property lists if you want to do a half decent job.

    -- 1) how do i make it randomized and have the pieces remember its position?

    I'd use a property list for this, basically you need to store 3 values - square, triangle and circle so you end up with a random list like this : [1:triangle, 2:circle, 3:square].
    This way you can refer to shapelist to position your objects & check if they are in their correct positions.


    on position
    temp = list("square","triangle","circle")
    shapelist = [:]

    repeat while temp.count > 0
    i = i + 1
    pos = random(temp.count)
    val = temp[pos]
    shapelist.setaprop(i, val)
    temp.deleteat(pos)
    end repeat
    end


    -- 2) how to have the pieces repositioned on the bottom?
    easiest way of doing this is by jumping to another frame with the 3 sprites already positioned at the bottom of the screen


    -- 3) how to make the "ideal" part?
    you need to use some kind of timer eg.

    property ptime


    on exitframe me
    if ptime = void then
    ptime = the ticks + 300 -- (5 seconds)
    end if

    put the ticks - ptime
    if the ticks >= ptime then
    x = the ticks
    go "timeout frame" -- do something if timed out
    end if

    go the frame
    end



    hope this is useful


    rick@mcorp webforumsuser@macromedia.com Guest

  4. #3

    Default Re: matching game !!help!!

    hi rick,
    thank u for ur help. i've been trying get this to work, and have no luck. :( do u mind email me an example dir file pls? i'd be really appreciated. thank u so much!
    my email: [email]gailwang@earthlink.net[/email]

    -gail


    gailw20 webforumsuser@macromedia.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139