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

Akademy Day5, my Day4 – Devices, Specs and Pics

Today was a rather productive day as I sat with Leinir and Arjen, hacking on Gluon (while Sacha was trying to get his Qt Creator to work with his N900) and as a result, the comments model is now editable 🙂

As mentioned in my previous blog post, the Gluon Team has received a Nokia N97 mini for testing Gluon Player o S60 platform. Though we currently are focusing more on Maemo/MeeGo devices, we'll be very excited to bring the social gaming experience to Symbian.

[flickr-photo:id=4771565105,size=m]

We had a very exciting and comprehensive meeting on the Open Collaboration Services Specifications/API update. We added few new modules/properties to support the needs which are currently arising.

[flickr-photo:id=4772207310,size=m] [flickr-photo:id=4771567203,size=m]

In the evening, had to skip dinner as everyone else went to had, and I couldn't locate them :-/ Did some photography outdoor and came back to do the laundry and hack some more on Gluon.

[flickr-photo:id=4772204786,size=m]

Oh, and Ryan, Chani and others had some Karaoke stuff too! 🙂

Gluon Team gets a N97 Mini from NOKIA

Today Knut Yrvin walks up to us and says “Hey you guys need a Symbian device to test out your Gluon Player stuff?”, takes out a big bag (the ones you generally use in mountain trekking) after digging deep he takes out that shiny box with the sweet little Nokia N97 Mini “Here you go!”.

[flickr-photo:id=4771563531,size=m]

I must say, he did surprise us, Lets rock Gluon 🙂

Akademy Day4, my Day3 – Excitements

Akademy is getting better day by day, and I still can't believe it when I see awesome people around me 🙂

Today I was able to meet Ade and Sebas (who gave me a very tight hug) and talk with them a bit while Pradeepto was busy gifting Darjeeling Tea to lots of people. The chocoloates Thomas Thym had got were just awesome and I had to keep my eyes off them so that I didn't finish all of them 😛 But anyway, there was always free coffee 🙂

[flickr-photo:id=4768832624,size=m]

I scheduled the Qt certification test for 3 PM and tried to study a bit, but I kind of couldn't concentrate as Qt is just too boring if not practically used. The exam was good, and the questions were average, and I passed 🙂 So I'm now a Nokia Certified Qt Developer, yay!

Then I took some random photos and sat for Gluon work, trying to tame GDL stuff, while leinir was listening to music and Arjen trying happily X'ing into his home machine 🙂

[flickr-photo:id=4768189319,size=m]

As the WLAN at the venue was getting quite unstable, I came back to the hostel to work and did some stuff.

[flickr-photo:id=4768836784,size=m]

Akademy rocks!!

Akademy Day3, my Day2 is Glued with Plasma !!

Had a wonderful sleep last night, despite the fact that it never gets “night” here as there's always some amount of light you see in the sky.

The fun started today, starting with the Nokia Mobility talk, where it was made obvious that Nokia still doesn't support developing apps for a Symbian device, using GNU/Linux, the SDK for Symbian *needs* a Windows environment, as they said. Though thats really not a good thing, but the free snacks was 😉

