Galina Ra

unread,
Apr 27, 2016, 9:33:23 AM4/27/16
to MIT App Inventor Forum
I am trying to make a card game for my son. It will take letters and flip them when clicked. If successful, the cards will be removed, otherwise they will flip back. I also want it to say the actual letter (call the mp3) when it's successful. I have uploaded the images and programmed a canvas with imagesprites (only 6 but I plan to have more). I have found some great information on the web, but I'm really lost on how to get the imagesprites to be from a list of the images uploaded, as well as how they're removed when it's a match. I cannot find a memory game that is similar to this to see how that has been done. I'm also going to try to modify the asteroids game and add a bingo game to this, as well.

Attached is what I have, which I don't think is much.

Thanks for your help, ahead of time!
HL.jpg
HL2.jpg

Abraham Getzler

unread,
Apr 27, 2016, 2:34:09 PM4/27/16
to MIT App Inventor Forum
Here's  a completed Concentration game from the Classic Gallery:

Download the .aia source and import it as a new project.

It works.

ABG

Galina Ra

unread,
Apr 27, 2016, 3:18:17 PM4/27/16
to MIT App Inventor Forum
I appreciate the reply. However, this is what happens when I import it. I've never seen anything like this....is this correct? I can't test it right now because I'm at work.
Valentines.jpg

Taifun

unread,
Apr 27, 2016, 3:49:38 PM4/27/16
to MIT App Inventor Forum
these are collapsed blocks
select a block, then right mouse click and select expand to expand one of the blocks
Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Galina Ra

unread,
Apr 27, 2016, 4:04:27 PM4/27/16
to MIT App Inventor Forum
Ah, now I see it! However, my only issue is that I will have the entire alphabet to choose from in the list and I need to have it select randomly (within a 6 or 9 card set at a time). This program assigns the image to the sprite. How can I get it to select it from a list, but use only one list at random? Would I need multiple lists, or put them all in one?

Abraham Getzler

unread,
Apr 27, 2016, 11:03:13 PM4/27/16
to MIT App Inventor Forum
I took some time to read the blocks in the Valentine Match app.

There is a lot of duplication in the Sprite Touched events, which can be reduced using procedures and parameters.

You will need an extra list holding ALL your images, a list mapping images into sounds, and
code to load a working list mapping sprites to their intended images.

See this FAQ for a section on how to work with lists ...

ABG

Abraham Getzler

unread,
Apr 28, 2016, 1:14:42 PM4/28/16
to MIT App Inventor Forum
I cleaned up the redundancy in the Valentine Match Game, to make it easier to adapt for your needs.
You will have to think about how to introduce new letters to the match board, probably as rewards for completing rounds.

See attached.
ABG

Valentine_Match_Game_V2.aia

Galina Ra

unread,
May 1, 2016, 7:08:37 PM5/1/16
to MIT App Inventor Forum
Thank you so much! I haven't been able to get back to this until now. I was looking over your code and it is quite a learning experience :)

You did a list all pictures procedure. My thought, to have it do random order, is to have several lists from a csv row and then calling the random lists? I didn't realize such a small program would require so much code! Wow...

Abraham Getzler

unread,
May 1, 2016, 8:23:58 PM5/1/16
to MIT App Inventor Forum
There's not that much more needed.
See attached.
That will let you expand your picture list indefinitely, but give you 6 pictures at the start of the game.
You may need to move (copy) that random selection call to the New Game button section too.
Don't worry about duplication of images during the selection.
The game will still work, and the player can regard it as a lucky bonus.
ABG

Valentine_Match_Game_V2.aia
Screen1_Initialize.png
Reply all
Reply to author
Forward
0 new messages