Guest blog by Holger Kaelberer (GCompris):
This year I will participate at the Randa Meetings for the second time. The last year was a great experience and I am really grateful that there was this opportunity to get in touch with the KDE community as a new developer of the recently incubated QtQuick port of the GCompris project.
As Randa is mostly financed by donations, it is obvious that this opens the door for students and hackers, that don’t have the financial means to join such an event. Working full time I can afford to pay my travel costs myself and personally I see the benefit of code sprint events first of all in the time, they give you for your project. Before talking a bit about what I plan to work on this year at Randa let me say some words on the importance that such code sprinting events have to open source hobbyist like me.
The Neglected Feature Branches
As probably many people involved in open source software development I work full time as a software developer and hack on open source software in my free time, because I dreamed the dream of making my hobby and my passion my job.
But — ay, there’s the rub!
When you come home after 8, 9, 10 hours of concentrated work on source code, maybe project controlled and sometimes under time pressure you can imagine that there is not much passion left for more hours doing the same activity. Of course, there are the weekends, that leave you more time for your own projects, unless you spend them with your friends or your family and your children, that you don’t see a lot during the week. So, this dream sometimes turns into frustration about not having enough time for what you really want to do. The concrete victims of the lack of time for your hobby are a bunch of uncompleted feature branches that have been started driven by a great idea, but slowly forgotten in the highs and lows of everyday life.
Now you can imagine that a whole week of time available exclusively for these feature branches brings a big smile to my face 🙂
Now to the concrete feature branches I plan to work on this year in Randa:
Balancebox and Box2D in GCompris
The first one, balancebox, is about a new activity in GCompris I started last winter, that introduces a 2D physics engine in GCompris. The idea of the activity itself is simple and should probably placed in the “Fun” section of GCompris. The user is supposed to navigate a ball through a labyrinth of walls populated with holes and numbered buttons to a door by tilting his device. The numbered buttons have to be hit in the correct order to unlock the door. This obviously mainly targets mobile devices that provide sensoric information about device rotation (on desktop platforms tilting is simulated by using keypresses) and addresses fine motor skills as well as basic numeric counting capacities of the child.
After having experimented a bit with self written code for collision detection needed for collision dynamics between walls and the navigated ball, which becomes more difficult with complex, non-rectangular objects, I evaluated different libraries doing this work for me. I ended up with the QML bindings of the well known 2D physics engine Box2D by Erin Catto. As all activities in GCompris are developed only in QML and Javascript, those QML bindings integrate perfectly well with only a few wrapper elements. A bit of work had to be done to scale down the optimal dimensions of Box2D world objects (which are tuned to real world dimensions of 0.1 to 10 meters) to the smaller dimensions of my balancebox by calculating an appropriate scale-factor. But once done, the engine does a good job.
Once integrated, a 2D physics engine opens the door for a variety of other activities that cope with real world physics. As a next step I plan to use Box2D also for porting the Land safe activity from the Gtk+ version, where the player has to land a rocket smoothly on planet surfaces with different gravitational forces.
I am looking forward to discuss the possibility to use Step (or more precisely stepcore), KDE’s physics simulator, as an alternative physics engine with other members of the KDE Edu team in Randa.
Desktop-to-Mobile Notifications in KDE Connect
Besides working on GCompris, I’d like to benefit from my week at Randa by coming a bit closer to the KDE Connect code-base, that is still pretty new to me. Since using KDE’s Plasma on the desktop I discovered KDE Connect as a really useful tool in everyday work and use is mainly for file-transfer and notification synchronization.
A feature I missed in everyday use so far was the synchronization of notifications in the other direction: from desktop to mobile. Thus you can get notified e.g. of incoming messages of your jabber/IRC client when away from keyboard or whatever event that is not available on the mobile side. First I hacked around that by implementing a small wrapper that proxied all Notify calls on my desktop’s DBus org.freedesktop.Notification interface using a kdeconnect ping-message to my mobile device.
This was the beginning of another pair of feature branches, that integrated this feature directly into kdeconnect-kde core and kdeconnect-android, resp. The code is mostly working already, although there are some issues with specific Android-versions. As KDE Connect is one of the major topics this year in Randa, there will be the right place for resolving these missing bits and discuss some more questions regarding configuration of the notifications module directly with the KDE Connect developers there.
The Randa Meetings will start next week, enough time for you to help making it happen by donating to the still running fundraiser campaign:
A big “Thank you!” to all donors and the organizer(s) of this event!