Asynchronous MySQL++ for T3D ?
by Andy Hubbard · in Torque 3D Professional · 10/16/2009 (4:17 am) · 7 replies
Hi all,
Has anyone ported this resource (www.garagegames.com/community/resources/view/16861) to T3D? I am giving it a go but have hit compile problems which I think are due to my compiling parameters. Perhaps the way I am setting the code generation for the various projects. I am using VC2008 express.
I downloaded mysql++ from tangentsoft.net/mysql++/ (version 3.0.9) and am linking to source from mysql 5.0.86
If anyone has managed to get this ported and can help me with some sort of walk through I would appreciate the guidance.
Cheers,
Andy
Has anyone ported this resource (www.garagegames.com/community/resources/view/16861) to T3D? I am giving it a go but have hit compile problems which I think are due to my compiling parameters. Perhaps the way I am setting the code generation for the various projects. I am using VC2008 express.
I downloaded mysql++ from tangentsoft.net/mysql++/ (version 3.0.9) and am linking to source from mysql 5.0.86
If anyone has managed to get this ported and can help me with some sort of walk through I would appreciate the guidance.
Cheers,
Andy
#2
07/27/2010 (7:23 pm)
If you don't need a central mysql server you might check out the mysqlite resource.
#3
07/27/2010 (7:47 pm)
I used this: http://www.torquepowered.com/community/resource/view/9656
#4
We even considered selling it as a addon to Torque3D. It works great in our mmo project.
07/27/2010 (8:17 pm)
I've created a piece to integrate MSSQL, MySQL, Oracle, Postgresql, etc with TorqueScript and C++ that works great.We even considered selling it as a addon to Torque3D. It works great in our mmo project.
#5
07/27/2010 (9:31 pm)
Your MMO client talks directly to the database server?
#6
AFAIK the recommended practices are to have a server-side application talk to the database, and the clients talk to that application. That application can then validate the transaction requests made form the clients, ideally via very high level abstractions as to prevent cheating.
REALLY BAD MMO EXAMPLE:
REASONABLY SAFE MMO EXAMPLE:
07/27/2010 (9:41 pm)
Isn't it a bit dangerous to have an application make direct queries to a remote database like that? Anyone willing to create a cheat program would be able to gain total access to the database once they figure out how the game connects to it or inject their own code in it. They could then modify, create and delete any information on the database.AFAIK the recommended practices are to have a server-side application talk to the database, and the clients talk to that application. That application can then validate the transaction requests made form the clients, ideally via very high level abstractions as to prevent cheating.
REALLY BAD MMO EXAMPLE:
Quote:Alice wants to buy an item from a shop. The game client checks which store Alice is in and queries the database for the available items and their prices and presents them on a GUI. When Alice selects an item, the game client checks if Alice has enough money to buy the item, and if so tells the database to add that item to Alice's inventory and withdraw the money from her funds.In the above example, there are several ways one could hack the game it isn't funny. A modified client could send a database query for any store in the game, regardless of Alice being physically inside it, skip the funds check and add the item to Alice's inventory without withdrawing funds. Also, if the store items are listed by their item type IDs, Alice could add whatever item to her inventory at any time just by knowing their IDs.
REASONABLY SAFE MMO EXAMPLE:
Quote:Alice wants to buy an item from a shop. The game client requests the list of items from the server. The server checks Alice's current location (which is stored in a fast volatile database) to see which shop she's in (if at all). The server then queries the database for the items in that store, and sends them to the client which then displays them in a GUI. When Alice selects an item form the GUI, the client sends the server a command telling the index of the item in the shop she wants to buy (not a global item ID). The server will then check which item that is and its price, verify if Alice has enough funds to buy it and if so, it will add the Item to Alice's inventory and send a message back to the client telling it that the purchase was successful.In the example above there's little room for hacking. Alice cannot shop outside from a store: the server knows where each player is. Alice can also not shop items that are not in the shops's list, neither skip the funds check. And finally she cannot add items directly to her inventory, since she has to go through the shopping sequence first.
#7
09/01/2010 (10:46 pm)
I remember going over this in school right before summer(MMO Design was my last class *Saddness*), but I suppose if he was just testing it's not a bad way to take a layer out of the process, or would this create more problem along the way trying to add it back in later on?
Torque Owner Vince Gee
WinterLeaf Entertainment