Can't run multiple instances of a memory game

Hi, I have a version of the memory game working perfectly but cannot figure out how to add additional versions. I’m trying to have an experience that has 3 games with 3 different levels of difficulty (number of cards and content of the cards being the variables) and presumed I would use 3 versions of the interface asset but this isn’t working. Any help much appreciated!

Hi Oli,

The way Memory Game Interface Asset is coded doesn’t allow to do what you need in a simple way.
If you just copy/paste the scenes/elements, they will all be referring to the same Interface Asset (i-e code and images to compare).

However, it may be possible to twist it for a workaround.

I’m sharing a zip file with you, you have to unzip it in your folder:
C:\Users\USERNAME\Documents\IntuiFace\Interface Assets

You should end up with 3 new folders: MemoryGame1, MemoryGame2 and MemoryGame3.

Now if you start your Composer, and Add an Interface Asset, the list will look like this:


and you will be able to add these 3 new IAs in your Experience.

They will be copied in your Experience Folder after saving:
C:\Users\USERNAME\Documents\IntuiFace\EXPERIENCENAME\Files\InterfaceAssets\

Now you should be able to change the images in each subfolder for your 3 games and you will have to rebuild/rewire each scene to each MemoryGameX

Here is the zip: MemoryGames.zip (134.1 KB)

Regards,

Alex.

1 Like

Many thanks for this Alex, the support at Intuiface never ceases to amaze me!

Only thing is that I built the original memory game by downloading the demo example and then editing that as desired and copying-pasting into my experience so I’m not entirely sure how to add a game from the IA?! When I drag it in or right click>insert it creates a collection grid much like if I’d added an excel IA. Apologies if I’m missing something obvious but any help much appreciated!!!

Hi Omit,

Here is the process to implement more Memory games.

First, duplicate your Memory Game Scene

then, add a new Memory Game from Interface Assets (in my case, Memory Game 2)

change the Data Source of your Card Collection so it uses the new Memory Game Asset (still the #2 in my case)

change the target of the button so it uses the new Memory game Asset (#2 again)

Now your new scene will fully use the new Memory Game Asset, don’t forget to change the images in the folder:
C:\Users\USERNAME\Documents\IntuiFace\EXPERIENCENAME\Files\InterfaceAssets\MemoryGame #\Images
(# is the number of the memory game)

You may have to tweak the attempts and timer by duplicating them too.

I also recommend you to check our Step-by-Step tutorial and the Memory Game dedicated Article to learn more.

Regards,

Alex.

4 Likes

Hi Alex, many thanks, as ever, this is super clear and helpful feedback and I now have 3 games working in the same scene, I now have a new problem though!

The experience is for a large screen multi user UI in which there are 4 separate ‘zones’, each with the same content. However when I duplicate a zone (which contains the 3 memory games), the games are linked (ie tapping on Game 1 in one zone also turns the cards in Game 1 in the other). Is there a simple way to decouple them or will I need 12 memory game IAs? If so can I just create another 9 (much like you did for 3) and put them in the Interface Assets Experience folder as before and update the Memory Game.ifd file with Memory Game4, Memory Game5 and so on?

Thanks again for all your help with this!

Hi Oli,

You may have not followed exactly the steps I’ve put in my previous message, especially on the button part. If you do, you should be able to have 2 independent Memory Games on the same scene. Like this


Here I clicked the 1rst top row of game #1 on left side and then, the 3rd on 2nd row of Game #2, on right side.

But the most important is that you really need to understand what you’re doing and have a good grasp over the basics, triggers, actions and other standard features because what you’re trying to achieve is a little bit elaborate.

Another solution would also be to pick one of our partners to do it for you or open a topic for a new opportunity here on our forums.

Regards,

Alex.