Being a Google Summer of Code student is one of my greatest achievements and until now, it has been up to my expectations. This is a “two week in the coding period” blog post and i hope you’ll find it interesting and detailed enough.
At the end, i added links to my GitHub’s GSoC branch and to an apk – an Android build (installer) of GCompris, containing my current work on Crane.
In this period Sagar helped me install an IRC bouncer, in order to receive all the messages in a chat room even though I am not online. This is a great tool that helped me to never miss a message that was addressed to me or important messages from the channel’s irc chat.
Because of school’s end i was very busy these last weeks. I had to both prepare for final tests, finish projects, solve some homework in order to enter the final exam session and work for my Google Summer of Code project. It was an intense period and hard to focus on both sides, but up until now, i managed to work it out pretty well.
Having already one activity finished and merged and another one 90% finished helped me in my early days of work. The first activity I decided to work on is Crane, a puzzle game which aims to develop children’s imagination and logic thinking. Crane was part of the previous GTK version and needed to be ported in the new Qt version. In this activity, there are two grids displayed, each one containing the same number of items differently arranged.
The one from right (or bottom in portrait view) represents the model, and the one from left (or top in portrait view) is the one the children “work” in. A building Crane is placed in the middle – it allows the children to move the items from the working grid by using the left, right, top and down arrows.
More details on Crane can be found here: http://gcompris.net/screenshots-en.html#crane
The old look of GTK’s version:
My new Qt version of Crane (looks pretty similar to the old one to me 🙂 )
The crane’s arm can be controlled with the command buttons displayed next to the crane’s body and switching from one item to another can be done by pressing on the desired item. When using a keyboard and a mouse, the player can press TAB or SPACE to switch to the next item and use the arrow keys on keyboard to actually move the items in any direction inside the grid.
Because on some Android phones with smaller displays the command box is too small and the player cannot properly press the moving arrows, I came up with an alternative. To improve the user experience, I added a Swipe effect: on a touchscreen device, in order to move the items, the player can use his fingers to swipe in any direction.
Video demo of Android version of GCompris’ Crane:
As you can see, the buttons are hard to press. As a side note, I still need to work on the swipe effect.
In the old version of GCompris, the dimensions of the window were locked, so there was only one mode: desktop mode. In the current Qt version, the window can be resized in any way the user wants. To address this issue, i had to adapt the activity to the new demands.
In my version of Crane, the graphics are dynamically linked and as a consequence, the layout will adapt to any screen size. See below two screenshots of both landscape and portrait mode on a Samsung Galaxy S6:
The levels are randomly generated in order to keep the game fresh and new. The difficulty changes though with each level. It starts with four items and it increases with every level that the user passes.
For the first levels, this version of Crane currently misses a grid on each board. This addition will make it easier for children to find the exact spot where the item has to be placed.
This is how Crane looks at the moment:
The desktop mode of Crane is now fully functional and can be found on my official branch at https://github.com/bdoin/GCompris-qt/tree/gsoc-crane
For Android users, the GCompris apk can be found on my google drive here: https://drive.google.com/file/d/0B2AJAeoABSR9QlNYS3dVcmdHcHc/view?usp=sharing
You are welcome to install and try both versions and I encourage you to give feedback on Crane and on any other activity you play.
In the future, on my TODO list are:
- improving the swipe effect
- replacing the item’s PNG images which look pixelated with clean svg ones
- add grid view for early levels
- work on final visual details and animations