Glenn's Development Blog


Leave a comment

Pencils down

The soft deadline has passed and that means every student should be wrapping up by now. The patches that need to be submitted to Google, can only contain code written before 16 September. In the time up until 23 September we are supposed to write documentation, and that is exactly what I have been doing the last 2 days. I’ve accomplished quite a lot this summer and am pretty satisfied, though a lot has still to be done before my work is ready for a release. I’ll definitely try to continue development after GSoC and keep on promoting SuperTuxKart.

In the last period I did some GUI for the achievements and provided a way to let people change their passwords via the client. Besides that I did some bug fixes and a lot of small improvements. As with previous posts, I am probably forgetting to mention some stuff but you can expect a rather large post after the final evaluation where I’ll try to summarize everything I achieved this summer.  I’m pretty sure I’ll pass the final evaluation and consequently receive my Google certificate. ^^

-Glenn

Advertisements


Leave a comment

Achievement Unlocked

Only 2  weeks left and while most of the features present in my proposal are implemented, it seems like I will not be able to finish all the small details . The main reason for this, is the unforeseen work on the GUI Engine. Even last week I encountered yet again a rather painful bug there, that resulted in certain requests being performed twice. As this caused no problems before, I assumed the error originated from my own code but after careful debugging, I noticed that it resulted from a hover event being propagated when it shouldn’t. Besides the many bugs I’ve also did multiple additions to the engine that weren’t planned and that certainly has cost me a rather large amount of time too.

So what new stuff did I achieve.. achievements! Though without much GUI support at the moment and thus no screenshots in this post. This feature required quite some considerations as you can imagine. The first one was cheating, with as end conclusion that it is impossible to make achievements cheat-proof for an open-source game; at least with our current code-base. (There was a separate GSoC project on the list which aimed at preventing such behavior but apparently nobody came up with solid ideas. So any suggestions on that subject are definitely welcome too!)

A solid framework for achievements isn’t straight-forward and every new achievement will still need some “hacking”  to gather the needed information. At this moment there are two different types supported called “single” and “map”. The first one is used for achievements that only need to store one value. A simple example of this is “Hit 10 karts with a bowling ball.”; only the current number of karts, that you’ve hit by a bowling ball, needs to be stored. The moment you reach 10, the achievement is accomplished. The other type uses a map to store its progress. As example here we have “Win a race on every track.”. As you can guess, the id’s of the tracks are used as keys and the mapped values contain the progress. As an extra, every achievement also has a flag whether or not it should be reset after a race. This way challenges like “Collect 10 nitro bottles in one race.” are also easily supported.

I believe that with these categories a lot of achievements can be added rather easily, as the users (i.e. other developers/me) don’t need to worry about loading, saving, succeeding, and notification as my framework takes care of that. Ok. Moving on. Another hard task was (and actually still is) to take care of to which user the achievements belong. The issue here is the presence of offline and online accounts. Currently when you are offline, your progress is attached to you offline account (the ones STK uses for Story Mode at the moment). When you sign in, the progress is of course bound to your online id. I know this doesn’t make that much sense, but it’s the perfect way to let new players try out the achievements, without them having to register for an online account. In the future we’ll probably provide a way to bind those offline achievements to a new account, so that you don’t lose your progress when registering.

No real new features will be added anymore (as part of GSoC). I still need to add possibilities to change profile information, an achievements page and enhance the lobby room. So I’ve still got plenty to do!

-Glenn