Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

8 years ago by ShawnSwander

I think they need to be saved server side.

So a typical character would have lots of information saved such as:
items
experience
stats
location on map

8 years ago by Joncom

You could use an HTTP server to store the infomation, using PHP and mySQL for a database, or PHP saving to a local file...

8 years ago by ShawnSwander

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

8 years ago by Hareesun

And that's where AJAX comes in. :)

8 years ago by Arantor

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.

8 years ago by ShawnSwander

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
« first « previous next › last »