Saving text file

Saving text file
0.0 0



I’m looking for a way to saving high scores to disk, but I’m not sure the right way to do it. Can I do it directly with javascript code? If not, is there anyway to register a c++ function can call it from javascript code?

I’m quite new to cocos2d so I’m sorry in advance if the answers to these questions are well known.

Thank you!


code with c++ and binding it to js.
you can study js binging with ‘cocos2d_specifics.cpp’


You could use sys.localStorage.setItem/getItem/removeItem to save your game data.