*overhauling for cocos2d-x client