About

About

This is the website for my Allefant project which for many years was hosted on SourceForge. It is a collection of various games I wrote over the years for short game programming competitions, such competitions usually taking about 2 days to create the complete game (code as well as art). The first such game I made was Allefant back in the year 2000. Some of the games also were worked on afterwards and polished a bit, so they are actually playable. Most are little more than a tech demo though. They are all open source.

LD48 2011 (#20)

LD48 2011 (#20)

Took part in this LD. However, I had no time to prepare and also have too much stress with work and getting Fargoal 2 done to be really into it. Coding for 2 days straight as I did in some of the previous LDs seriously impacts me for the next days, the brain gets exhausted from it :) Which I can’t afford now – almost had a bad conscience for “taking off” this weekend.

Also, this must be the worst theme any LD ever had. Just a phrase from the beginning of Zelda1 which would fit for virtually any game. So one of the most fun parts of LDs for me, coming up with an idea fitting to the theme, was missing. Still, I’m quite happy about the theme since I got to watch a play-through of Zelda 1 on Youtube instead – it’s a game I long have on my list of must-try games. I didn’t get around to actually try it in a NES emulator so I’ll leave it on the list, but seeing a video also tells a bit.

Also, my actual game turned out nice enough – even though it’s basically just a model viewer of a custom Blender exporter I wrote. I needed to get starting with Blender 2.5 scripting anyway, after this it should now be a lot easier to update all my 2.4 scripts. I spent quite a bit of time figuring out the matrix manipulations of armatures.

The first stumbling block was:

scene.frame_set(0)

Basically, my first problem was that the exported mesh always had my armature applied already. So I made a frame 0 with everything key-framed to the rest position. Probably there’s a way to get the raw mesh vertices – but well I couldn’t find it. The next trouble was:

v *= armature.pose.bones[group].matrix.inverted()

This is what I spent the most time on. First I used .matrix_base of the pose vertices and tried to re-assemble bone position and orientation by following all the parents. But it never quite worked out. So then finally I decided to go the brute force route and added the above. Basically, I take the pose (again in rest position with the frame 0 trick) and then apply the inverse transformation to each vertex. When I now in-game just send the matrix to OpenGL everything ends up at the right place – and it all kept working with complex armature hierarchies. If a vertex is affected by more than one bone it might need more tweaking but the models for this game don’t use vertex weights.

Finally the third problem was gamma correction. With the simple solution of disabling “color management” in render settings. Just took some time to identify the problem then find that button in a rather unrelated place (i wasn’t rendering anything, my scene didn’t even have a camera or any lights).

Now I’m only sad that it will be at least several weeks before I’ll have time to get back to this game which I’d really like to finish.

Posted in News | Leave a comment
fosdem picture

fosdem picture

Just testing how this will appear on ludumdare.com/planet. Will it show my name as “allefant”? Do pictures appear?

Posted in News | 1 Comment

fosdem

2011 is the year of travelling for me, travelled infinitely many more times than any previous year already :)

Mainly meeting the Wesnoth devs here, which is quite fun. They seem to be talking about Wesnoth all the time. And at fosdem, instead of going to any talks they took over one of the hack rooms and do talks and discuss stuff. And there’s a lot of them, close to 15 people I’d say. And well, I’m doing the same, sitting in the hacking room and working on SoF 2.

Posted in News | Leave a comment

Global Game Jam 2011

Last weekend I went to Vienna and took part in the global game jam. indeterminatus mentioned it in #allegro on Tuesday or Wednesday, on Thursday in a moment of insanity I ordered train tickets and on Friday was standing in the Vienna subway trying to find the game jam location… with only wireless internet I really should have noted down the location and maybe brought a map :P

Still, when I saw a station called Karlsplatz in the subway plan I remembered, and went there. Outside the station I saw a university building… and at the main entrance there was a sign saying “game jam” and then another sign pointing up a stairway. And there I was.

The main difference to LD48/pyweek/speedhack and so on was that it was a team competition. I mainly did some support coding. Will put a link to the game later.

Posted in News | Leave a comment

Google App Engine

Just tried converting our Sword of Fargoal news server to Google App Engine because I heard good things about it. And indeed using its Python framework is quite nice. Instead of a database they provide a data storage facility which is similar to a database – just using GQL instead of SQL. Guess what the G stands for. Basically the code for our server remains identical – which is great. Usually when trying a framework like this I have to use lots of useless classes and XML stuff which supposedly is easier than just doing things by hand. With Google App Engine apparently not so – there was not a single XML file to edit. Big plus points for that.

Also, deployment is extremely simple. Under Windows you get an application to start up with big New and Browse buttons. Simply click on New to create an example web app and then on Browse to view it in your browser. After that you can just modify the web app and simply refresh in the browser – it will automatically use the changed version. There’s also a Deploy button – when I pressed it the application identifier was enough to tell google to actually deploy it to the right location. It only asked for my google user name and password. Then when I got home later under Linux I could simply download the complete web app again and update it just as easily (with a command line tool). So again a big plus point for Google – web app frameworks I used in the past required from several hours to several days just to get a steady dev environment set up.

