Possibilities to store game data online (sql, ftp)
Posted: Fri Nov 23, 2012 9:24 am
Hi everyone,
this is my first post in this forum, so I hope to put this into the right section.
I'm looking for a nice solution to handle data for an online game. What I mean is a database holding global data like world-statistics and player information (not the general UDP/TCP-thing)
But first some words to my game:
I'm developing a turn based RTS
It is roughly based on advance wars which is a popular game by Nintendo.
What I've done so far is the game mechanics (building and moving units, attacking, terrain-dependent defense, animation, ...)
It is all working fine. There is online multiplayer, too. ;-)
Now I want to expand the game by adding MMO-functionality.
So where will be a big world map, where each player has it's own land (or more of them). If he wants to attack an enemy land, he sends a request and then the players can play online against each other (via TCP).
The winner takes the new land. There will be some restrictions, so it will be hard to manage many lands. I hope I can get some good balancing in there.
So what I'm looking for:
I want to store information about the lands, their ressources and which player currently owns them.
The data is updated after a whole battle. One battle will take around 20 min to 1 hour depending on the size of the map and the player's skills
It would also be nice to store all unit positions and properties after a player ends his turn, so players can save and pause to game during one session. This saving procedure would be called onces every one or two minutes.
The saved data should be accessable by all players.
I wanted to use a SQL-database hosted online, but I can't get the luasql library to work with löve.
I could create a php script and call it via http-request, but I thought there would be a nicer solution.
An other option would be to store everything in an XML-file or lua table and upload it via ftp. But when two players download and modify the file simultaniously, I have to check and merge the changes they did to the file.
Is there a better solution or has anyone figured out the sql thing and can provide the library he used?
Thanx for your effort! When I have some time, I will polish the game a little bit and introduce the current version here on the forums in the near future
this is my first post in this forum, so I hope to put this into the right section.
I'm looking for a nice solution to handle data for an online game. What I mean is a database holding global data like world-statistics and player information (not the general UDP/TCP-thing)
But first some words to my game:
I'm developing a turn based RTS
It is roughly based on advance wars which is a popular game by Nintendo.
What I've done so far is the game mechanics (building and moving units, attacking, terrain-dependent defense, animation, ...)
It is all working fine. There is online multiplayer, too. ;-)
Now I want to expand the game by adding MMO-functionality.
So where will be a big world map, where each player has it's own land (or more of them). If he wants to attack an enemy land, he sends a request and then the players can play online against each other (via TCP).
The winner takes the new land. There will be some restrictions, so it will be hard to manage many lands. I hope I can get some good balancing in there.
So what I'm looking for:
I want to store information about the lands, their ressources and which player currently owns them.
The data is updated after a whole battle. One battle will take around 20 min to 1 hour depending on the size of the map and the player's skills
It would also be nice to store all unit positions and properties after a player ends his turn, so players can save and pause to game during one session. This saving procedure would be called onces every one or two minutes.
The saved data should be accessable by all players.
I wanted to use a SQL-database hosted online, but I can't get the luasql library to work with löve.
I could create a php script and call it via http-request, but I thought there would be a nicer solution.
An other option would be to store everything in an XML-file or lua table and upload it via ftp. But when two players download and modify the file simultaniously, I have to check and merge the changes they did to the file.
Is there a better solution or has anyone figured out the sql thing and can provide the library he used?
Thanx for your effort! When I have some time, I will polish the game a little bit and introduce the current version here on the forums in the near future