I think they need to be saved server side.
So a typical character would have lots of information saved such as:
location on map
8 years ago
You could use an HTTP server to store the infomation, using PHP and mySQL for a database, or PHP saving to a local file...
but PHP is a server side language it stops running when the browser stops loading the page so I don't see a way to pass variables to php from the browser without a page load event of some kind
And that's where AJAX comes in. :)
8 years ago
Yup, that's what AJAX is about, making occasional requests to the server to update it with information.
The alternative is to use something like Node.JS on the server and use long life connections through socket.io so that you in effect have a continuous connection to save stuff to the server.
So is there a tutorial on exactly how I can send a variable from my game to a server side storage of some kind be it db or json?
because I would think I will have to constantly send put statements somehow. I've really never done anything like that so I don't know what limitations I'll have to deal with. for instance I don't know if I can just send them when a socket is emitted or what...
Page 1 of 1