Anarchy Online on LSD

This week, I was working on improving the AO rendering. Some of the intermediate screenshots look pretty wild:

And yes, I know I run at crazy window dimensions. Even in windowed mode, Anarchy wants you to run in one of the available fullscreen resolutions, although there’s no reason for it. And since my LCD is tilted 90 degrees, I get these tall windows. I think that’s my next project: Make the screen resolution more customizable in window mode. Or at least offer 800×600 and 1024×768 as a quickfix for myself.

So many things to do, so little time.

Speed!

Yesterday I checked out a 3 year old version of Eressea and compared it to today’s code. In those three years, the game has gotten almost four times faster! The old code took 10:20 minutes to run a turn, and the one I use today was done after 2:50. This had to be done on an old data file, smaller than the one we have today.

I knew I had been doing the occasional optimization – run the code with gprof, fix the worst offenders, rinse and repeat – but I had no idea the gains were that big. I’m sure that 3 years ago I considered the code pretty compact and fast…

I wonder what it will be like in three years.

[ media | Creedance Clearwater Revival – Fortunate Son ]

No climbing today, and slow progress on the game

The Plan™ was to go rock-climbing at Hauktjern today. Friday was a beautiful day in Oslo, with sunshine and temperatures in the 20’s, but of course it was also a working day. Today was rainy and 10 degrees. On IRC, all my friends back in Germany complained about the heat and humidity. It just isn’t fair. And climbing tomorrow isn’t very likely for all kinds of other reasons. Maybe Puerto Rico, though.

So this should have been a great day for working on the game. Only I started looking into Eressea Bugs first, and there were some really nasty ones that required attention. I’ve got the bug count down to 14 open issues, which is pretty good.

Here’s one piece of advice I’d give to anyone who wants to make a Play-By-EMail game: Once you have players, get a bug tracker. Don’t rely on emailed bug reports. We did that for a very, very long time on Eressea, because we hated the hassle of a web interface, but today I can saz the benefits far outweigh the extra work. I use Mantis to track the Eressea Bugs, and some of the benefits are:

Everything is in one place
People used to email bugs to any email address they could find. We had a seperate mailing list for bugs, and still the players would send their bugs to one of us directly. Usually to the wrong person, and often those mails would get lost.
It’s still there in a month
Often I don’t have time to deal with a bug immediately. I used to mark that email as unread, or drag it into a TODO folder, and invariably, that folder would fill up with both fixed and new bugs, or the emails would get marked as read anyway, and the bug goes lost after a few weeks. In a proper bug tracker, if I don’t mark it as fixed, it’s still in the list of open issues.
Better data
I get better data if people fill the bug into a form than when they write an email. I have fields for the data I absolutely need to track a bug (like when it happened, and what faction they play), which saves me a lot of asking. And if I do need more info, all I need to do is write that I need the info in the bug, and a mail is sent to the reporter
Participation
Invariably, 50% of the bug reports are not bugs. Having all the bugs out in the open where players can read them (unless you mark your report as private) means other players can comment, and tell the reporter that it’s not a bug – leaving only the business of closing the bug as invalid to me. Also, seeing other people’s reports means not having to file a duplicate report. I used to get 10 reports of the same bug in the old days. No more

So yes – even for your little hobby game, you should absolutely get a bug tracker, and be good in following up what people put in there. It’s a lot easier for both sides.

But I was going to write about my progress on the game. I added terrains, and with them terrain levels, capacity and the modified movement rules. Then I used a lot of time to come up with a viable concept for walls, rivers and buildings. I think what I have now will work, and started implementing them. Some of the classes are there, but not used in the game yet. Tomorrow, if there is time, I will add them to the region class and the movement rules. And I might start on the lua bindings, so I can start editing a slightly bigger world.

[ music | Listening to: Bruce Springsteen – Atlantic City ]

New PBEM

I’ve been hacking away at a part-time project for the last few days. It’s an implementation of a tabletop game we used to play as teenagers called Armageddon (aka Das Ewige Spiel). It probably needs to be adapted a little for PBEM play.

The idea is to make a PBEM version of it, and try to come up with some new programming techniques if I can. Also, I’m using boost a lot more than I usually would, and dipping into more of their libraries.

The game will have a separate server and client, which exchange their data as xml files (orders going one way, a status report going the other way). I currently have no plans for the client (I write input files by hand), except that I want it to either be portable (Java or C++ with a portable graphics library) or a web interface, which would make it a web game rather than a PBEM. Or all of the above.

The server is written in C++, with libxml2, boost and luabind. The latter is mostly used for setting up the game and modifying the game state – I like having scriptable access to the game world, and I’ve had very positive experiences with lua for Eressea.

Currently, the server knows factions, simple units, regions (but no terrain or levels) and has two commands: one to move a unit and one to swap two units’ places. It can save and load the gameworld, and read orders from an XML file as well as write a simple XML report. That does not sound like a lot, but I’ve built the foundation on which I can build to add more features fast. My short-term TODO list contains terrain types (especially ocean), terrain levels, buildings, more unit types and recruitment/construction orders. It all depends on the weather this weekend, I’d say.

I’ll try to keep track of my progress and the stuff I learn on the blog, if I have the patience for it.

Competition Pro USB and the Future of Retro

