Sign in to follow this  
I Am Legend

Using a web server to hold details of players

Recommended Posts

I'm making a 2d multiplayer game and I'm wondering would it be viable to save the data of the players i.e kills, weapons purchased etc. to a web server which the game client would log in to to get the details?

Share this post


Link to post
Share on other sites
"Web server" is a somewhat broad term. It merely implies that there's a socket that can respond to HTTP requests.

It depends on back-end. A simple static HTML server can't do that.

It's somewhat trivial to achieve this via one of many web application frameworks (I don't know framework-du-jour for this), PHP seems to do the job just fine.

The core you need is session management for user account tracking, and HTTP POST functionality. Servers then handle this data and store, in a file or in a database.

Share this post


Link to post
Share on other sites
thanks for the answer Antheus.

HPlus, if a guy cares enough about a small game to hack it, I must have done something right:). But good point, good encryption should help slow down the speed at which it is hacked

Share this post


Link to post
Share on other sites
Not as much as you'd think. Yes, if it's not obvious from sniffing the HTTP traffic how to formulate your own requests, you've achieved a little bit of security through obscurity (and make sure that, regardless, replay attacks don't work).

The fundamental problem with trusting the client to save things directly to a server, which I think is what you're suggesting, is that no matter how you "encrypt" (be careful with that word!) what's going over the wire, the user can look at exactly what your program is doing to *generate* those messages.

Kevin
Solid Stage, LLC

Share this post


Link to post
Share on other sites
for my 3D engine (jolt-3d.sf.net) im using always MySQL.
The developer has to setup the server in a world-viewed PC (just execution of a single file with 1,2 additional permission sql calls), while clients (your players) will just use the mysql api (libmysql.dll) to perform queries to that server from anywhere. You need ofcourse #include the mysql api in your program, & ship the libmysql.dll with your program.
Im using this & not winsock or such ways because its much easier, mysql is a known system, you dont need tons of programming preparation/or installations etc.etc. and you can (actually, your clients) save/delete/update whatever infos you want them to do.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this