Game Maker Community YoYo Games

Welcome Guest ( Log In | Register )

> Advanced Users Forum Rules

This is a Q&A forum for advanced GML users ONLY. Moderators will remove inappropriate topics. Make sure that you READ these rules prior to posting: Advanced Users Forum Rules

 
Closed TopicStart new topic
Mysql, ** Old Experts Topic **
chagy
post Nov 18 2003, 08:47 PM
Post #1


GMC Member
Group Icon

Group: GMC Member
Posts: 2
Joined: 1-November 03
From: Ankara-Turkey
Member No.: 1235



is it possible to make a DLL and connect to mySQL from Game Maker?
i dont think it would be possible to connect mySQL directly with scripting in gm...



edit: ops wrong board sad.gif

This post has been edited by xot: Apr 13 2008, 06:32 AM
Reason for edit: ** Old Experts Topic **
Go to the top of the page
 
+Quote Post
Haxor
post Nov 18 2003, 10:22 PM
Post #2


GMC Member
Group Icon

Group: GMC Member
Posts: 31
Joined: 2-November 03
Member No.: 1382



Yes it is very possible with a tool called MySQL++. And programming for MySQL in C++ is also very easy. The only problem is, as far as I can tell, you must buy a license to distribute a DLL using MySQL++, which costs a lot of money. I'm not sure, since their statement is a little ambiguous and they never emailed me back when I asked them about it.
Go to the top of the page
 
+Quote Post
chagy
post Nov 18 2003, 11:08 PM
Post #3


GMC Member
Group Icon

Group: GMC Member
Posts: 2
Joined: 1-November 03
From: Ankara-Turkey
Member No.: 1235



hmm then its possible to connect mySQL from gm like java huh
but java has its own mysql-connector plug-in ...
well i think i could make a DLL for it if i had delphi...

so i guess nothing is impossible except skating thru revolving door tongue.gif
Go to the top of the page
 
+Quote Post
EricDB
post Nov 19 2003, 12:54 AM
Post #4


Eric Burgess
Group Icon

Group: Retired Staff
Posts: 929
Joined: 6-November 03
From: University of Iowa
Member No.: 1658



I did a little bit of web reading on this. There is a DLL distributed with MySQL called libmysql.dll, that allows you full access to the API. The only problem with using it in GM is that it expects a lot of structs and other datatypes that GM doesn't support directly.

There is also a Delphi interface to libmysql.dll that might be a good area to check out. Using Delphi and this wrapper, it may be possible to expose some functions to GM that wouldn't require complex data types.

To Haxor: I wouldn't worry too much about licensing issues with dll distribution. Is your game going to require that they download and install MySQL in order to play? I think something like this would be more suited to a dedicated server than distribution to end users.

Edit: Oh, I forgot you can connect to a MySQL server over the internet. Never mind.

This post has been edited by EricDB: Nov 19 2003, 06:29 AM
Go to the top of the page
 
+Quote Post
Shadow of the Mo...
post Nov 19 2003, 02:24 AM
Post #5


The Immortal One


Group: Banned Users
Posts: 77
Joined: 4-October 03
From: Ohio, USA
Member No.: 45



PHP scripts can access a MySQL database, and Game Maker can run scripts on webservers with the execute_shell() function. Just install the scripts on the server and call them from your game. No DLL nescesarry.

Reading would be a little more difficult, but doable.
Go to the top of the page
 
+Quote Post
GreenDragon
post Nov 19 2003, 03:24 AM
Post #6


GM Helper
Group Icon

Group: GMC Member
Posts: 1
Joined: 10-November 03
From: Someplace
Member No.: 1863



If they are goin to have to download MySQL then you can just use the command line MySQL program since it returns values and GM can handle that.
Go to the top of the page
 
+Quote Post
Haxor
post Nov 19 2003, 10:49 PM
Post #7


GMC Member
Group Icon

Group: GMC Member
Posts: 31
Joined: 2-November 03
Member No.: 1382