Retro Gaming will one day be an industry, I am sure. Everyone in my generation has wonderful memories of their favourite C64 or Amiga games. Or Apple ][ and PC/CGA if you are a lamer like me who had one of those.

But face it, we can’t play these games any longer. Years of brainwashing by the games industry has conditioned us to get dizzy looking at anything less than 24 bit color or listening to less-than-surround sound. We may get out the old emulator to play a game or two for old times sake, only to note that our memories are so much better than the actual games, but surely we would not buy those games today? You can’t play anything from the 80s for more than a day. But how can we love something so much and still hate it?

But then there are games like Space Tripper or Mutant Storm. Follow those links and buy them now. You can read the rest of this when you’re done. These games capture the essence of what was good in the old games, but they do not force 8 bit sound and 4-color graphics down our throat. This is what I’m talking about. Good game concepts in a nice audio-visual package, at a price anyone can afford (in this case, $14.95) I want more of these games. Please, go and make them! And I don’t mean none of that shareware shit you slap together in a week.

I believe that there will one day be a larger market than today for these kinds of games. Game concepts from 20 years ago, with today’s production quality. Someone has to make them and, more importantly, sell them.

And to play these games (and the C64 games on VICE), I will need a Competition Pro for USB. It has been made, it is being sold. All I have to do now is to find me a norwegian importer.

PS: Wizball still rocks!

Computer Game Quiz #2

If you’re a real gamer, take the test here.

I couldn’t resists. With the help of the folks on #eressea, I made my own list of classic games to remember, and here’s the result. 40 classic games. Can you guess them all? Leave a comment with your score, please don’t post any spoilers. Or use rot13 if you must.

This was so much fun, I’m already working on a second list of 40 games 🙂

Do you know Computer Game History?

This Quiz asks you to guess the name of the game from a piece of a screenshot. How good do you know your history? Are you old enough to remember the C64?

I had trouble with 5 or 6 of them, but with the help of a few colleagues we’ve managed to get the whole list, even the exotic ones. How many can you do? If you need a hint, just write a comment with the ones you’re struggling with – I needed some serious help with 26, 27 and 36.

And yes, please comment more. I’m always happy to see that somebody reads my drivel. Just please don’t post open spoilers for this one, or if you really want to, at least use rot13 to encrypt them.

Thanks to Kjetil for showing me.

Dosbox – playing classic games on windows

I was complaining loudly today that Windos 2000 no longer plays my favourite game. Kjetil recommended dosbox, an open-source emulator that emulates an entire x86 PC with DOS, and runs just about any old game. It even runs on Mac OS and Linux. So I tried it and lo and behold! Another World runs like a charm. Now I can play through it again, for the fifth time or so.

Now if they would put the hq3x filter into dosbox, like ScummVM does, this game could look even better. I wonder who I’d have to kill to get that done. Oh, and Eric Chahi, please let us have a Windows version with better resolution. I know you must still have all the sources.

I still have a bunch of old DOS classics (like my Wing Commander II, on 5.25″ disks) that I remember fondly. But I doubt I”ll play them even with dosbox – the memories are usually better than the games.

Taking it all apart

It’s one of those things I love: You start with a simple premise, in my case “let’s reduce the amount of synchroonous loading in Anarchy Online”, and end up with weeks of work. The reason: tentacles.

A lot of AO code doesn’t like when you load a mesh asynchronously, so especially when new characters get into your vicinity, their meshes are loaded in the same frame (well, not exactly true, there’s some throttling). This is mostly because the animation code really hates not having a mesh, but also the special effects code and some other bits and bobs. While looking at that, I noticed that in other places, people don’t use the asynchronous resource-loading thread, mostly because it is hard to use, and got added as an afterthought. It was clearly time for some refactoring.

So I started not with more synchronous loading, but with changes to the Resource Loader itself. The first test I made gave 25% faster loading times for synchronous loading, so even with no change to the rest of the system, I would increase framerate for those laggy you-entered-a-new-zone moments.

So I rewrote that, and also changed the API. This is where the trouble started. Changing the Resource Loader API meant chnging a lot of classes that were inheriting from the Callback class to using a separate callback class (which lets me then also load objects that did not previously inherit from that class go through the Loader. I’d need a diagram to explain this properly). So suddenly, nothing compiled, and I was in the middle of rewriting those classes when I decided that the callback mechanism was a bad design in the first place, and that I rather wanted to use ACE_Future objects and cleer notification. Around this point, I also decided to make meshes load _only_ asynchronous from now on, because the ACE_Future objects will allow me to make the transition between now and fully async loading as smooth as I want it – well, or so I hope. I haven’t even started fixing the mesh class.

And if you go through that much code, you see all those things that are bugged. Dangling pointers, bad design, inefficiencies. And I just can’t let those be, so I end up taking a detour of one, two hours to fix some smaller thing. It spreads. And now it’s the weekend, and I can’t tear myself away from the machine, although I have no hope of getting this stuff to work any time in the near future…

I love my job 🙂

Arthur C. Clarke is okay

After the tsunami, the first thing I checked for in the news was whether one of my favourite writes was okay. Today I found confirmation that Arthur C. Clarke and his family are okay. He’s suffered some material damage, but no personal loss. The email mentioned in the article is here

Which reminds me that I need to finish reading Time’s Eye.