Monday, December 31, 2007

One of Those Boring Retrospective Articles

I hate TV at this time of year, when all the stories on the news shows are "let's take a look at what happened throughout the year". I was there, I did see it, and I KNOW you're only showing it because it's cheap television. Stop wasting my time. I will now demonstrate the height of hypocrisy by doing the same thing myself.

Game of the Year

With 59 plays, more than the next four contenders combined, my Game of the Year has to be Scrabble. I enjoy it a lot, and I can play on-line which means my opponents and I don't need to synchronise in time and location. Given that one of my most regular opponents lives in Beijing, that's just as well. I enjoy Scrabble a lot, and now that I know the 2 letter words hope to play a little bit more seriously in 2008.

Highlight of the Year

The gaming highlight of the year has to have been Scrabblette finding the "Connection Games" book for me. It led to an obsession that has had a massive impact on the games I buy and play. It sure would be handy if I had an opponent with a similar obsession, but the mathematical aspects of these games have kept me amused for hours. Not to mention implementing Hex for Facebook.

Best New Game of the Year

I've probably played only about a dozen games published in 2007, so I'm choosing from a small pool here, but the best of them so far is definitely Unspeakable Words. It's nothing deep, but it's easy to teach and fun to play and does reward skill.

Happily Unplayed Games of the Year

At the end of last year I realised there were a few games I was completely over - Ra, Geschenkt and Poison, for starters. I wanted to avoid playing them for a while. Given that I didn't play them at all in 2007, I guess I succeeded. Their banishment is over now, and while I still won't be rushing to play them I may not avoid them as assiduously.

Sadly Unplayed Games of the Year

I know it's a long time since Ozvortex came over for a game of C&C Ancients, but I didn't realise it had been a whole year. I guess a lot of 2007 was occupied by moving house. I also didn't play GIPF, DVONN or PUNCT, which doesn't seem right.

Ambitions

Apart from my ambitions with regards to managing my collection as described in an earlier post, these are the things I want to achieve in 2008:
  • Find more opponents for 2 player abstracts so I can start playing the again.
  • Play more of my capital games, e.g. St Petersburg, Tigris & Euphrates, Domaine.
That is all. See you next year.

Saturday, December 29, 2007

Yavalath and Teiglith

Readers may have noticed my obsession with connection games this year, culminating in me voluntarily playing Ticket to Ride last night. The more I know about games the more I have to admit that Ticket to Ride is a sweet design and a perfectly decent game. I lost to Scrabblette, by the way. Anyway, that's not the point of this article. The point is that my obsession comes from reading a book called Connection Games by Cameron Browne. That book was probably one of the defining characteristics of my 2007 gaming year.

Somehow late one night I looked up Cameron Browne on the internet and discovered that he was actually a Ph.D. student at the Queensland University of Technology (sound of jaw dropping here) which is the same university that Scrabblette is a student at. And he's in the same faculty. In stunned amazement I stalked him a little further, only to discover that he currently lives overseas and is finishing his Ph.D. remotely. But, it was amazing to find that the author of such a good book used to live in Brisbane, and with a slight twist of fate we would have met years ago.

Anyway, I contacted him by email and just over a week ago Scrabblette and I attended his final seminar for his Ph.D. I sort of assumed his research was on Hex but it was actually on computer generation of (what BGG calls) abstract strategy games. He implemented a rule description language, an algorithm to combine games using a genetic algorithm, and some automatic criteria to judge the goodness of the games. He then generated some games and tested them with real people and with the automatic criteria. The correlation between those results told him which of the automatic criteria corresponded to what people wanted in a game. He then generated some more games. In his seminar he present 4 games generated by Ludi, his computer program.

The games sounded pretty decent to me (in a Hex / Go / Connect 4 sort of way), so I emailed him asking for the rules. So now I present Yavalath and Teiglith, by Ludi and Cameron Browne.

Yavalath

For two players. The board starts empty. Players take turns adding a piece of their colour to an empty cell. A player wins if they make 4-in-a-row of their colour, but lose if they make 3-in-a-row of their colour without also making 4-in-a-row.

Teiglith
For two players. The board starts with a White piece on each edge cell. Players take turns moving a piece to a connected cell (diagonals are not connected). The destination cell need not be empty; pieces may stack. The first player who cannot move wins.

