Well just today I was randomly inspired to make a demo on a mysql save server, firstly before I get your ideas on this I would like to know if this kind of savefile system is secure or "secure-er" than saving on say the hosts computer.
Personally, I think this type of system is better for editing as I can easily edit a player through phpmyadmin but still I would like some ideas on this and how many of you will actually use this demo.
I am mainly making this for my own use but releasing it as a Demo would be nice, and I know that there are probally many others who have actually released a demo as such.
Thanks for reading this.
Haywire
ID:151902
Oct 25 2008, 6:24 am
|
|
In response to Loduwijk
|
|
Well me being the host, I'm sure I can trust myself :) But honestly I just want to build it due to inspiration and what I really want to know is what people think of the idea, I shoudn't have written about the security as I already knew...more or less about it, but hey more knowledge for me :D
Haywire |
In response to Haywire
|
|
That sounds really neat, you could store your saves on a 24/7 webhosting service that provides mySQL and all save-transfer problems on games with server-side saves would be solved. I didn't know BYOND supported mySQL, otherwise I would probably already have done this myself, but if you throw out a library that does it, you'll save me some work =)
|
In response to CIB
|
|
I believe Alathon has one, Go look :)
-Haywire |
In response to Haywire
|
|
He has two, though I don't get the difference between them. Also, do you think it is possible to store the savefile as a whole in a single text-string or should I create columns for each property? Things like editing saves are no priority for me, if need be, I can code a verb into the game for that.
|
In response to CIB
|
|
Well, Personally I would save each type of data (Name,Level, Class, etc.) in a different column due to it being much neater aswell as being easier to handle.
Saving in one file like "Haywire.4.Mage (Name.Level.Class)" would be OK but it would require more parsing to get the necessary data through. Like: var/data = "Haywire.4.Mage" //it would actually be through mysql_queries but for this example it is a direct assignment. and it would become slightly more difficult, but honestly I would save each stat in a different coloumn for personal reasons. But you choose what is best for you... Haywire |
In response to CIB
|
|
Also here is something I whipped up.
DM Code mob PHP Code <?php Go Test it. Also thanks to Mobius, Crispy that I got that export() function, I have no idea how it works. Infact I may look it up right now! :) Haywire |
In response to Haywire
|
|
Hm, even nicer, I could send savefiles over the network and let the server handle them via a PHP script like this. I never thought of that solution.
|
In response to CIB
|
|
=)
I may aswell make a libary for this, once I make this for my RPG. -Haywire |
In response to CIB
|
|
CIB wrote:
He has two, though I don't get the difference between them. The 'MySQL' library tries to emulate tables with table objects and a centralized way to save and load from the database, including translating variables DM -> MySQL and the other way around (f.ex converting say, a reference to a location into an actual location). Unfortunately, the library ended up being quite annoying to use. When I have time, I'll go back and revise it to be more user friendly - It works well, its just occasionally complicated. SimpleMySQL is more or less what the name indicates - It handles the DBConnection for you, provides an easy way to create queries and automagically handles closing them in the background so you never have to worry about that. It also provides a few text formatting procedures. Ex: var/DBQuery/Q = mysql.CreateQuery() This minimizes human error by preventing the need to actually construct the strings yourself. Normally you'd need to check whether the DBConnection was active, then create the query, Execute() a query and then Close() it afterwards and delete the query object (or write a system to re-use it). SimpleMySQL either operates by deleting queries after a timeout period, or re-uses a list of queries as they're available so you aren't constantly creating and deleting queries. |
The sql database would be on "the host's" computer, just a different host's computer (at least, from what you're saying sounds like, but it could very well be on the same computer). As long as no data is routed through the clients' computers, security is the same whether the sql server is the same machine as the rest of the game or not.