Archive of November 2007

Reverse engineering game formats and ethics

Posted on 2007-11-25 14:10:27

In the beginning of this year I did quite a bit of reverse engineering on the file formats used in Impressions’ citybuilding games. My main aim had been to create programs to extract the “minimap” from the scenarios and saved games, in which I succeeded (though I recently discovered a bug in one of the programs that I haven’t been able to solve yet).

Since then, I’ve learned a great deal about those file formats, way more than is displayed on my projects pages. I’ve also had a look at the file format used to store the in-game graphics, which I’ve nearly deciphered as well.

All this is fine and dandy, until people come along who wish to change things in the saved games and/or scenarios. Some requests:

  • Disable clay pit collapsing in Caesar 3 saved games
  • Change the enemy type in a Caesar 3 saved game
  • Extract terrain maps from other people’s Zeus compiled adventure “packs” for use in their own scenarios

Technically, making those changes or extracting the information is not difficult, and writing a program to make the changes won’t be difficult either. However, this is where ethics come into play: there are still contests being held for all of the games, and who knows what those “tools” will be used for when I create them? Where ends personal use and starts cheating?

So far I’ve been refusing these requests (or did not reply to them if posted on a forum), for above reasons: I do not want to encourage cheating, and I do not wish to disturb the already fragile world of unofficial game contests. Over the years, quite some exploits have been discovered whose use cannot be detected in saved games, so contest sites have to rely heavily on the user’s sense of fair play.

Normally, I’m all for openness of information, full disclosure, and so forth, but in this case I’m hesitant, certainly after one of my programs for Caesar IV was labelled as cheat tool.

SharePoint 2007 and web standards

Posted on 2007-11-22 22:05:45

Since the start of this week, I’ve been tasked with writing up some HTML and CSS standards for our SharePoint team at work. As resident self-proclaimed “CSS guru”, I had already helped them to solve a few CSS problems they were having in the past few months. Most of those CSS problems were caused by SharePoint itself: it generates awfully bad HTML, and some default style rules. Furthermore, if a page is in “edit mode”, there are all kind of buttons and a floating toolbar added to each text field and text area, making a pixel-perfect design fall apart because boxes are suddenly 50 pixels wider than they are normally.

Anyway, so I’m in charge of writing up some standards. I’ve done that before both at HeavenGames and at my previous job. However, these standards will be specifically for SharePoint, so I finally got my hands dirty and acquired a VMWare image with Sharepoint on it from one of the Sharepoint guys, to see how bad it really is.

One of the boys helped me install one of the sites they made on it, and set up a “default” site as well, so I could see how Sharepoint thinks things should be.

When loading a site for the first time, one gets a mysterious error which says “try again later”. Hitting F5 instantly will properly load up the site. On top of that, everything is mighty slow when running it in a virtual machine: Sharepoint only runs on Windows Server 2003, and our workstations all run WinXP so development has to be done in VMWare images.

One look at View -> Source on the default site was more than my poor eyes could handle. A handful of atrocities:

  • HTML 4.01 transitional doctype. This wouldn’t be so bad (it was a full doctype including URL), if not for the next point:
  • Parts of the page in XHTML (self-closing tags: />), part of the page in HTML.
  • Invalid HTML too: a <span> with a <span> inside (okay), with a <table> inside. A what? A table, which brings us to the next point:
  • Tables used for layout. Come on, this is 2007 we’re talking about, not 1997.
  • A default stylesheet which contained at least 10 errors at first glance: the font-size was set in 10 different places, and always with a space between the amount and the unit, which is plain wrong. Internet Explorer understands it, the rest of the world doesn’t.
  • HTML generated by the visual editor looks like this:
    <p><span><span><span><span><span class=ms-rteCustom-ArticleTitle>Some
       text</span></span></span></span></span></p>
    

I could go on, but I closed the source viewer at that point, dismayed by what I saw. So this is how Microsoft expects us to develop websites, even though they’ve switched their own sites to (more or less) table-less layouts? Granted, it’s possible to do that in Sharepoint as well, but the site menus and management options will still be done with tables, inline CSS, and a buttload of Javascript which does not even run on alternative browsers such as Opera. They tout support for Firefox 1.5+, but editing text in a “rich textbox” still doesn’t work.

