Skip to content

GSoC’21 Week 5 and 6: Programming Maze

Saturday, 17 July 2021 | Mariam Fahmy


Hi everyone, this is my 3rd blog post talking about my work during Google Summer of Code 2021.

Programming Maze Activity

This activity teaches to program Tux to find the fish using simple instructions like move forward, turn left or turn right, it has been created by Aman Kumar Gupta.

It consists of ten levels in which:

  • The first 5 levels is about having a Main Function where the instructions will be executed in order until there is no instructions left, or until Tux reaches a dead end or when the tux reaches the fish.
Programming Maze (Main Function)
  • The last 5 levels is about having Procedure area which stores a set of instructions which can be used in the Main Function.
Programming Maze (Procedure)

Supporting Loops in Programming Maze

Last two weeks, I was working on extending programming maze activity to support loops as well as procedures, I have added a loop area same as it is done with the procedure area.

The loop area stores a set of instructions which can be executed several times by setting a loop number for it.

This is done by:

  • Implementing a new instruction called Loops, it contains a ListModel in which instructions are stored in, and it has a loopCounter as a property which indicates how many this set of instructions will be executed.
  • Adding a loop counter initialized by 1, which can be decremented or incremented to reduce the number of instructions needed by Tux to reach its goal.
  • Adding an option to use or not use Procedures
  • Adding datasets for the maze displayed when using the loop area.
  • Modifying TutorialBase.qml to support loop tutorial instructions.
Programming Maze (Loops)

What’s next ?

Supporting loops in programming maze is about to be finished, I am waiting for mentors’ reviews and their new suggestions and ideas which make the activity more powerful, also it is suggested to use enum for the instructions used in the activity, there are 2 methods for implementing enum values and they are currently being discussed to select the best solution.

I would like to thank the GCompris community for providing me this amazing opportunity. Open Source contributions at GCompris helped me a lot in enhancing my coding skills and soft skills as well.

Special thanks to my mentors. It was a great learning experience for me to work with them during phase one.

Looking forward for an exciting phase two!

Thanks for reading.