(I think there's a rule that you can't unstack pieces, and presumably that you can't move stacks.)

I'll see if I can get someone to play Yavalath with me. Let me know if you try it.

Monday, December 24, 2007

Recent Scrabble Scores

Hoo boy have I been playing a lot of Scrabulous recently! I've been on leave and have had enthusiastic opponents. I don't know whether it's because of what I learnt from Joe Edley's book, but I've been making a lot more bingos and some poor opponents have been hit with 2 or 3 a game. In one game I got 3 of them and my opponent got 2. My scores from the last 15 games: 309, 398, 393, 374, 373, 394, 462, 321, 409, 359, 451, 289, 334, 343, 377. That's an average of 372, which is about what I reported in November. I've been working on learning the 3 letter words, but there's lots of weird ones in there. FUB FUD FUG FUM.

Call Me "Deacon Blues"

They've got a name for the winners in the world,
I want a name when I lose.

They call Alabama "The Crimson Tide".
Call me "Deacon Blues".

Scrabblette 368 Friendless 295

Scrabblette 353 Friendless 339

Scrabblette 351 Friendless 343

Scrabblette 369 Friendless 356

Scrabblette 377 Friendless 339

Scrabblette 505 Friendless 301

Sunday, December 23, 2007

A Labour of Love

No, this is not another post about Kevin Rudd. This is a post about Facebook.

A few months ago Aldie asked for testers for his Facebook board game app. Of course I joined Facebook to see what the story was. I found a few people that I know there, so I hung around for a couple of days adding friends. Somehow I started playing Scrabulous, and that was when I realised what a great site this really was. I was playing Scrabble against people I didn't see very often (because they lived in London, for example) and with people who never had the time for a proper game (even though they lived in the same house, for example). I' ve played 47 games of Scrabulous so far.

So I realised Facebook was a great site for playing games against friends you just can't get to in real life. And other games, as well as Scrabble. I decided to write my own. To avoid copyright issues, I decided to write Hex.

Of course, I had no idea how to. I didn't know whether Aldie had written his app in MSVC or Java or Flash or what, and I had no idea how it got deployed on Facebook. But that was the fun part. I was pretty sure that I could program it, whatever it was. Besides, I wanted to know about this Web 2.0 thing Yehuda was into.

I did some research and found out that Facebook apps are very clever indeed. You write your application as a web service and Facebook delegates requests to your app on Facebook through to your web server. So you can write your app in whatever you like and you host it on your own machine, so Facebook doesn't care about your database maintenance or CPU or anything. It just cares that your app responds to requests. I had used Apache in the past, so I installed it on my home machine. I also wanted to write my application in Python because Java bores me sometimes, so I installed mod_python (lets you write Apache services in Python) as well. I already had Linux and MySQL running, so I'd finally got myself a complete LAMP stack.

I couldn't even get the test example going! I did everything it told me to do and it just didn't work! It was very frustrating! It turned out I was running Apache 1.3 and reading the Apache 2 documentation. You can see at this stage that I didn't know much about what I was doing.

Then there was the Facebook API. It talked all about authentication (yawn) and making requests to the Facebook server. I really struggled with how that was relevant to me. I googled and found something called minifb.py which was Python code for doing Facebook stuff. All of the Facebook doco refers to PHP which I don't speak. minifb did more authentication stuff, and I still didn't get it. Eventually by following examples I figured out what I was supposed to do, and I loaded a Facebook page which made a request to my web server. A small victory, at last.

I've glossed over a few things here. Firstly, my ISP gives me a dynamic IP address, so whenever that changed I'd have to go to Facebook and reconfigure my app to point to the new address. A mate at work told me about dyndns.org which provides DNS services for exactly my situation, and I figured out that my router supports it. So now whenever the router is restarted it connects to dyndns.org and tells it that friendless.servegame.org is at this new IP address now. It's very cool. I also had to deal with the network security - our router was configured to not allow any requests from the outside to come into our home network. I had to tell it to route requests for the HTTP service through to my desktop. Not that hard to do, but tricky to realise that you have to do it.

OK, so we were at the "one request got through once" stage. Nothing got any easier. Facebook uses HTML, but it extends it with FBML (Facebook Markup Language) which implements all of the cool widgets that you use to invite friends to do stupid stuff. So I needed to learn a little about that. I also needed to figure out how I was going to implement the user interface. JavaScript looked pretty handy, so I learned that as well.

JavaScript really is pretty cool. You can do all sorts of programming on the client side, and with AJAX you can even make calls back to the server from within the web page. Without worrying about the Facebook thing, I coded up some JavaScript to render the board in the web page, figure out which cell the user clicked on, then make an AJAX RPC back to the server to make the move. It took a while, but it was sweet. After I got it going I hooked it into the Facebook code, and Facebook said "JavaScript not allowed". They're afraid you'll hack around with there HTML and corrupt the site experience.

Well that was a wasted week! It was fun, but ultimately got me no closer to having a working game. I experimented with many solutions. I knew that Scrabulous used Flash, but Flash is not free and I wasn't particularly motivated to learn it, so I couldn't copy from them. My goal was to do as much work as possible in the client, but as JavaScript wasn't allowed I couldn't see how to do much at all. I probably could have written a Java applet (I mean, I know I could do it, I just don't know whether Facebook would allow it), but even I understand that users don't want to install Java.

This was all complicated by the fact that I couldn't get Facebook to display my images. In fact, I still can't. Any image included in my app has to come direct from my web server - if it goes through Facebook its gets interpreted as text. Yes I'm setting the content type. I still don't understand that one. I have another app in progress using the Django framework and it does the same thing. So I had to solve the client technology problem and the image serving problem at the same time.

The solution I eventually came up with was to generate the board image on the server side, serve it direct from my own machine, into a HTML form, so when the user clicked on a cell it would send me back the (x,y) coordinates of the click. I could then convert that back to a cell on the server side. Nothing at all happens on the client, but at least it seems to work.


I got the game basically working. The code about detecting wins and so on was EASY compared to all of the technology nonsense. The game requires two real players so there's no AI involved. However them I needed to add some of the bells and whistles, for example, notification to your opponent that you've started a game.

That was when the authentication tarrasque bit me. You see, Facebook has this completely sensible system where your page is treated as a form with lots of hidden fields. Some of those fields, e.g. user id, Facebook session id, and so on, come from Facebook and tell you Facebook stuff. Those fields are digitally signed and you use your application secret to check they're kosher. EXCEPT, if you have a form on your page like I do, it sends some of that stuff twice, and digitally signs it twice. So you have to figure out what is authenticated by what signature. I ended up changing minifb to deal with it, because of course I was the first person to use minifb to receive a form submission and nobody else cared that it didn't work.

So after I figured out authentication I was able to get the session key which allowed me to send notifications to the server. At the moment I send a notification only when a game is started, as if your application sends too many notifications in one day your application gets classified as spam. Given the spamminess of many Facebook applications, the fact that they monitor that is a good thing.

Anyway, it's all sort-of working. I need some users to try it out.

http://apps.facebook.com/hexgame/

Please.

Lightning Strikes Twice

Only twice in Unspeakable Words have I played a word worth more than 20 points. Both times I have rolled a 20 so I didn't lose sanity. It's a good strategy if you can pull it off.

Maria, you should get that game.

Monday, December 17, 2007

Another Classification For Games

I've been thinking for a long time about a classification for games that are missing from BGG. It's somewhat underspecified which is part of the problem, but it's to do with the role the game plays in your collection. There will be some consensus on this, which is why it might belong on BGG (like the weight ratings). Particular values of the classification might be:
  • Filler - a light game to be played while waiting for others to finish. Examples - Coloretto, Bluff.
  • Capital game - a serious game that is one of the reasons you play games. Examples - Age of Steam, Domaine.
  • Kids' games - games you mostly want to play with kids. Examples - Gulo Gulo, Bratz Mall Crawl.
  • Gateway games - lighter games you play because your opponents may not see the fun in a 3 hour session of Age of Steam and you don't mind playing them. Examples - TransAmerica, Ticket to Ride.
  • Two player games - games you mostly play because your partner will play them with you. Examples - Lost Cities, Lord of the Rings: the Confrontation.
  • Two player abstracts - traditional abstract games. These get their own category because they can be treated very lightly or very seriously depending on how good you are at them. You might play them against your partner or you may compete internationally. Examples - Chess, GIPF.
Are there other classifications? Be careful not to veer into the realm of BGG categories when thinking of new ones.

There are lots of connections between the classifications. If your partner is Scrabblette for example, two player games and two player abstracts are very closely related. However Asterix and Obelix is plainly in the two player game category. And for a lot of people, gateway games and capital games have very strong overlap.

When I look at my games played tally I think to myself that it's only the capital games that really count - St Petersburg, Amazonas, Trias, Domaine - the games I really love that get me thinking. That's not to say that I don't enjoy the others, but those are the games I'd rather be playing, and I think the amount I enjoy a games session is related to how many of those games I play. The difficult part of course is finding opponents who share the same capital games as you do.

Wednesday, December 12, 2007

New Year's Ambitions... Planning Ahead

Having achieved this year's ambition of getting my Friendless metric up to 1, I've been thinking about what to aim for next year. The ultimate goal of course is to have a game collection that I'm happy with, that fits in my house, and that I enjoy playing, but I really think to achieve that it has to be consciously managed. So, my ambition for next year is to halve the number of games I own that I've played 0 or 1 times.

That can be either by playing them or by dumping them - either way is fine! As I have leave now and not at the beginning of next year I'm making the resolutions now. So the resolution is to decrease my zero plays to 25 and my single plays to 40. Also, I plan to continue to increase my utilisation to at least 55% (currently 47.33%), but that should happen anyway if I achieve the first part.

Yes, gaming by metrics is silly. The art is in designing metrics that encourage good behaviour.

Got a Bit Bored

I'm on leave. Can't you tell? Actually I like jigsaw puzzles, and I thought I recognised the picture in this one.

Sunday, December 09, 2007

Balance of Trade

I had a session this morning where I went through and put some games up for trade, and also added a lot that I would like to receive in trade. If you're in Australia it might be worth checking for trades with me. After sister gets back from Cuba (don't ask) I'll be doing a bit of a cleanout of the trade pile in preparation for a general improvement of the game collection next year.