The Gluon story so far

Beginning of The Plasmoid –

It all started with a GL Applet, one with the ability to provide a OpenGL context in a Plasma applet, put to use. Thanks to Arjen who made some improvments to make it more compatible with some configurations.

The plasmoid then wasn't much fancy, but you could play Invaders on it. I had posted on it here.

Doing the job, libGluonPlayer –

This came as a surprise to me, because till now I was under the impression that I have to just design a well functioning and good looking plasmoid look-alike of an existing Gluon Player application. Actually, the player was in a very initial stage and I couldn't just port it to Plasma, I was supposed to write the library.

I'm still thankful to the fact that this was the case, because I learnt a lot in the process. I had only fixed bugs till now, and loaded a kpart in Plasmate, but when I was writing the library, I got a strong hold over one of the foundations of Qt – the Model/View architecture.

Designing the models –

It wasn't as glamorous as the title seems to be wink, but it was indeed very interesting and challenging. I wrote the following models for the library-

  • HighScores – Keeps track of the players' high scores so far, and other information.
  • Comments – Keeps track of the comments on a particular game. This was a tree model, and the most challenging to implement.
  • Games – As the name suggests, this model loads the available games locally. The remote fetching feature will be implemented soon when the server is ready to serve the games.

Writing all of these models was fun, and the joy of the work was even more when I could see how easily it can be used in both the Plasmoid, and the Qt based player. This tells us that we indeed reached our goal of providing a base library for a more specific implementation.

Viewing the models –

No, I wasn't at Milan wink, it was the views which I wrote for displaying the game information. Though Qt provides convenience views for all types of models, I thought it would be better to write Plasma specific views. After all, thats the whole idea behind the Model/View architecture, that the views can be specific.

[flickr-photo:id=4885585239,size=m] [flickr-photo:id=4886188534,size=m] [flickr-photo:id=4885584117,size=m]

Using lots of layouts, and the beautiful Plasma themed widgets, I designed the views, which contained still smaller QGraphicsWidgets which served as items in the views. The whole design worked out very well, layouts are really a much better idea that positioning the graphics items entirely through code.

Using Plasma guns –

Plasma is a really nice platform for effective GUI, the themed widgets such as the tab widget are simple, yet effective solutions to page content. Other cool things include the dynamic size adjusting Plasma ItemBackground, and the mobile flick-friendly Plasma scroll area.

Techbase contribution –

I had earlier made few corrections to some techbase articles, but I am really happy on revising and updating an Attica example at http://techbase.kde.org/Development/Tutorials/Collaboration/Attica/Introduction

Using the GDL –

When writing the tree model for comments, I used a hierarchy of GluonObjects because the Gluon core libraries have a feature by which one can export the entire GluonObject tree to GDL (Gluon Definition Language) and similarly import the tree from an existing GDL. This made saving and loading comments consistent with the rest of Gluon. Below is a sample of GDL-

{ GluonCore::GluonObject(HighScores)
    { GluonCore::GluonObject(Shantanu)
        HighScore int(2000)
        Level int(10)
    }
    { GluonCore::GluonObject(Arjen)
        HighScore int(1000)
        Level int(1)
    }
    { GluonCore::GluonObject(Leinir)
        HighScore int(500)
        Level int(2)
    }
}

Translation frendliness –

I was very happy to find that people have already started trying out Gluon and giving feedback. Thanks to Johannes Obermayr, I realized that I forgot to i18n the plasmoid's strings.

The Social part-

This is the most important and rewarding part of the library, where the application meets the web. We use the Open Collaboration Services to collaborate between many content servers and the Gluon Player. The KDE library used to access OCS services is called libAttica and was very helpful in the process.

The Gluon Player Library is now able to update comments from the test server (currently at test.gamingfreedom.org) and keeps a local copy so that the user doesn't necessarily need to be online.

Gluon Player Comments

Right now, Attica uses the credentials from its KCM in the KDE System Settings dialog. However, as the library is going to be used on other platforms too, I plan to provide a separate credentials support in the player library.

Finally

This year has been very very nice, from getting selected in Google Summer of Code, to realizing my dream of meeting other fellow KDE developers at Akademy, all has been just awesome.

Ok, lets get back to work so that we can make a player to play! Invaders Lasers – Pew Pew smiley

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s