QUOTE
PHP scripts can access a MySQL database, and Game Maker can run scripts on webservers with the execute_shell() function. Just install the scripts on the server and call them from your game. No DLL nescesarry.

Reading would be a little more difficult, but doable.


This is, however, very insecure and practically opens your database to anyone who wants to mess with it.
Go to the top of the page
 
+Quote Post
Shadow of the Mo...
post Nov 19 2003, 10:55 PM
Post #8


The Immortal One


Group: Banned Users
Posts: 77
Joined: 4-October 03
From: Ohio, USA
Member No.: 45



QUOTE (Haxor @ Nov 19 2003, 05:46 PM)
QUOTE
PHP scripts can access a MySQL database, and Game Maker can run scripts on webservers with the execute_shell() function. Just install the scripts on the server and call them from your game. No DLL nescesarry.

Reading would be a little more difficult, but doable.


This is, however, very insecure and practically opens your database to anyone who wants to mess with it.

How is it any different than a web page that uses PHP scripts?
Go to the top of the page
 
+Quote Post
Richard
post Nov 19 2003, 11:40 PM
Post #9


Retired Staff
Group Icon

Group: Retired Staff
Posts: 1204
Joined: 4-October 03
From: Cambridge, England
Member No.: 17



Does a web page using PHP scripts to work with a MySQL database usually provide an easily accessible URL via which anyone can have the script update the database? Your game would have to pass the script some information for adding to/editing/removing from the database, and anyone could easily pass their own information.

That's assuming the game wasn't passing the script the username and password. If it was, it'd obviously be even more insecure.


Richard
Go to the top of the page
 
+Quote Post
Haxor
post Nov 20 2003, 12:21 AM
Post #10


GMC Member
Group Icon

Group: GMC Member
Posts: 31
Joined: 2-November 03
Member No.: 1382



And I'd add .. it's relatively simple to find what page your game is accessing. execute_shell() opens a new IE window. DT's browser embedding DLL would be a more secure method, but again simple to find out through I.E.'s history or with a packet sniffer.
Go to the top of the page
 
+Quote Post
Guest_Kristoffer_*
post Dec 13 2003, 10:45 AM
Post #11





Guests






QUOTE (chagy @ Nov 18 2003, 11:05 PM)
well i  think i could make a DLL for it if i had delphi...

I think you can get Delphi Personal Edition for free if you search the web.
You can also get it in computer magazines.
Go to the top of the page
 
+Quote Post
neonsoulstealer
post Dec 16 2003, 07:08 AM
Post #12


username
Group Icon

Group: GMC Member
Posts: 78
Joined: 4-October 03
Member No.: 15



You don't need a DLL. MySQL tables and libraries are largely based on Perl, so I would learn Perl before going foward.

EDIT: Wait, what do want MySQL for anyway?

This post has been edited by neonsoulstealer: Dec 16 2003, 07:09 AM
Go to the top of the page
 
+Quote Post
Brocky
post Apr 12 2006, 06:47 AM
Post #13


GMC Member
Group Icon

Group: GMC Member
Posts: 5
Joined: 12-April 06
Member No.: 47936



Smarty has a dll for connecting to a mySQL database
http://forums.gamemaker.nl/lofiversion/index.php/t33363.html

i think there is a newer version of this somewhere in the 'Extending Game Maker: DLLs, Scripts, and Libraries' section.
Go to the top of the page
 
+Quote Post
39ster
post Apr 12 2006, 06:56 AM
Post #14


GMC Member
Group Icon

Group: GMC Member
Posts: 916
Joined: 9-October 03
From: Sydney, Australia
Member No.: 234



QUOTE (Brocky @ Apr 12 2006, 04:47 PM)
Smarty has a dll for connecting to a mySQL database
http://forums.gamemaker.nl/lofiversion/index.php/t33363.html

i think there is a newer version of this somewhere in the 'Extending Game Maker: DLLs, Scripts, and Libraries' section.
*

What the hell? This topic is over 2 years old? Why would you do that?
Go to the top of the page
 
+Quote Post

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd November 2009 - 11:53 AM