Monday, January 07, 2008

City 17

I've just been playing a lot of Half-Life 2 recently.

Cities, though. They're fiddly things. Ask a guy in Manchester where Arsenal are from, and he'll tell you "London". Ask a guy in London, and he'll probably tell you North London. Or, if he's really specific, Holloway.

Arsenal are a big club, known the world over, so it's fair to say they're from London, just as Everton are known to be from Liverpool, Rosenborg from Trondheim, and so on. They're big clubs in their areas, it's also fair to say that they can take their fans from across the entire city, although of course that's not always true (try finding a Cliftonville fan in Sandy Row in Belfast).

Anyhow, as you go lower in these major cities, especially in countries where the game has many levels, you can often end up with many teams in one league professing to be from one city. This came up yesterday when I was researching the Victorian Premier League in Australia - every team bar the Australian Institute of Sport come from Melbourne.

Melbourne has many parts, and each of the teams represents a particular part. Preston Lions, Oakleigh Cannons, Heidelberg United and so on all represent the areas they're named after. I could split Melbourne up into these constituent parts, but then if I searched for teams from Melbourne, I'd get Victory and Knights, and no-one else. So I figured they'd all be from Melbourne.

That's fairly good, although it does mean that the game would need extra code to stop treating every game as a derby, when they really aren't. It's also at odds with the situation in London.

The English leagues in the game are modelled down to the tenth level. As you drop down as low as level seven in the pyramid, teams from London tend to play in different regional leagues to each other, and the lower you get the more this can be apparent. Obviously, stating that they're all from London means that the clubs would be placed in the wrong divisions, not to mention creating several thousand London derbies each season.

So London is effectively split up in to its constituent areas and everyone's happy until you try to search for London clubs and none show up. Bah. I could try adding the major city to each place name, such as "Fulham, London" but it's not the cleanest of solutions.

I don't know why it took me this long, but I figured if I just add another field to each location in the game that allows me to say it's part of a larger city, it'd solve all problems. Search for teams from London, you get them all. Search for those from Holloway, and you get Arsenal, and if Arsenal turn to poo after Wenger leaves and drop down six divisions, they'll still be in the right place.

This doesn't make you as happy as it makes me, but I don't care.