Now what about performance. In my system to request news all the client sends is this:

X

That is, just my application data (so far consisting of only the version). There’s no need to send anything else. On the server side the server is listening on a socket and receives the client data and puts them into a database along with IP and date. Then it returns the news:

Y

It’s pretty minimal. And it’s all that’s needed. We use almost no bandwidth and almost no CPU.

Now, what happens with the app engine version. First, I need to create a POST request. That’s much better than if it was a SOAP request with several KB worth of XML headers, but still:

GET /news?version=X HTTP/1.0
Host: newsserver.fargoal.com

If we assume that X has 10 bytes then instead of 10 bytes we now send 60 bytes (newlines are sent as 2 bytes and there’s an empty line at the end). Now for the reply:

HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Date: Tue, 25 Jan 2011 18:50:54 GMT
Server: Google Frontend

Hello from Google
Another News line
And even more news

Well, we receive 240 bytes. The Y from before is just the news text which is 55 bytes.

So we have to send 600% of data compared to now and we receive 436% of data. Or in other words we send 6 times as much and receive 4 times as much. Now, considering news fetching is a very low traffic operation and the byte amounts are ridiculously small either way it doesn’t matter too much. We simply get the HTTP overhead added to all out data.

Now, what about CPU? The important part for us is the client. It now has to parse all the stuff Google sends back. But with HTTP/1.0 that’s not too hard – just ignore all stuff until there’s an empty line and consider the rest data.

On the server side my standalone server simply listens on a socket for incoming connections. When one comes in the news is sent back and the IP logged into the database. With Google App Engine the web server sees the request, then decided which application to route it to, creates an application instance and executes the application. The application writes out the news (just HTTP encoded this time) and adds the IP to the Google storage. In principle not too much more – it just depends on how much all those steps can be optimized to know how much slower they are. Still, it’s now running on Google’s hardware so it shouldn’t matter too much. How good it performs can only be known once it’s out there and it takes forever for news to appear. In theory it could perform just as well as now as long as available bandwidth and CPU are never maxed out even if they are both quite a bit higher than now.

Posted in News | Leave a comment

Apple has no idea of user interface design

It’s fun how broken apple devices are, compared to all the hype they get. I just wanted to buy an app on my gen4 ipod touch. After clicking the buy button it asked me to log in with my email and password. The screen looked like this:

email:
password:

After repeatedly trying to type in the password and always failing I went to itunes and double checked I had remembered everything right. I had. So after trying all kinds of things for half an hour I tried and put my apple-id instead of the email into the email field. And it worked. That’s quite a serious bug in one of the key apps – how could they not notice this before shipping the device?

But the real fun started after that. When I realized that the app was almost 1 GB in size I decided I didn’t want to download it over my slow wireless as it would take hours. So, I tried to cancel the download. Yes, the most simple and basic thing, right? Cancel a download. So, I hold my finger on the app icon. As expected all my apps start shivering in fear of getting deleted and a small x appears next to each. To each, except the one I want to delete. What the hell. So after some googling, I turn off wireless, log out of the store, reboot the device (and almost decide to throw it out of the window). But nothing works, it insists on either just saying “Waiting…” if there’s no internet connection, or else “Loading…” or “Paused…”. Yes, it let’s me pause it. But not cancel as I want. Only two solutions left seem to be completely restoring the device from itunes (but I don’t want to plug it in) or letting it do a completely useless 1GB download, just so I can fucking delete the app.

So yes, doesn’t look like my opinion on Apple products will change anytime soon.

Posted in News | Leave a comment
wordpress theme updated

wordpress theme updated

I just updated my wordpress theme to support “widgets”. The old plugin which shows new games in the sidebar didn’t work with WP 3.x so I wanted to fix it and those widgets seemed like the proper way. However none of the available widgets would do what I want, so had to take one which is close and hack the PHP. So in the end more work than just updating the old plugin.

Still, since I have widget support now, I also installed all kinds of WP plugins I could find, like one which supposedly posts to twitter when I make one of my 3 posts a year here.

Posted in News | Leave a comment
TINS 2010

TINS 2010

Managed to finish an entry for TINS 2010. Unlike LD48 and similar where you can basically make what you want, the main task here is to implement all the numerous rules all entries have to follow. And it’s fun to see how different the games turn out regardless :)

Posted in News | Leave a comment
Allegro 5 regression testing

Allegro 5 regression testing

Peter added a nice set of unit tests to Allegro 5. It uses simple config files which allow adding new tests without re-compiling. I just made a quick script which updates and compiles the code then runs the tests and prints out the results here: http://allefant.com/tests.py

Posted in News | Leave a comment
took part in ludumdare #18

took part in ludumdare #18

Named my game Zombie Master. Here’s a video:

Now I just need to get around to adding graphics and sound :) It’s running on Allegro5 in that video btw – but using my wrapper which can use other backends.

Posted in News | Leave a comment