php - Saving files to server in Cocos2d Javascript Game -
i've been struggling while , gave on inpementing sort of savegame option client side cocos2d javascript game (structure based on tutorial http://www.raywenderlich.com/33028/how-to-make-a-cross-platform-game-with-cocos2d-javascript-tutorial-the-platforms .. thx ray .. ) i'm trying find way save xml files webserver while running game, firstly in browser (because seems straightforward way going) , later app can access same webserver.
i have fair idea how generate xml array objects , realise php friend when comes writing xml file disk on server side. i've heard of pal ajax seems have contact details : )
my biggest problem @ moment ajax exampes have found use jquery. realise might simplify cross browser compatibility issues can't fiure out how add jquery functionality js in game (probably stupidly basic or impossible mess bindings, don't know). examples assume doing straight form browser script great.
if jquery no go , have , example of how send xml data in format php?
i'm sure there enough tutorials out there on how hande things there...
if there simpler or better way save savegames locally or on server using cocos2d javascript idea i'd happy hear it.
thx..
edit
i have managed figure out simple answer jquery option (at least when deploying web) include jquery @ top of cocos2d.js file other js files loaded... might not sound option when comes porting iphone though.
sys.localstorage
way save data.
Comments
Post a Comment