This is the cloak game framework's client slightly modified to be used with browserify