Game Development Community

Mysql or other database programs

by Matthew Shapiro · in Torque Game Engine · 05/06/2001 (2:04 pm) · 41 replies

okay well it just dawned on me that i'ts not going to be easy to implement MySql into the engine. I need a protable database like SQL (tha'ts free) but 2 problems came to mind.

1)would i do this in scripts or in the actual engine and if the latter where in the engine... networking?

2)MySQL isn't made for MSVC++..... that could pose a big problem.

*update*

I was thinking of making one which might nto be too hard but i need it to communicate over a network, which might be tricky and i wouldn't know where to put the code.
Page «Previous 1 2 3 Last »
#1
05/06/2001 (2:47 pm)
This would be an in-engine thing. mySql is open-source is it not? so it shouldnt be that hard to port it .
#2
05/06/2001 (6:09 pm)
well the problem is I don't know the difference between MSVC++ and borland's compilers and i don't understand why one compiler likes some code but not the other but i've seen that it's like that. So unfortunatly that means i can't port it...
#3
05/06/2001 (6:58 pm)
>>>
well the problem is I don't know the difference between MSVC++ and borland's compilers and i don't understand why one compiler likes some code but not the other but i've seen that it's like that. So unfortunatly that means i can't port it...
<<<

If you're having problems just porting from one compiler to another, you'll find it darn near impossible to retrofit an immensely complex open source program into your project.

You might find it entirely more educational to skip mySQL, etc. and attempt writing the database engine yourself. It's certainly not going to be fun, but in the long run, you'll learn software development techniques that can carry into virtually any project or job you ever attempt.

My advice is to go to your local bookstore or library and grab a textbook on data structures. (Try "Data Structures: A Pseudocode Approach With C++" by Gilberg and Forouzan.) Then sit down and design a system based on your needs, and implement it.

It's not glamourous, and can be quite painful. But in the end, it's worth it. Welcome to computer science. :-)


Good luck!

D.W. Brown
#4
05/06/2001 (8:53 pm)
Maybe you'll find this page useful:

http://www.mysql.com/downloads/api-mysql++.html

it's c++ API for MySQL and it looks like you have versions for both Borland and VC.
hope this helps.


Yacine Salmi
#5
05/06/2001 (9:11 pm)
Everyone doing an mmorpg ( everyone and their dog ) will probobly need some kind of database system to store game data etc. so this is going to be a problem allot of people will have to deal with. Once the source arives maby a few people would be interested in doing an open-source port to allow mySql conectivity for those who dont have deep pockets or infinate database knowledge.

eeek its late i cant think
#6
05/06/2001 (9:55 pm)
That's good idea.
I know my project will need it. I have limited MySQL knowledge, but I don't think it will be to hard to write an API for the V12 scripting language. we'll see...
#7
05/07/2001 (3:30 am)
Whatever language you choose to use, MySQL _probabbly_ has an API for it. If you are using MSVC++ then you could install the MyODBC (MySQL ODBC Driver) and use that to connect to your MySQL db. If you aren't using that then you can find many solutions at http://www.mysql.com. I hope this helps.

Ryan J. Parker
rjp@awingsoftware.com
www.awingsoftware.com
#8
05/07/2001 (4:06 am)
hehe wow i feel like an idiot. I just saw the site and i must have missed the visual C++ 6.0 part before. Which means i can use MSVC++. anywyas....

*goes in a hole and hides*

:)

Also it's not that I'm having trouble porting it i just don't know the difference in compiling in one compiler to another.
#9
05/07/2001 (5:40 am)
Why doesn't MSVC make windows controls/dialogs as easy to program and use as BCB? I think it is stupid that you have to do so much work to do things in MSVC that you can do in BCB with one line of code.
Any windows based programs(not games) I make I'll probably end up using BCB most of the time.
#10
05/07/2001 (6:38 am)
You might want to look into using oracle. It is free to download the Linux version. It has support for every possible language/compiler out there...

Josh
#11
05/07/2001 (7:16 am)
Keyword linux, most of us wont be developing a game for linux. Isnt their a deal where the development kit is free but you have to pay if you produce something?
#12
05/07/2001 (7:42 am)
You will not need to "port" MySQL to anything. You will just need to use an API for your language/OS you're using. I'm assumming you're going to want to run it on windows. I have never personally run it on windows, just Linux, FreeBSD, IRIX, and Solaris. However, at www.mysql.com/downloads/mysql-3.23.html you can download the latest stable release of MySQL for windows. You can choose to download the binaries or source (I suggest you just download and install the binaries).

If you are accessing this via MSVC++ then you should probabbly use the ADO set. You would use it to open a MySQL ODBC driver to connect to the db. I have little experience with this, I've done most of my MySQL/client program work under *n?x using the C API.

Hope this helps.

Ryan J. Parker
rjp@awingsoftware.com
www.awingsoftware.com
#13
05/07/2001 (12:50 pm)
I'm guessing the easist way to implement MySQL into the engine and have it easy to use would be to add some scripts to the scripting engine to control the mysql commands right?
#14
05/07/2001 (2:34 pm)
Would mySql be realistic for a full-scale mmorpg? Any ideas about what other companies are useing (varient etc. )
#15
05/07/2001 (3:08 pm)
don't quote me but i think other companies are using SQL databases, not mysql tho. UO player shards use ASCII files to store information. To me MySQL seems best cause it's free and it can communicate over a network
#16
05/07/2001 (4:07 pm)
w00t text files!
BTW mySql is NOT free for a commercial product if your going to be includeing the server (if you want to have people host their own mini-servers or something) its about 200$ or so..
this is from the license agreement:

For normal internal use, MySQL costs nothing. You do not have to pay us if you do not want to.

A license is required if:

You link a part of the of MySQL that has a GPL Copyright to a program that is not free software (embedded usage of the MySQL server). In this case your application would also become GPL through the clause in the GPL license that acts as a virus. By licensing MySQL from us under a commercial license you will avoid this problem.
You have a commercial application that ONLY works with MySQL and ships the application with the MySQL server. This is because we view this as linking even if it is done over the network.
You have a distribution of MySQL and you don't provide the source code for your copy of the MySQL server, as defined in the GPL license.


The prices for the licenses can be found here:
https://order.mysql.com/license.htmy.
#17
05/07/2001 (4:23 pm)
....

wow...
this sucks :(

Well guess i'm going to try and develop one myself...

this should be interesting.

anyone know of any other alternatives that are free?
#18
05/07/2001 (4:45 pm)
well mysql is basicly free unless you need to distribute the server and i cant realy think of any reason to do that. And 200 dollars is NOT that much money when you think about developing a db system from scratch . *eewk*
#19
05/07/2001 (4:54 pm)
Text files are free :p

Seriously though, if you keep the file size small, then access is not appalingly slow to them. I'm dure a DB is faster for large ammounts of data, but you cant beat txt files for simplicity :)
#20
05/07/2001 (5:02 pm)
Why would you include MySQL with your game? If you're going to be using MySQL then you need to use it at a server level. Even if you were, for some reason, to include it, just stick a copy of the GPL w/ it and you're FINE. You don't need to pay ANYTHING. That's what's so great about it being GPL. Before, you _had_ to pay if you wanted to use it for any commercial use.

Ryan J. Parker
rjp@awingsoftware.com
www.awingsoftware.com
Page «Previous 1 2 3 Last »