Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (blaurock), 750 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Connect to SQL Database? #325447
05/26/10 17:34
05/26/10 17:34
Joined: May 2010
Posts: 4
Pennsylvania
L
Laurentius Offline OP
Guest
Laurentius  Offline OP
Guest
L

Joined: May 2010
Posts: 4
Pennsylvania
Hello everyone.

I admit that I am very new to 3dgs and am building my first application. I have extensive SQL programming experience (MSSQL) and was wondering...

1) can lite-c and A7 manage all of the data needing to be saved by a character (i.e. rpg player inventory, skills, preferences) or should I connect to a database application?

2) if a database appplication is the answer, while I prefer Microsoft SQL Server, what are my database alternatives? I believe I would need a full functioning db.

3) and, where can I find drivers, connection string formats, etc identifying how to connect to the database from lite-c?

Thank you in advance for any assistance.

Re: Connect to SQL Database? [Re: Laurentius] #385038
10/11/11 22:47
10/11/11 22:47
Joined: Feb 2010
Posts: 1
Pennsylvania, U.S.A.
E
Eyesgood Offline
Guest
Eyesgood  Offline
Guest
E

Joined: Feb 2010
Posts: 1
Pennsylvania, U.S.A.
I too am looking for the answers to these old questions. Does anybody know?

Re: Connect to SQL Database? [Re: Eyesgood] #385053
10/12/11 06:55
10/12/11 06:55
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
1) You can save all these in your self file-format or you can use sql,xml etc.
Point here is if your game is an online game or a single player game. For a single player game saving data on a remote server is not really a good solution, nor running a server on user's machine.

2) If you really need to use SQL, use one of the libraries that do not require a server to be running, like SQLite or MS Access.

3) you need plugins to use a SQL server, connection string is more like .net thing, f.i. in MySQL or SQLite you do not use connection strings. For MySQL you pass your server's ip,username and password to a function then you select a db with another function. For SQLite you only need a filename, there is no server to connect to.

There are other things to consider when using a SQL server from your games. First, a note, I am going to name game's main executable where players run to play the game as "Client". You do not want to directly connect to your database or db/server from your client. If you do that you have to provide your username/pass/connection string either in your code, hard-coded, or in a config file which is not really healthy for your server's security. If a local database on the player's machine is sufficient for your needs, use SQLite. SQL syntax is not much different from MSSQL. If not, you need a "game server" for your problem. The function of the game server is to get data from clients and connect to database then store that data there. This way you can validate the incoming data on game server and do not expose your database credentials in your cliet.


3333333333
Re: Connect to SQL Database? [Re: Quad] #387465
11/19/11 00:34
11/19/11 00:34
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline
Member
DestroyTheRunner  Offline
Member

Joined: Aug 2007
Posts: 286
Hi, taking advantage of this post since it is about a same problem i ran through.

I have a kind different idea in my game, I have an old A6 standard version, and I was wondering if there is any plugin that could make my game connect to a mysql database that is hosted on the web and retrieve some information from there, every 15 minutes.(just as an example)

just for explain it better, my game is a mix of single player with multiplayer game, but there´s no 'real time server' for it, so the client kinda feeds the mysql webserver with information every 15 minutes. (this all is just an example!)

Anyway, is there any way?

Thanks and sorry for using someone elses post. frown

Re: Connect to SQL Database? [Re: DestroyTheRunner] #387479
11/19/11 16:00
11/19/11 16:00
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Again rather than connecting to db from user's machine you can use a php script that clients make calls to. Since its a webserver your server probably has php support. Besides using mysql from php should be much easier than usin it on a6 wdl. How are you going to connect to that php page is whole another questin. Still it will be easier and safer than using mysql directly on clients. How would you do that in a6 standart? i do not know if that version supports plugins but if it does you need a http plugin.


3333333333
Re: Connect to SQL Database? [Re: Quad] #387482
11/19/11 16:38
11/19/11 16:38
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline
Member
DestroyTheRunner  Offline
Member

Joined: Aug 2007
Posts: 286
actually it supports, somebody just remind me about the peacekeeper's GSHTTP-plugin. I never used it, but i think i can work something out with that.
I don´t know why but still would preffer making the client connect directly to the mysql database, inside the game, he would just put his username and password and thats it!
Like combat arms or any mmorpg that we see in this days, in my case is just for downloading info.

thanks laugh

Re: Connect to SQL Database? [Re: DestroyTheRunner] #387485
11/19/11 17:28
11/19/11 17:28
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: DestroyTheRunner
Like combat arms or any mmorpg that we see in this days, in my case is just for downloading info.

This is definitely NOT the common case and NO MMORPG does this! This is a HUGE (and I mean really huge!) security risk since you knowingly build an attack vector right into your application! Everyone, really everyone, will be able to sniff what you talk with the database, the password, the username etc. And sorry if this is wrong now, but I assume that even if you would use HTTPS you would either never validate the certificate and/or validate it wrong (eg. trust every root certificate) resulting in easy to do man in the middle attacks giving you no security at all.

Please, consider that your users are trusting YOU with THEIR data, assuming that you are able to deal with this correctly. What you are trying to do is virtually spitting every single customer in the face and then laughing at them. Do you really want to do this? Do you want to be treated like this as a customer?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Connect to SQL Database? [Re: WretchedSid] #387487
11/19/11 18:10
11/19/11 18:10
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline
Member
DestroyTheRunner  Offline
Member

Joined: Aug 2007
Posts: 286
The example given was only to illustrate how the player would 'connect' to his account, through inside the game.
My initial thought was not to use anything between the database on my webserver and the program(game) itself (besides the plugin which contains the funcion to propper conection).
It would be just like going to hotmail.com put your username and password.
Was just to illustrate.

And since its just a prototype game, that the database only holds the players score and download new missions or messages that I´ll feed the database. Nothing fancy or personal info.

I never got too deep inside security in web applications but now that you told me that, so how ANY game or app that connects to a server only to know if there is or not a update or a simply 'hi webserver I have just logged in, bye' ?

Re: Connect to SQL Database? [Re: DestroyTheRunner] #387516
11/20/11 03:10
11/20/11 03:10
Joined: Dec 2009
Posts: 128
China
frankjiang Offline
Member
frankjiang  Offline
Member

Joined: Dec 2009
Posts: 128
China
you can development dll about ms asscee to save data


development 3d game is interesting!
Re: Connect to SQL Database? [Re: DestroyTheRunner] #387533
11/20/11 11:35
11/20/11 11:35
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: DestroyTheRunner
The example given was only to illustrate how the player would 'connect' to his account, through inside the game.
My initial thought was not to use anything between the database on my webserver and the program(game) itself (besides the plugin which contains the funcion to propper conection).
It would be just like going to hotmail.com put your username and password.
Was just to illustrate.

Its not like hotmail.com, its like going naked on the street with your hotmail credentials tattooed in large bold letters on your skin! Really, everyone can read the database credentials and most people on this planet a able to at least send "DROP TABLE quests" to an SQL server!

Originally Posted By: DestroyTheRunner
And since its just a prototype game, that the database only holds the players score and download new missions or messages that I´ll feed the database. Nothing fancy or personal info.

It doesn't matter if its a prototype, this won't stop people from either dropping your tables at random and/or altering the rows at random.

Originally Posted By: DestroyTheRunner
I never got too deep inside security in web applications but now that you told me that, so how ANY game or app that connects to a server only to know if there is or not a update or a simply 'hi webserver I have just logged in, bye' ?

No App connects directly to the database but to a webserver that does the database transactions for you, the webserver does a sanity check on any input and makes sure that no app tries to do something that it shouldn't.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1