Done with that I find a room filled with the Plasma people, Artur, Marco, Aaron, Chani, Alessandro, David etc, who I really really wanted to meet off IRC, but was reluctant at first, thanks to the room being stuffed with people (yes, I'm fat 😉 ). Then I walk in, announce my name as if I'm the president of the country, and sit down (too bad people didn't realize I arrived just yesterday, and this is how I gotta go and introduce myself)

The important stuff is, that my doubts over activites were cleared, and actually there's only one statement that clears it out – “An activity is just as per the word means in the English language”, and thats it, the most proper, and concise definiton of activities. Chani showed us that we can actually attach windows to Activities using the Title bar context menu, which was rather cool 🙂

And one of the most productive thing today was DrIDK explaining about how we could possibly add network play support to Gluon, when we've got the engine working properly. The new thing to learn was delta compression, which is nothing but a fancy name for taking differences between two sets of data (comparable to the way MPEG encodes video). The discussion was fruitful, though we decided to first make Gluon usable for single play.

[flickr-photo:id=4764704507,size=m]

We also met Frederik Gladhorn for the Open Collaboration Services API we will be using in Gluon and we've decided to talk more on Wednesday at the OCS BoF, alongwith Frank. (And, I even told him how impatiently my sister is waiting for Fluffy!)

Rest of the day was designing how we could sync the game data between the OCS service and the Qt models we have, for which we needed a shared data location. But, as the Gluon Player is expected to be independent of KDE libraries, we have to still find a way to portably determine the proper data directory, apparently for which Qt doesn't have a easy solution (if it does, please do comment on this article and help us).

While looking for the code for KStandardDirs, It was so nice to come accross Sirtaj's name in the copyright header, its like he's one of the guys I could never meet, and someone whose work on KDE makes me respect him a lot.

Movin on, for the nom nom part, we had an amazing Pizza at a local restaurant. I think Pizza Hut and other stuff just don't compare to this one, considering the size, or the taste. It was just awesome, thanks Martin Sandsmark for the idea.

Last but not the least, we found pradeepto with a yellow shirt having some orange juice (somehow orange juice is yellow here, dunno why) just near the hostel. There I met this charming lady, Claudia Rauch who took so much pain to make sure everybody makes it to Akademy effortlessly; Thanks, thanks a lot 🙂

I still can't believe I actually met everyone! Its just been a dream for so long. I love KDE, we are KDE 🙂

Looking forward to another awesome day, Be Free!

Akademy Day2, my Day1

After finishing up my university exams, I somehow arrived at Tampere today evening. It was a tiring trip, special thanks to the back pain, but the real pain was missing all the stuff that happened in these two days, but it seems I had no choice whatsoever.

The good thing is, I met everyone in person, and frankly it was a dream come true and of course a refreshing experience.

Met with Leinir, Sacha and Arjen and I really got sad that they actually missed me during the Gluon presentation, which I couldn't make it in time.

Later, cooking food with Nikhil and Prakash experimenting with rice in “not_made_for_rice” containers, was quite fun. I enjoyed the food, followed by laundry equipment experiments with Nikhil's clothes.

It was nice meeing Martin Sandsmark, with whom I and Vishesh talked a lot about computer languages etc followed by an Invaders game 😉

Another good thing was that I came to meet Frederik Gladhorn, the guy who's been helping us a lot alongwith Frank for Open Collaboration Services integration with Gluon.

I hope that with tomorrow morning, I'll start doing stuff and talk to many more contributors, and hope the evening meeting with Frederik will be very constructive.

I'm at Akademy, yay! Love KDE, love the people !

(though I didn't make it to the group photo on time, can someone take Krita and put my photo there? 😉 )

Overview of steps to build KDE from trunk using single user approach

After some of my friends asked me how, I wrote this article which lists out the steps I took to switch from the additional kde-devel user approach to the single user approach while building KDE SC from trunk. It might be helpful for newbies who have followed the instructions on techbase and got a working KDE SC trunk with the separate kde-devel approach.

(Its being assumed that the single existing user is called “userabc” from this point onwards, and that the reader has read or has already built KDE SC as per instructions here)

The first step to do would be to copy the existing userabc's .bashrc to a new file, which I call develrc (you can call it anything you want) then appending it with the example .bashrc from here or if you've already built KDE SC with the kde-devel user, just copy the kde-devel .bashrc as userabc's develrc .

Now, to switch to the development environment, just source the develrc (when running the userabc's terminal run 'source develrc') and it will set the paths accordingly. Now, move the kde/src files from the kde-devel user to userabc. Next, change the owner of the source to userabc, like this-

chown -R userabc kde/

chgrp -R userabc kde/

Following the usual procedure, we compile Qt4, kdesupport, kdelibs, kdepimlibs, kdebase, kdeplasma-addons (optional) and if everything goes as planned, the build will be ready. At this point, one should be able to run the apps from trunk by source'ing the develrc and running the command (e.g. dolphin).

The next step is to create a new startkde script so that we can start the trunk/build KDE SC. For this copy the develrc into a new file (I'll call it startkde4) and append the following line at the end [1]

exec startkde

and the following line at the top-

#!/bin/bash

The last step is to make it possible to have two entries in KDM so that we can choose at login between the stable and the trunk/build version. For this, we make a new copy of /usr/share/xsessions/kde.desktop as /usr/share/xsessions/kde4.desktop and then change its contents to look like this-

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/home/userabc/startkde4
TryExec=/home/userabc/startkde4
Name=KDE-TRUNK

If there were no problems in any of the above steps, there should be an option KDE-TRUNK in KDM's sessions menu. Enjoy!

If you find any errors, or have a suggestion, please feel free to post a comment. Thanks !

[1] It should be possible to make a startkde4 script which sources develrc and then exec startkde. Somehow this doesn't seem to work with bash (David Faure's original startkde4 script uses zsh, which might work).

Getting the NVIDIA driver on K Ubuntu 10.04 Lucid Lynx

I recently installed Kubuntu 10.04 LTS and loved the fast boot time, but there was this NVIDIA proprietary driver not working properly. I was not able to use all possible resolutions and the picture was buggy. After some time Googling, I just tried to launch the NVIDIA settings which suggested to run nvidia-xconfig to update the X configuration. I did it and it worked perfectly!

Hope this helps smiley

Gluon Player Plasmoid, Yay! It works

Right from the time I found about the Gluon project (which I found on the GSoC ideas page), I've been very excited and having loads of fun with the Gluon team (as usual 🙂

I'm happy to announce that the Plasmoid has taken its first step, displaying a Gluon example game on an OpenGL rendered Plasma applet. The applet is a Plasma::GLApplet which uses the Gluon Framework to create game graphics and output game audio alongwith support for input.

Here's a screenshot (yes, the transparency is a bug)-

[flickr-photo:id=4565854077,size=-]

The Plasmoid is able to display the game content pretty well (thanks to Zack Rusin for the awesome GLApplet work), but you might have to try the following workarounds currently-

  • The Plasmoid has to be resized down to display the graphics, i.e. after resizing to a desired size, just make it a bit smaller and it'll work
  • If the game isn't receiving your input, try restarting plasma-desktop and It will work

People have complained about the Plasmoid reporting “Your system does not support OpenGL widgets”. We're trying to figure out the problem, but mostly people with latest trunk should be able to use the Plasmoid.

To try it out, grab the source from http://gitorious.org/gluon/gluon and build it. After successful build and installation, the Plasmoid should be listed in the Add Widgets… list.

Thanks a lot to ahimestra and leinir for their constant support and motivation (and for making the Invaders the example, which in turn is the first video game I had played (remember Galaxian on those early game consoles?)

That said, more stuff coming soon, stay glued 😉

Added simple Type-and-Select feature to Folderview applet

With the type and select feature implemented in the Folder View Plasma applet, I hope that we finally resolve bug 187241 completely. This makes the applet even more usable than before.

This fix was different in a way that I had my first ever usability discussion with the KDE Usability team over the type and select behavior differing from Dolphin (and in general with anything derived from QAbstractItemView). Finally we concluded that the behavior be modified to match Dolphin's, and thats what the current state is.

The fix will ship with KDE SC 4.5

Reviewboard link http://reviewboard.kde.org/r/2659/

Bug Report https://bugs.kde.org/show_bug.cgi?id=187241