Monday, July 2, 2012

[GSoC] KBounce Has Been Ported to QGraphicsView

I am considerably late regarding writing a blog post about my progress in this year's GSoC. I was terribly busy working on the project and solving some pending stuff from university. But now, for my relief, the summer came and therefore I have some free time to dedicate to this newly created blog. :-)

My proposal has as its title "Porting Games to a More Modern Graphics Framework" and was designed taking in consideration this topic provided in the KDE's ideas page. Basically, my project consists of changing the graphics stack and the rendering system of six games, porting them from the old KGameCanvas libraries to the most recent stable version of the Graphics View Framework (namely QGraphicsView) and KGameRenderer.

You can found a more detailed description of my proposal here.

It's been more than a month since KBounce was finished but, as explained above, just now I have the necessary time to write something.

KBounce is a game simple to play and understand but extremely hard to master. I was extremely surprised, after reading this interesting article, to know that there is a registered world record for the game and that such record is something unthinkable from the point of view of a casual player. See the picture:


Naturally, I've found some difficulties in this first contact with the frameworks I'm working with. It was hard to understand all the concepts related to the different coordinate systems a game can have, to deal with the translations from one coordinate system to another, and to understand the custom tile-based coordinate system most KDE games have.

Also, it was a bit hard to deal with old and not commented code. Don't get me wrong, I'm not saying that the whole game does not have a single comment. I'm just saying that games, generally, are complex programs and comments explaining some of the arcane equations they use are very welcome. :-)

Visually, there's nothing much different to present, since my modifications are only internal. But, as I am a fan of screenshots, here goes the new QGraphicsView KBounce:



P.S.: As you have probably noticed, I am not an English native speaker and you will find some grammatical errors spread over the text. In this case I'd love to apply your corrections pointed in the comments.

PPS: The next game, KNavalBattle, is almost finished. I'm just waiting my mentor's final evaluation. See you In a few days. :-)