Multiple Datasets to GCompris Memory Game Activities

Written on August 22, 2020 - Tech - Post a comment below

In the past blogs, I wrote about the status of my GSoC work. In this blog I would like to update about one of my major project milestones I have achieved.

So, Let’s dive in :)

Brief about the memory game activities

The memory game activities make the child practice different arithmetic operations, counting, recognizing different animal images and audios. There are a total of 20 memory activities with different goals and fun learning experiences for the child.

My proposed work

I have proposed to add multiple datasets to about 15 memory activities. The memory activities to which I proposed to add multiple datasets are the following:

  1. Enumeration memory game
  2. Addition memory game (Tux and without Tux)
  3. Subtraction memory game (Tux and without Tux)
  4. Multiplication memory game (Tux and without Tux)
  5. Division memory game (Tux and without Tux)
  6. Addition and subtraction memory game (Tux and without Tux)
  7. Multiplication and division memory game (Tux and without Tux)
  8. All operations memory game (Tux and without Tux)

The detailed task descriptions can be found here: Link to Task Description!

Implementation Details

  • Memory game activities codebase structure

    All the memory activities share the code from the parent memory activity. There were no multiple datasets in any of the memory activities as they were having the default JavaScript dataset.js file. To know more about the multiple datasets you can have a look at one of my previous blog here: Link to previous Blog!

  • Implementation procedure:

    Out of 20 memory activities the multiple datasets only needed to be added to 15 memory activities because the datasets used for the rest 5 memory activities are suited for all age groups. I needed to make sure that the mechanism could support both multiple datasets and the default datasets.

    To add multiple datasets to memory activities following work needed to be done:

  • Removing the currently implemented datasets which is implemented using dataset.js file for each of the memory activities.
  • Creating a resource directory and further creating a subdirectory for different level selections for the different age groups. For example, if I need to add multiple datasets for two different age groups say 3-5 years and 5-8 years; I will create a different subdirectory for age group 3-5 years and another for 5-8 years old.
  • Keep the code logic modular for other activities inheriting memory that do not have multiple datasets.

Current status of my work

Multiple datasets have been added to all of the memory activities as mentioned in my task.

Multiple dataset Dialog Images

multiplication-memory-games

Regressions during the implementation?

A regression occurred during the implementation as one affected the memory activities with no multiple datasets. The regression was that a blank activity config was displayed for activities with no multiple datasets. To fix this regression I used a boolean to check whether there are multiple datasets or not. Further, I used this boolean variable to display the activity config only when it’s true. In this way I fixed this regression and further tested it to make sure it works perfectly.

Also I mentioned above that few activities have two different modes, one “with Tux” and other “without Tux”. So, after implementing multiple datasets to mode “with Tux” it broke the other mode. This regression was due to the fact that the mode “with Tux” used the same dataset file as in “without Tux ”, removing the dataset file broke the other activity. To fix this regression I started adding multiple datasets to both modes at once before moving to add multiple datasets to other memory activities.

After implementing multiple datasets there was also a regression that in case of just two pairs the level doesn’t get loaded. To fix this regression I updated the condition which checks that the resources of images, sounds, texts are enough to load a particular level or not.

Testing process

I have manually tested the multiple datasets of all memory activities. I also got it tested from my younger sister.

This was my coding experience while working with multiple datasets for the memory activities.
Cheers to awesome mentors and the KDE community :)

Thanks!
Deepak Kumar