August 2006

Monthly Archive

A bevy of new things

Posted by on 21 Aug 2006 | Tagged as: news, technical

We’ve been busy lately. Or, more acurately, we’ve not been busy lately–Green Felt is our “spare time” project. However you look at it, we’ve made a bunch of under the hood and user visible changes lately. I’ll explain them one by one:

  1. We added a new graphic to represent an empty card pile and got rid of the cheesy old-school html table borders. I have to say I’m really happy with the way this turned out. I originally wanted the empty pile to look like a depression in the green felt background, but I was unable to draw it in Illustrator. I’m not much of an artist. I still have hope that my brother Michael will come through with a nice picture. In the mean time I think the dotted outlines look good enough.
  2. We added a little box in the top right that tells you when there are new posts on this blog or in the forum. I don’t like that it takes a long time to load, plus it doesn’t wrap nicely when the window is too small (especially in Internet Explorer for some reason), but I like the functionality. I wish it were quick and built into the static HTML instead of being AJAX.
  3. We added redo support! If you undo too far or decide it was a bad idea to undo you can redo back to where you were. Control-Shift-Z (or Command-Shift-Z for you Mac heads) is the key shortcut for redo. Note that if you undo and then start moving cards around then your redo history is lost.
  4. We moved the Forum to our hosting provider and updated it to the latest version. This is more of a behind the scenes change, but you should notice that the forum is more responsive now that it’s hosted by a provider with a lot of bandwidth and not from my personal cable modem. 🙂 We also added some spam protection which, for the moment, seems to be keeping the spam bots a bay (which may not have been annoying you, but it was making us delete a bunch of stupid spam messages every day).
  5. We also created a new forum just for resolved bugs and moved all the bugs that have been fixed into that forum. That way the bugs forum only lists outstanding/unresolved issues.
  6. It’s not quite done yet, but we’ve done a lot of work on a new game. Suduko! There’s a couple bugs we have to fix and loose ends to tie up, but you can try it out now if you can guess the address. 🙂

-David

Leader Board Changes

Posted by on 16 Aug 2006 | Tagged as: news, technical

We made a change to the way the scores are ranked on the leader board. Today I pushed the change to the main site. The change is this: If you play a game multiple times and get the same score then only the first game will be shown.

Why did we make this change? We wanted to combat the technique of playing a game multiple times and getting the same score, but each time incrementally decreasing the time. This seems like gaming the system to us. Not only that but it pushes everyone off the high score list which can be annoying. So now only your first game of a particular score gets counted.

We’ve been calling this the “Kathy Problem” amongst ourselves as Kathy in particular seems to engage in this activity. Don’t worry Kathy, we still love you. 🙂

Think this is a good change? Hate it? Feel slighted because we singled you out and named a problem after you when you’re really not the only person to engage in this activity? Leave a comment and let us know how you feel.

Added a news box

Posted by on 13 Aug 2006 | Tagged as: technical

The following post was originally written in August of 20066. For some reason I never posted it to the blog, though reading it now it seems interesting. It’s fairly technical, unlike some of the other posts. Hope you enjoy it:


I wasn’t sure how to best link in our new blog. After thinking about it a while I decided that a little box in the corner of the site could list the last 2 or 3 blog posts. I then figured I should be able to list the last forum posts too. Once I had the idea, I had to figure out how I was going to get the info from two diverse pieces of code into our green felt page template.

Then I noticed that the blog we set up (wordpress) has an RSS feed. This is a little XML data file that always has the latest posts in it. Nice. The forum didn’t have any RSS support though. Luckily, it’s one of the most popular forums out there so there were at least 3 add-ons that would add RSS functionality. It took me 2 tries to get a good one, but in the end I liked the way it worked. I was able to customize it and add in a couple XML fields that they didn’t set by default.

After seeing how slow the RSS feeds were to respond I decided that it would be best for the client to go get the data and transform it onto the screen. Nobody wants to wait 2 extra seconds for their page to load just for some integrated RSS.

I then had to coax the XML from the RSS into a form that could be displayed on the page. I started with the standard javascript DOM interface, but it was a big pain and the code was growing way too big way too fast. I then realized that it would be best to parse it on the server side and send JSON over to the javascript client. So it was time for a quick CGI script.

Let’s hear it for perl! I whipped up something that parsed the XML adequately in about 5 minutes. The key to the whole script is this line here:

print objToJson(XMLin($response->content, ForceArray=>["item", "channel"]));

That uses perl’s XML::Simple to parse the XML into a perl structure. The “ForceArray” part makes sure that all the “item” and “channel” tags in the XML get interpreted as array items. It then outputs that structure as JSON, ready to be interpreted by the javascript side.

The javascript side is easy since it has everything in a native structure. Want the title of the first item in the first channel? rss.channel[0].item[0].title. Once I had the right data structures, the rest of the code basically wrote itself.

In the end I’m happy with the way the code turned out, but I’m not sure whether an extra little box in the corner of the page use useful enough to balance out the amount of clutter it adds.

-David

Hello from the developers

Posted by on 13 Aug 2006 | Tagged as: Uncategorized

Hello to all Green Felt players. We’ve set up this blog so that we have more direct contact with each of you. We’d like to discuss new ideas and issues that exist with Green Felt and in the past felt held back by the forum. It’s so complicated. We like it for bug reports (or at least, I do–Jim’s not so gung-ho) but we think it’s just too much for a simple blog.

Anyway, this is just a taste of what’s to come. It’s too late for me to write anything terribly profound!

-David