A while ago I had created a ‘Fun with Flags’ interaction that used question banks for a geography quiz. For this week’s eLearning challenge#121 I thought I extend this interaction with a memory game. For this experiment I wanted to reuse the flag assets, but add two twists:
- Randomly show three sets of flags, and
- Randomize the position of each of the six flags
To meet the first requirement, I created image objects with custom states.
To randomize the position of each of the objects, I added six motion path animations, one for each possible position.
The interaction was done all in one slide, with a ton of triggers, no layers. To complete the randomization, I used a simple Javascript to create two random numbers which are then used in trigger to a.) trigger motion path animations to position the objects and b.) select the custom states. Yet more triggers are needed to figure out which object is positioned where, and if the last two clicked objects belong to the same set. With this setup I can generate hundreds of variations of flags in various positions. For my experiment, I only set up a grid of 3 sets of two flags each. Real-world memory games often have grids with a lot more object. I only wanted to work out the general concept and the basic randomization logic. Here is a first version of the memory game. From the main screen, select the red Begin button (lower left corner). As always, I stopped my experiment at ‘good enough’ and didn’t spend a whole lot of time on fine tuning, graphic design and troubleshooting. So, go ahead and shuffle the flags untill your arm falls off!