Blog

Projects, projects, projects!

Last week my copy of Anno 1701 for the Nintendo DS dropped in and I instantly remembered the happy days when I played the original version for the PC, Anno 1602. While the gameplay is pretty much the same, graphics have been improved a bit and the product circuits got less complex. While you may have needed two or three buildings to produce a certain good, now one or two are enough. All in all its a worthwile game, which made me looking into alternatives and/or ports for the Mac OS. Sunflowers, the company behind the Anno series, never considered such a step (“market share too less significant”) and I don’t know of any other publisher, such as Aspyr Media, ever considered that either way. This is kind of sad, especially if you look at the gorgeous PC version of 1701 which was released last fall. Intel Macs now certainly have enough power to play those games, but even Steve itself doesn’t put the “almost no mainstream games for the Mac”-problem on a high agenda – which you may imagine if you look at the half-hearted try of Electronic Arts to support the Mac OS with games, which was, of course, vastly announced by Steve on the last MacWorld.

Now, one very interesting project which recently took my attention in this regard is OpenAnno. It seems that a couple of Anno-enthusiasts try to create a clone of the original 1602 version. The game is in very early stage, there is an editor written in Qt, and the game itself seems to be build upon SDL, making it suitable for cross platform gaming. However, like every Open Source game, the developer’s biggest problem is to find people who create kick-ass graphics and animations, and in general, get more attention by the community. I decided to give it a try and create some native mac binaries for the most recent version. This is not done in five minutes, given the fact that the SDL libs (they use SDL_image, SDL_mixer, SDL_gfx and SDL_ttf) aren’t installed on most user Macs and most of those libs are known to have other horrible dependencies. So instead of messing around with frameworks I’ll probably try and link all of them statically to the main application. PhysFS is another dependency, but this shouldn’t be too hard to integrate. Lets see how this goes, I’ll of course post news here if I get it done =)

Beside OpenAnno there are of course other projects which have my attention. At first guitone, where the development slowed down a bit recently, because I’m in the process of rebuilding the monotone wrapper in use again. Having the mtn process run in the main GUI thread seems to cause a lot of problems, sometimes it just doesn’t signal that output is available, so the GUI is stucked (this happens on my beloved win32 port). But I’m not saying that it works better on other platforms… OSX has similar problems. My current solution involves putting the QProcess in a separate thread which has a local task queue and which signals when a certain task has been finished. Thanks to the Trolls that signals and slots work across threads (they are enqueue in this case and are not executed directly), still, my new solution includes some ugly code parts, f.e. when I try to match the finished task to any of the signalled slots. Given a general signal like this

void taskFinished(MonotoneTask & task);
and any amount of consumer classes which have a slot for this of course makes the need for code like this
void Consumer::taskFinished(MonotoneTask & task)
{
    // this is not our task...
    if (task.getTaskNumber() != rememberedTaskNumber) return;
}
if one uses a thread-global task number to identify each of them. I’ve looked into various other solutions for this; what I basically need is of course a callback or something which only functional languages provide: lambda notations. But this is Qt, this is C++, so without getting your hands very very dirty (or throwing in big dependencies like boost) there is no way of doing safe, reliable, non-intrusive, cross-thread callbacks. But hey, if you know something I don’t know, I’d be happy to hear from you!

There are two other projects which have my interest, but I guess I’ll tell you of those in my next post – this one got already far too long =)

Life and everything

So this was one of those mediocre days, you wake up far too early in the morning because your little son thinks its a good time to be awake. You do the usual things, like get awake yourself somehow in the bathroom, put on some clothes (while picking those ones which don’t smell that bad from the staple), take care about your son and your wife, eat something, later give each a hug, “love you, bye!” and go to work.

Well, work, this is probably what struggles me the most at the moment. Of course you can’t always do or like what you personally find good or bad, you’re bound to projects, internal processes and stuff. Work used to be fun because I had and have great colleques, but sometimes, like recently, this just doesn’t compare or outweight the actual project work which just annoys me.

Usually, there are several kinds of projects, and I’m solely speaking of software projects here. Two of these “types” are the reason for my current struggeling:

The “I knew that this would happen and break our neck”-project. Usually these projects are plainly brain dead, include immense code hacks to get something work or are just build upon the wrong /dysfunctional components. Of course its not an option to just cancel the project – they have to be kept alive most of the time for political and / or reputational reasons.

The “We have to use this whether or not it is sufficient”-project. This is something even more brain dead and normally applies to a component or software you need to build your own software upon. To make things even worse, the component or software is mostly closed source, meaning you or your customer had to pay a huge amount of money for it and by doing this you are solely dependent on this particular vendor. The whitepapers of those things always look great, but when it comes to the actual implementation details you may find out “woops, it doesn’t do what we want, now what?” – yeah, one could bug the vendor and beg him to implement the feature, and maybe he even does that (based on the amount of money you’ve spent before on licensing), but this doesn’t always work out and if it worked out for one missing feature, it might not work out for another one you may find later. So you sit there and try to hack it yourself, and obviously your “system” has something they’d call an “api”, this is badly documented, and of course any support call to the vendor costs either alot struggle or even worse $$$.

For me personally an even worse problem is recently, that even if some project finished successfully, I didn’t get much satisfaction from it. Maybe this was because I couldn’t use the tools or environment I’d like to have used (Windoze anyone?), maybe this was because the resulting code quality didn’t match my own expectations (if you do project work you almost never have much time to get your tools right, think about a proper and extensible architecture, aso.), and maybe this was because I couldn’t tell anyone of the project because of NDAs or other political issues. How should I be proud of something I cannot show and explain in detail to anybody?

So all this made me think a lot in the past. At first I decided to get my joy of work back by doing personal Open Source projects in my spare time. This worked for quite some time and still kind of works, but the obvious problem is time. If you work 8+ hours, have a family with a little child and then should find some time to get some serious hacking done, then this usually fucks up your sleeping rythmn because you start to shift your “personal” workload into evening and night sessions.

Shouldn’t it be somehow possible to get both, satisfaction and money, for something you create? I came to the conclusion that it should be possible, after all these people seemed to have a lot of fun with their day job. Is that, because they produce an Open Source software, which is not only licensed by many companies, but also free to use for anyone else? Is that, because their employer, Trolltech, not only allows, but encourage them to research personal interests and get in contact with the community?

I could be wrong, but I think the answers to the above questions are “yes”. Thats why I think my perfect job would be in a company which not only uses, but respects and lives Open Source. And thats why I recently applied for a job offer from the Trolls, now lets see how this one goes…