Deceth / Battle-City

Build a city, hire a team, drive a tank, orb the enemy! Multiplayer online game.
http://battlecity.org
GNU General Public License v3.0
49 stars 24 forks source link

Convert database from SQLite to MySQL #42

Closed Deceth closed 11 years ago

Deceth commented 14 years ago

This would allow for the game database and website database to be merged which would open up some interesting possibilities on the website such as the ability to browse players, scores, stats, etc..

Also, certain things that would be more difficult to implement in-game could then be done via the website such as profile management & clan management.

Also, same password on game + site would be nice.

Rushing commented 14 years ago

When I first took a peek at the source I wondered why you never did this anyway. MySQL is easier to manage, and easier to operate from a company wide perspecitve. The only downside is that MySQL is far easier to break into, but with the current population, I don't think that's much of an issue.

Now that I've said that, I suppose TECHNICALLY it's harder to break into, but because it's far more widely used, it's more well known how to break into.

Deceth commented 14 years ago

You bring up a good point. SQLite is much simpler than MySQL (With SQLite, there is no setup involved, you start the BC Server and the database creates itself). Switching to MySQL would make it very difficult for people to run their own server unless they know how to setup a MySQL database. The better option is to give the server host the option to use SQLite or MySQL.

Rushing commented 14 years ago

Hm, I guess that's an even idea, however it means quite a lot of programming to change.

Deceth commented 13 years ago

The only way to avoid the programming work is by not using MySQL. =p

If we do decide to work on a version of BC compatible with MySQL, keeping the SQLite functionality isn't a big deal, it just means adding an if/else statement around what's already there so that the right code is used depending on the hosts database options.

Rushing commented 13 years ago

That's exactly what I meant. Not to be offensive, but you're not the sort of person that likes to do a lot of programming work, even if it's something as simple as adding in over nine thousand simple if/else statements.

Deceth commented 13 years ago

Either we speak a different dialect of English, or you've been sent by one of my enemies to cause my brain to implode.

Rushing commented 13 years ago

Probably a bit of both

rileyw commented 11 years ago

Converting the game database from SQLite to MySQL doesn't seem to be justified.

The game server can be set up to broadcast statistics from its game database. This would enable a website to capture this broadcast and use the data as it pleases.

The game server can be set up to point to a website database that manages player and clan data. The game server can poll this reference at set intervals to retrieve the data changes since the last poll.

Authentication between game and website may not be relevant if a central authentication system/server is created (Need an issue created for this idea). Game servers, websites, etc... would use hashes/tokens that identify the authenticated player similar to Google Single Sign-On or Facebook Login.

Deceth commented 11 years ago

I agree, SQLite is being maintained actively, there is no reason to put effort into migrating away.