PGD Home

P-0: Virtual World Concept: Update 3: Databases

by on Jan.29, 2016, under Astral Realms, P-0, Servers and Networking, Spiritus Astrum

I am having some issues connecting the latest version of T3D (3.6) to my mySQL database. I normally use THIS resource, but it seems to lead to very strange .dll loading problems in the latest version of T3D. It seems to work fine with my current machine and compiler on an older version of the engine, however.

Most Torquers now seem to be using SQLite, which is great, and it is apparently very easy to integrate to T3D, but the problem is that SQLite is embedded. This means that it is accessed directly by the application, and does not use a database connection, like mySQL does. This is fine for single player games, where a large amount of data needs to be stored and organised on the client, but for a multiplayer game, SQLite may not work well. Using SQLite in a shared database environment, with multiple users and multiple simultaneous connections, is, from what I’ve read, a great way to get corrupted data. mySQL is really the better choice for this, and if I take the easy way out and use SQLite now, I may have to hurriedly migrate the date to mySQL later, as the user base increases. Data migration like this is never fun, so it’s better to get it right from the start.

After a day or so spent wrestling with it, I eventually decide to implement my own mySQL connector, or, if I cannot do this, revert to version of the engine that I was using previously.

There are a few issues with integrating mySQL with T3D. Firstly, the mySQL c++ connector seems to use Boost (a common, very powerful C++ library). Boost is amazing, it has a lot of advanced functionality, however, it is also huge, and some would say, bloated. Dragging in a boost library for something a simple as a mySQL connector would be foolish and wasteful of resources. I tried to strip out the Boost code, and got it to compile, but I ran into other issues with linking.

There are a few mySQL connectors that I found online, but I am currently attempting to use ODBC to connect to my database. This is going fairly well, if it works, I will post the resource here and on the T3D forums, since I feel mySQL integration capability is essential for any serious games engine.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!