Hi!
I made this game called Twin Robots:
http://www.thinicegames.com/games/twin-robots
Currently I'm using scoreoid.net for leaderboards, but since they seem to be having problems lately, I decided to switch to a self hosted solution using combu
I have it ready to go live and it's already working great on the latest version of my game (still to be published, the live version is still using scoreoid).
What I'm wondering is if combu can handle lots of concurrent queries... I know this probably depends more on the server capabilities to manage the load but still, I wanted to make sure that there is no limitations on the combu side of things.
I'm using combu like the old arcade machines: in my game, you play through and when you finish a level you can then enter your name and the score is submitted. Since any name is valid (so I can enter "John" and you can enter "John" too), what I do is:
1- Check if that user already exists on the database.
2a- If it exists, I make it login.
2b- If it doesn't exist, I create it and after that I make it login
3- Submit the score to the desired leaderboard
4- Logout
Everything works ok, but it's only me that is testing this right now; I wonder if something would happen when several players around the world try to login all as "John" and submit each their score...
That can be done, right? Multiple people logging in the same user account, I mean.
Sorry for the wall of text!
Pablo.
Hi Pablo, thank you for choosing Combu for your game (gratz, it looks so cool!).
About your question, there's no hardcoded limit in the queries so you can have as many players and scores as you like. By the way of course, as you supposed, it mostly depends on your web server and MySql, they take care of the load.
About your question, yes I think it could bring to some issues if for example two players login with the same account (or register new one with the same username) at the same time, because each login action updates the GUID session token of that account and this will invalidate any further actions on the account with older GUID.
For your situation (no account registration) it would be better to have a leaderboard which accepts anonymous scores, that is without requiring an existing account. If you have time I could implement it along the next week and send an update to the package (I have other couple of changes already made locally and few other requests that I'm currently considering). With this new type of leaderboard (it's matter of just adding a flag "Allow anonymous" to the Leaderboard data) you would be able to send a score together with a name for the anonymous player and will fix the issues you could have with login/register+logout.
FRANCESCO CROCETTI @ SKARED CREATIONS
Oh, reading on this forum I see that each time a user logs in it creates a new session token (GUID), so any other user that was previously logged in and tried to submit a score won't be able to do it.
Is there an easy way to invalidate the use of this GUID?
I've found that on line 152 of CB_Account.php this line:
$account->GUID = uniqid(null, true);
is the one that sets the session token. Can I change that to:
$account->GUID = 0;
and be happy?
Would that allow 2 different players logged in under the same user account submit their scores? Or should I modify something else?
Excluding the use of GUID is not something trivial, because it's used in all web services for security reason. You probably replied before reading my post above, so please read it and let me know what you think.
FRANCESCO CROCETTI @ SKARED CREATIONS
Oh, anonymus scores would be AWESOME!!
I just need to store name + score, and allowing name to repeat.
For example:
1st: JOHN - 100 points
2nd: LANA - 75 points
3rd: JOHN - 25 points
Note that number 1 & 3 can be different players, but they both decided use the same name.
I have to upload this new update in a matter of days so if you can help me find a quick fix (like the GUID=0 one) then great, I'll switch to the anonymus version whenever it becomes available.
It will probably take few hours, so I'll try to implement it tomorrow and will get back to you over here
FRANCESCO CROCETTI @ SKARED CREATIONS
Thanks a lot, you rock!
Sorry, I hadn't time today was too busy, will try at Monday.
FRANCESCO CROCETTI @ SKARED CREATIONS
I just wanted to say, for anyone reading this: I got sent a new version that fixed all my problems. SUPERB support!! Thanks a lot
Great, I'll add those changes to the next release sooner next week with some other new changes from requests (including probably the support of the official Facebook package).
FRANCESCO CROCETTI @ SKARED CREATIONS