what exactly is needed for online character storage?
by Richard Preziosi · in Torque Game Engine · 10/05/2010 (8:47 pm) · 5 replies
First off, let me stress that I am not trying to make an mmo. However I would like the ability to save characters to a server. I'm just a little confused on the best methods, the differences between the methods, as well as exactly what needs to be implemented for the databasing. If anyone has any wisdom in this area and would care to share their experiences I would appreciate the info.
#2
Necessities for the easiest case:
1.(Maybe optional) SSL/TLS-enabled web server.
2.A scripting language on said web server.
3.An account system for the scripts. Accept an e-mail, mail the user a password, allow changing from within the game.
4.Make scripts verifying authentication sessions to accept an upload or make available a download with the data in question.
5.Hardcore option: Verify integrity of the data once it's on the server. Either on the fly, or have a background task process the files. Maybe warn players if there are issues.
You can of course also just accept strings with data and store in a database, but a chunk of data in one block is easy enough to label and store without needing a DB. One single file for each character shouldn't have any worse lookup-performance than a database.
A database is only slightly more complicated. Make sure you know how to accept data and sanitise it (PHP has PDO to sort it out for you automatically, and also make it easier to switch database types).
The need for security certificates:
1.For the paranoid, passwords (and other data) are sent encrypted.
2.The certificate has a verification that your server is really yours, and the game can verify this if you want to.
There isn't much work to implement what you want. If using Torque, you can communicate with HTTP objects and just upload character data as a string. A common way to store character data is to just generate a script that will set variables when executed :)
10/05/2010 (9:59 pm)
It doesn't necessarily have to be a database. You could simply ensure you have a compact format and store data as plain old files.Necessities for the easiest case:
1.(Maybe optional) SSL/TLS-enabled web server.
2.A scripting language on said web server.
3.An account system for the scripts. Accept an e-mail, mail the user a password, allow changing from within the game.
4.Make scripts verifying authentication sessions to accept an upload or make available a download with the data in question.
5.Hardcore option: Verify integrity of the data once it's on the server. Either on the fly, or have a background task process the files. Maybe warn players if there are issues.
You can of course also just accept strings with data and store in a database, but a chunk of data in one block is easy enough to label and store without needing a DB. One single file for each character shouldn't have any worse lookup-performance than a database.
A database is only slightly more complicated. Make sure you know how to accept data and sanitise it (PHP has PDO to sort it out for you automatically, and also make it easier to switch database types).
The need for security certificates:
1.For the paranoid, passwords (and other data) are sent encrypted.
2.The certificate has a verification that your server is really yours, and the game can verify this if you want to.
There isn't much work to implement what you want. If using Torque, you can communicate with HTTP objects and just upload character data as a string. A common way to store character data is to just generate a script that will set variables when executed :)
#3
I've tried just about every resource on the site, to no avail. They are either missing files, way too old, or not very informative on how to utalize that functionality that is added.
Is anyone well versed enough with web-server database integration available to pass a few e-mails back and forth with me and maybe help me get a better grasp to get something like this running.
It would be greatly appreciated.
11/03/2010 (11:50 pm)
I'm still struggling horribly with this concept, and honestly have been for the past 5 or so years.I've tried just about every resource on the site, to no avail. They are either missing files, way too old, or not very informative on how to utalize that functionality that is added.
Is anyone well versed enough with web-server database integration available to pass a few e-mails back and forth with me and maybe help me get a better grasp to get something like this running.
It would be greatly appreciated.
#4
Filename: /users/b/blah.data
Data:
passwd:bla
email:bla@example.com
rank:5
....
This can be done with the build in string handling and fileobject. Loading the file when user login and saving on logout and maybe all X minutes when the player is logged in. If you also need to access the data from a website, php also could parse the file or create it for example. This is fast since the data is in ram when player is online and no overhead with handling connections to a webserver or database.
11/04/2010 (12:06 am)
We not just saving the userdata in a flat text file using fileobject ? The file could look likeFilename: /users/b/blah.data
Data:
passwd:bla
email:bla@example.com
rank:5
....
This can be done with the build in string handling and fileobject. Loading the file when user login and saving on logout and maybe all X minutes when the player is logged in. If you also need to access the data from a website, php also could parse the file or create it for example. This is fast since the data is in ram when player is online and no overhead with handling connections to a webserver or database.
#5
I'm working on a MO game atm (for the last 8 months really), we are modifying the engine and stuff as we go, I'd be more than happy to explain to you what I've done. Not saying its the best, but it appears to be working well.
If interested, shoot me an email at vincentgee at Yahoo dot com.
Vince
11/04/2010 (6:44 pm)
Rich,I'm working on a MO game atm (for the last 8 months really), we are modifying the engine and stuff as we go, I'd be more than happy to explain to you what I've done. Not saying its the best, but it appears to be working well.
If interested, shoot me an email at vincentgee at Yahoo dot com.
Vince
Torque Owner Christian S
Oak-Entertainment
you could do flat files, kinda like Xml and have users connect to their folder for grabbing the xml wrapped data.
you could do with a database using odbc or whatever, and have users connect to their table rows for grabbing the cell data.
for the fist one you would only need a server with a logon system and no need for a DBMS/DB. for the second you would need a server with something like sqLite, mySql, Access, MSSQL, or similar heavy storage.