Tuesday, March 22, 2011

Our current project uses HTTP to communicate with the game server. Part of our code requires some custom metadata to be sent with the HTTP headers down to the client.

Did you know you cannot rely on custom headers being delivered to your HTTP client? I didn't. It turns out some firewalls will only allow a whitelisted set of headers through to their clients, which I imagine will break many different web applications. To get around this, we've had to munge the metadata into the HTTP body, and pass things around with query strings, turning something that was looking rather elegant, into a total abuse of HTTP.

I've just uploaded a package to the Unity Asset store, which allows you to easily source and cache data, in a secure manner, from a Google Spreadsheet!.

It is called GlobalData, and allows you to have truly global data across your game instances. You could use it to provide item stats, character stats or any kind of tabular data to your game, and you can even modify your core data after the game has been released.