Memory Master - "Simon"-style memory game in Thunkable X

Yes, you need to set a variable to keep track of this. You can use numeric values or text such as “player” and “computer” for the turn variable. That allows you to check to see if it’s the player’s turn when a button is clicked. If it isn’t, then do nothing. I noticed you have wait blocks after each “computersTurn” function. I would move those up right above the computersTurn function call. Because as it is now (on the “GameCopy” screen), the computer turn happens very quickly and immediately after I click the last button. There needs to be a delay because I’m not able to see the pattern when that happens.

Loop through the lists using for 1 to length of list and check list item #j (where i is the loop variable) of the player list to see if it equals list #j of the players list. Set a variable (e.g. “all choices match”) to true before the loop begins. If the two list items are not equal, set the variable to false and break out of the loop. After the loop, check the variable value. If it’s true, then the player wins. If it’s false, then the player loses.

Screen 1.

Main Screen is the original app, whose blocks we could never see for reasons we never really sorted out. It was assumed to be a compatibility issue between old and new Thunkable. Screen 1 is what I thought was going on in Main Screen but couldn’t verify.

1 Like

My apologies, I should’ve removed the copied screen. I only created it as a way to keep track of older versions. Screen 1 is the one that “works” up to the point it does (without checking the two lists against each other). You shouldn’t have any issues seeing the computers sequence there. The copied screen is a mess because I started to try a couple things that I abandoned.

Hi, here’s a working demo I made. It’s nothing too polished but it does allow users to repeat the sequences and then get checked for accuracy. To look at the code, go to ‘Screen 2’.
https://x.thunkable.com/projectPage/620f3f9c6472820011b9f0d6
Hope it works for you.

2 Likes

Thanks so much @codeswept this helps tremendously! Now I just need to add in the sounds at the correct time and adjust the score variable to change by one every time the sequence is matched.

2 Likes

I got the score updating with matches, just need to get the sound working now.

1 Like

Glad it helped :upside_down_face:
Have you got the sound working?

1 Like

Glad to see you back @codeswept

3 Likes

Thank you! The holidays started here so I’ve been occupied :rofl: :rofl:

1 Like

nice to see you again @codeswept - what have you been up to?
(your game is very good simulation of simon! - the reason there is no sound is because the sound files - red.mp3, etc. are not in the project, i think)

2 Likes

I’ve still been coding but wasn’t active on the community for a while. Also been busy eating icecream upon icecream :laughing:

I added the sound code as an example for @Scott_Turcotte in a DM. I wanted to merely show the blocks and didn’t actually add the file, but now that you mention it I could actually do a lot of experimenting with the sound!
Edit: Added the sound effects!

2 Likes

Thank you everybody for the help with this one. It was a challenge for sure but a fun one and a great learning experience. Thank you @codeswept for really helping to push me over the finish line on this one, and thank you to everybody else as well! The community on here is so helpful and inclusive. To someone like myself who isn’t a professional coder it’s intimidating asking for help, but all of your kindness and help has not only helped me, but it will also allow me to help my students better, so it’s a great thing. I hope everybody has a great week!

Take care,

2 Likes

That’s awesome! If you get a chance to share the finished product – or better yet, one of your students’ projects – I know we’d love to see it.

Yes, it’s a great community we have here and as a fellow teacher, I’m glad you found it.

1 Like

Thanks for your help as well @tatiang. Your suggestions got this all started! I’m currently working on just adding bits to make it more challenging based on various parameters. I’ve already got it saving high scores to a stored variable, I’m just playing with pattern speed based on current scores and messing with the UI a bit. I’ve had students do some pretty fun stuff for 7th/8th graders from space invader and mission/Zelda type games to rock paper scissors and daily journal apps amongst others. A couple of cool educational games too, although the vast majority prefer the typical type of games, which is understandable. The sky is the limit for the kids, and I sometimes think they’re WAY more creative than I am in terms of ideas. lol

1 Like

I’m working with 7th & 8th graders, too. We only have 45 minutes twice a week for about 7 weeks so it doesn’t end up being all that much time but they have some creative ideas for apps. One kid last year made a translator app that would translate from a Disney fantasy language to English. And because there was no API available, she figured out the translations from various online resources and added them to the app. She even drew each character by hand to make in-app flashcards and added a quiz feature.

This trimester seems to be all about trivia games which I’m not thrilled about but at least they are figuring out how to use Thunkable in useful ways. I have to remember that their knowledge of Thunkable isn’t anywhere close to mine so what they can accomplish in 10-15 hours is going to be much different than what I might make. My favorite student project this time around is a character profile generator. The idea is that if you are writing a story, you can have the app randomly generate a name, description, and personality for your character(s). Pretty useful!

Would love to see you share your final version in a new thread sometime!

I hear you! We work on quarters, so I get the students for about an hour for 45 days each quarter. The thing is we don’t just do Thunkable so it gets TIGHT. Between web design, digital citizenship, blogging, animation, etc…time gets short, especially this time of year. I’ve been working with Thunkable for 6 years now, back when Thunkable Classic existed and the X platform was very sparse. I’m certified in PLTW App Creators for MIT App Inventor but my district wants to stick with iOS so I teach Thunkable, which I’m fine with. There are advantages to both platforms though. It’s all brand new to my kids, it always is for some reason. I feel like nobody out my way teaches using AI or Thunkable. Although I’m not a huge fan of their drag and drop interface.

Those apps sound great! I’ve had some students create story generator type apps as well, but I love the idea of creating a character profile. You said it was random? Too bad they couldn’t build it in such a way that it built a character based on user inputs, in other words, character or personality traits the user chose in some sort setup process (maybe they did and I misunderstood). Yeah my students like quiz apps too, and like you, I’m not fond of them. Some are done well, especially when they use databases and keep it to one screen, but others just go nuts and create an app with dozens of screens and just use basic event handlers to change screens based on answers selected. For some students that’s where they’re at though and it’s better than nothing. Just to see students who would otherwise hate this type of thing, actually enjoy it and react outwardly in a positive way when something they’ve been trying to sort out actually works, makes my day. Some of the games they make are fun to play, and when you have to grade hundreds of them, that’s a huge plus. lol. I love when students create their own art for their apps, it takes a lot of extra time, but they’re invested and it shows in the end. Anyway, I’m going off on a tangent now. haha

1 Like

I will once I’ve polished it off. @codeswept was big in helping me figure out the auto sequencing and checking for player accuracy, so I can’t take 100% of the credit. I’d like to say it was a group effort between myself, @tatiang and @codeswept. Once the base of the game was right, I added the sound, a stored variable to keep track of high scores, added a splash screen and adjusted the UI a bit (which I’m still doing). I’m also currently playing with certain conditionals to adjust the speed to make gameplay more difficult. I also have a few other ideas that I’m thinking of incorporating into it to make it more robust.

4 Likes

Yes, random. I’m with you there… I’d like to see her use some strategizing for how profiles get created but she went from no interest in anything in my class to really motivated and interested in making this character generator so I’m thrilled at what she’s made so far.

I pretty much force my students to use a single screen when they can. I already have students trying to build screens for each trivia question and I’m pushing back against that but it takes educating them about dynamic coding. Well worth it but it’s more effort up front than they sometimes like (much less effort long-term of course).

2 Likes