Social event with the KDE e.V. 2011 sprint participants
Game List Page
Game Details Page
Space Invaders Menu
Space Invaders Game
Group photo
Symbio T-Shirt logo
Talk about Gaming Freedom (Gluon)
Gluon demo on the TV
Talking about KDE Mobile
FRUCT (organizer community) logo for the event
KAlgebra Mobile on N9
Having fun after the dinner! ;)
Gluon Space Invaders on N950
MeeGo Reconstructed
Plasma Active Device SpectrumFelix Rohrbach on Achievements in Gluon from Dan Leinir Turthra Jensen on Vimeo.
The First Gluon Particles from Dan Leinir Turthra Jensen on Vimeo.

Hi Planet KDE!
Yeah, I know I’m late, but here’s another Season of KDE student
My name is Felix Rohrbach and I am working on a statistics and achievements system for Gluon.
What are Statistics and Achievements?
The simplest form of a statistic is a score, which is created during a game, and at the end of the game, it will be compared with the highest score you ever got in this game, and saved, if it is higher. More complex ones are arrays, where every index is connected to a certain event, like visiting some place in a RPG or getting a coin in a platform game. Another option would be to have more than one score saved, or to get an average score of all the times you played.
An achievement is on top of a statistic. An achievement defines that you need at least an score of X in a certain statistic to get this achievement, or you need to get X indexes in the array, etc. Additionally an achievement can have other achievements as dependencies. If you don’t have achieved all the dependencies, you won’t see the achievement.
What I have already done
Simple score statistics and achievements are already done. To use them, you need to create a Statistic Asset and a Achievement Asset in the project dock. Now, you can right-click on them to create a new statistic and achievement. Then, you connect the achievement with the statistic (just click on the button next to the label "statistic"). To change the statistic, you need to add a Statistics Component to an object in the Scene dock. Again, you need to connect that component to the statistic. Then it should look like this:
Now, you open your script component of that object (or add a new one) and type things like
this.GameObject.StatisticsComponent.statistic.score = 20;
to change the current score. To save the score at the end, you need to call
this.GameObject.StatisticsComponent.statistic.commitScore();
Now, Gluon will save scores for every user that plays your game. To see your achievements, you need to copy your game to /usr/share/gluon/games/ and to open the KDE Ext Player of Gluon. Select your game in the list of the installed games, go to the achievement tab and you should see something like this:
Plans for the future
First, I will work on more complex statistics (like the array one) and achievements (dependencies). Then the visual presentation of achievements needs to be improved (icon, progress bar). Other Gluon player applications might also get achievement support.
The most exciting feature is in a more distant future though: support of Open Collaboration Services server (show and sync achievements)
But here, libattica and the server have to support this first, so I still need to wait some time before working on that.
Want to test?
You can find the code in the Gluon repository (git clone git://anongit.kde.org/gluon) in the branch "achievements". I would be happy about some constructive feedback or feature wishes, just leave a comment here or tell me on the #gluon irc channel about it (my nick is fxrh). Ah, and before I forget:

so you can speak with me there, too
(Quite some time since I last blogged, have been busy with life's "last exams" and a project work demonstration in which the examiner says I need to relax and enjoy more. Yeah, right
)
I will be spending this summer working on Gluon as a part of Google Summer of Code 2011. The work will be mainly to add features that Gluon needs for the next release.
As the post title says, here is the stuff completed till now-
Because GUI for some functionality is missing, there are no screenshots
. But no need to worry, it is one of the tasks I will be taking up next. Thanks for reading ![]()
Hello PlanetKDE and everyone!
In this post, I’ll try to lay out details of my GSoC project, Integrating the SMARTS Game AI System into Gluon.
Gluon:
Gluon is a powerful library that aids in game creation. It is also bundled with a compact GUI called GluonCreator, that eases game development and a Gluon_qtplayer for playing games developed in Gluon. Gluon has immense scope to become a gaming haven for Linux users.
A GameProject in Gluon is a collection of Assets like Sounds And Images. Scenes, a type of Asset, contain GameObjects that are the characters or objects in the game, Components that define the logic that drives these GameObjects.
Game AI:
Game Artificial Intelligence, pretty much a self-explanatory term, determines the behavior of game-characters based on the game scenario. Its primary aim is to bring NPCs as close to real life characters as possible, by mimicking real-life thoughts and responses of that particular character. Take, for instance, a first person game in which, if you mess with normally-jovial people on the road side, they bonk you on the head in response, or an ingame dog which simulates a real one (like chasing cats instinctively). Pardon me if those were lame examples
Computer Go would be a simple example of an AI implementation in gaming. It is similar to Chess, though Chess engines are more inclined towards brute force techniques(choosing the best move out of many based on the scenario). This is perhaps why Chess Engines can beat human GMs, and in contrast, the best Go Engine is still a novice.
Now, wouldn’t you want to play games with an interactive game character rather than a boring NPC which does the same stuff over and over? Wouldn’t you want to play against an NPC that shows natural intelligence and competitiveness rather than toggling its efficiency levels between ‘Easy’, ‘Medium’ and ‘Hard’? This is where Game AI pitches in!
SMARTS Game AI System:
Game AI development techniques have been evolving over time, and each technique has tried to squash the drawbacks of its predecessor. With this trend comes Behavior Trees, a prospective technique that patches holes in the presently widespread (Hierarchical) Finite State Machines(HFSMs). I’m not going to go into what HFSMs are and how they work. I’m beginning to imagine you yawning already O.O
A Behavior Tree is much like a Directed Graph. It consists of a Parent Node which defines what the behavior is. Upon execution, it runs its Child nodes based on a specific algorithm and employing different types of selectors. And how is this particular behavior node selected? Based on the result of a Perception System.
Ok, example time. Mr.Dog is an NPC who generally wanders around. A Mr.Cat now wanders into the scene which is inhabited by, uh, Dog. Dog, your perception system just triggered off. You just perceived a cat, and you’ve been wired to react to the condition ‘A cat moves into your territory’. What is your reaction going to be? Oh yes, you should be running that ‘Attack!’ Behavior Tree, which runs its child nodes in the order ‘Bark’, ‘Chase’, and ‘Bite’.
Sorry for the sadistic example
But that’s a gist of how Behavior Trees work. In SMARTS, this concept is implemented in the following way:
In a nutshell, the btCharacter perceives its surroundings with the help of its perception system(btPerception, btPerceptionAtom, btPerceptionInfo), and exhibits a behavior accordingly by choosing a behavior from the btBrain class.
Stuff that I be doin’:
Hopefully I pulled that explanation off comprehensively, and that said, it would be easier now to highlight what I would be doing as part of my GSoC work for Gluon. As I said earlier, SMARTS uses the Behavior Tree structure, while Gluon is based on Components and Assets.
You’re going: “Oh yeah, you’re going to restructure SMARTS into a Gluon-like hierarchy, and then merge SMARTS into Gluon. So that Game Developers using Gluon would be able to incorporate the Behavior Tree technique in their Games!”
Right. If all goes well, and I don’t mess up. I intend to finish the project regardless of GSoC results, anyway. And oh yes, optionally, I would also be creating a KPart, a graphical frontend, for using the SMARTS Components and Assets. Kevin Whitaker’s awesome work in last year’s GSoC in coding a Node Creator Plugin for Gluon has ensured that the KPart would be an easy job. Thanks, Kevin!
Thanks loads:
To the Gluon Team, especially ahiemstra and leinir, who were patient with me and helped me through, and still help me all the time.
To the KDE Community, admins and mentors, for their help and confidence in me.
And to my friend Prasshanth who taught me Go
Resources used and for further study:
SMARTS Homepage
Behavior Trees and why FSMs are losing market.
And of course, the wonderful Gluon Team’s help
I’ll be back with another blog post later!
See y’around, people!