How do you make a matching game?

Get rid of that table arrangement, as previously advised. Use a horizontal arrangement and three vertical arrangements instead.

2 Likes

Got that my bad!


Is all my logic wrong? on how every button must get a random color and the number 1. Send help :((

So everytime the screen shows up the buttons will have random colors with number 1

If any two buttons get clicked and doesn't have the same color and number then the buttons that got clicked will be clickable again.
Else
If the two buttons have the same color&number the first button will become another random color with the number 1 and the second button will become 2 retaining its color.

Are repeat random numbers allowed (no duplicates) ? If duplicates are not allowed, then when you select a number randomly from a List you have to remove that item from the List, then reiterate through that modified list again to get the next item until you exhaust all the items.

You are not doing that at initialization. :cry:

To get an idea what you should do look at one of these methods

1 Like

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

For your initialization, you need a loop over all 9 buttons.
Hope you kept that global init with the 9 button components.

1 Like

CollideIt_CEEKAY.aia (26.6 KB)
Here it is.

I guess duplicates are allowed because having 9 buttons with any of the buttons having 1 at start and any of the three colors.

OK. Thought this is what you meant by randomizing nine Buttons.

shuffle

randomColorsNumbers4.aia (7.3 KB)

Good luck with your Project. :smile:

1 Like

HOLY YES SOMETHING LIKE THIS but everything only starts at 1. Thankyouu will keep going.

OK. Try the aia I just added to the Button image post. It might be helpful. Have fun with your Project.

1 Like

Thank you!!! T___T Somehow I'm confuse on what the clock does does it play a big part on shuffling the colors and all.

sample run 3


randomColorsNumbers5.aia (4.9 KB)

Here's my take on your logic.

The font size and previous button logic might need a tweak.

1 Like

Hello Its been a while!!! And you've got it all T^T I tried to understand the code a bit more Thankyou so much! Now I'm trying on changing things up, if you pressed the previous button then it doesn't match the next button the previous button would go back to its original size and your score would set it to 0 also added a timer so that it would end at a certain time. You've been a hugeeee help T___T I was away for a while.

Collideit_CEEKAY.aia (18.8 KB)
I've done the when you do a miss match it will bring your score back to 0 but now it just crashes.

You added Clock Timers.

Clocks must be disabled before switching screens, or else they will cause crashes. It's like standing front of a window, throwing a boomerang, then walking away without catching the boomerang. Crash!

Also, you never close the screens you open, eventually leading to running out of memory.

See the screen switching section of

1 Like

Oh yeah fixed it I don't know how though AAAAAH THANKYOU SO MUCH ABG!!!! FOR EVERYTHING T__T

Back again for a while been busy with a lot of stuff. Now that I have timer and all I'm thinking on adding levels to it if the players have reached their maximum limit on the one and twos maybe 1 - 3 numbers for medium 1 - 4 numbers for hard then added more color.

Use Project Save As to make a new version.

This avoids improving a program to death

Okay thankyou! I thought I could just go on and on with it.