Game Analytics SDK for CraftStudio

Game Analytics is a free analytics service for games that allow to track almost any kind of data and visualize this data using custom charts on their dashboard.

Game Analytics LogoAnaytics and statistics in games are useful in a number of ways :

For instance you can get an idea of the difficulty of a level by tracking how much time players spend on it, or how many time they dye and retry, or if they reach the next level at all. You can also tweak you in-game economics by tracking which items are brought the most (ie: additional levels vs cosmetic assets vs weapon packs). With game analytics, you can actually track data (events) about four topic (categories): design, business, error and user.

Communicating data to the Game Analytics website is fairly simple but not straightforward and there is actually quite a lot of things to be taken care of like making sure the event has the correct fields, the fields have the correct value type, you can access the Internet, etc…

Plus you really want to make the creation of an event as simple and readable as possible.

This is what anSDK is for. It takes care of most of the things and provide a very simple API :

GA.NewEvent( "design", { event_id = "Kill:Shotgun", value = 10, area = "Level2" } )
-- This event for instance tells that the player has killed someone with the shotgun, dealing 10 damages, on the level "Level2".

Analytics can also be used to track simple things like how many unique players the game has and how many sessions have been played.

So I spent a few hours to put together the basics of an SDK for CraftStudio loosely based on the GA SDK for the Corona SDK (which allows to build games for mobiles in Lua).

This is the first version, with basic features like storing events when they can’t be submitted and automatically track scene transitions (and time spent on them), and more…

I haven’t tested it in a real game yet because I don’t have any that is played but that may come in the future.

Fell free to contribute or let me now if you want to use it in one of your game.

Comments are closed.