m. c. de marco: To invent new life and new civilizations...

Tools for Sorting Games at BGG

My BoardGameGeek sorters started with a geeklist sorter, inspired by the lack of geeklist sorting at BoardGameGeek. It later expanded to a family sorter, a collection sorter, and a general thing sorter. The geeklist and family sorter take the corresponding ID from BGG and give you a sortable list of the stuff on that geeklist or in that family, but sort options are restricted to the information that comes back to from the BGG API.

From there you have the option to pass your results to the thing sorter, which can sort by rank, ratings, and many other factors. The collection sorter has most sort options turned on from the start (you start with the collection owner’s username), because there’s a lot of information in the API response for collections. You can still pass IDs to the thing sorter if you like.

The code calls the BGG API for XML data and makes it pretty using XSL—an ancient, forgotten browser technology (but it still requires a relatively recent browser because I didn’t feel like supporting IE 8). The processing mostly happens client-side, except for a local CORS proxy on my server to work around BGG’s CORS misconfiguration. Feel free to use the proxy for your own BGG projects; view the source for more details.

Images are currently not returned in some cases where they once were because of a change to the BGG site: the image ID returned in the old XML API is no longer sufficient to hotlink a BGG image because the images have moved to semi-random URLs. The thing sorter retrieves images.

CardPen

I learned about the BGG API while making a tool, CardPen, for printing card (and other) games. It can turn your BGG game collection into a deck of cards, among other things.