No wonder people have been having a lot of problems with it.

And I’m supposed to write some guidelines and standards for this mess? Ugh. The project leader for this moaned today: “do you think anyone at Microsoft uses Sharepoint at all?” My answer: definitely not.

Posted in: Web standards, Work

Second batch of personal projects online

Posted on 2007-11-17 12:18:22

This weekend I worked on moving the minimap-creating programs for the old Impressions citybuilding games over from my private HeavenGames site to this site. Just like the widgets, you can find them under Projects. Enjoy!

Posted in: Projects

First personal projects online

Posted on 2007-11-12 18:50:04

I’ve put the first of my personal projects online: the Mac OS X dashboard widgets that were previously available on my VU site. Furthermore, I’ve added some information relating to the content management system driving this site: Helios.

Upcoming projects to be added on the projects page include:

  • Minimap generator programs for the citybuilding games Caesar 3, Pharaoh, and Zeus
  • The various utilities I’ve written for Caesar IV
Posted in: Projects

The nonsense of Microsoft Certification

Posted on 2007-11-08 21:54:00

When I started to work at my current job, I had to follow a 6-week course in .NET programming, followed by a Microsoft certification exam. If I didn’t pass the exam (.NET 2.0 Foundation), I would be fired.

The course started with reading through the book that covers all stuff you can possibly get in the exam. The next four weeks were dedicated to writing a program that will never be used and will be thrown away like yesterday’s meal left-overs after the course is over. Nevertheless, it was interesting enough.

In the last week, we were supposed to be preparing for the exam. Here comes the interesting part: the questions and answers to those questions of the exam itself were available. In effect, all we had to do was learn those questions and answers by heart and we would pass.

The exam itself was therefore a doozy: out of the 80-or-so possible questions, we got 45 on the exam. All of the question were either multiple-choice, or “select all that apply from the following list”, and, surprise, surprise, even the answers weren’t put in a random order. On top of that, there were several questions concerning DES encryption, and all of them had D as answer.

So, actually, passing the exam means that you can successfully memorize 80 questions and their accompanying letter(s).

After hearing multiple colleagues pass several other exams in the same way, I can conclude that there’s absolutely no value in the Microsoft certification process. Its only purpose seems to be to keep managers happy, and to fill Microsoft’s pockets.

I’ve heard that companies get a discount on Microsoft products if an X percentage of their people is certified. One question then remains: what’s cheaper, paying the full price, or paying less but having to pay for the exams your employees take? Only Microsoft knows …

[edit] I just heard at work that being a Microsoft Gold Partner means that our company saves about 50,000 euros in software costs per year. That’s quite a sum, but I still think this whole certification process is nonsense.

Posted in: Work

Explanation of the site name

Posted on 2007-11-04 21:51:44

Pandora’s Box. A controversial “box” which wasn’t a box at all, but rather a mistranslation of the Greek word “pithos” (jar).

If you know your classics, you will be aware that Pandora (meaning “all-gifted”) was a woman in Greek mythology. She was given a jar with a lid and told not to open it. Curious as she was, she opened it anyways, and all sorts of evil fled into the world. For the full story, I refer you to Wikipedia.

Anyway, I have a habit of naming my computers after mythological beasts or persons (‘pegasus’, ‘phoenix’, and ‘cerberus’ – the router), and my server needed a name as well. After much thinking I named the old laptop serving these pages: “Pandora”.

Then, when the time came to come up with a title for my site, I had to think for a long time. I wanted to reflect the fact that it was going to be a repository of personal programming projects, and it should preferably start with a “P” because my nickname on the internet has been “Pecunia” since 2000. On a train ride I came up with “Pandora’s Box”, scribbled it down on the edge of a newspaper and that was it.

When I got back home I still liked the name, so it stuck.

Posted in: Personal

Obligatory first post

Posted on 2007-11-04 19:13:53

So, yes, this blog is the first part of my new site that’s actually working. Hi!

What is this site about, might you wonder. A good question. First and foremost this is my personal bit of webspace, mainly created to showcase some programs I’ve written and to vent some frustrations from real life. Please bear with me while I get this virtual home in order.

So who am I? Check out the about page to learn about me.

Posted in: Personal