yea i know, but initially i was wondering if you disconnect a village and try reconnecting it to a new google account, will it get you two identical bases on two separate google accounts or simply give you an error.
Now like Aananth said, if it stays disconnected when you do that, then most likely there's also a file somewhere on the local device that has the account info saved, either that or the disconnect button does not actually work anymore as soon as the village is attached.
Getting a bit more technical, in server there is some kind of database holding all the villages and info related to them.
One way to think about the database is as a table. So a village would look something like:
Name Level Clan GameCenter ID Google+ AwesomeVillage 300 AwesomeClan mygamecenterid myemail@gmail.com
For each village there only one cell for Google+. Thus it would be impossible for the database to even hold two Google+ accounts for the same village (at least without modifying the database layout).
What happens in client is irrelevant. The server is the one calling the shots (since the client could be potentially "modified").
Now it is true that the client holds something (besides GameCenter ID or Google+ account) locally which identifies the currently loaded village, and using that identification it can ask the server for the info about the village (this way all devices with same village stay synched). That identification would also need to be stored in database as well (an extra column in the above table).
Last edited by Yoyobuae; September 9th, 2015 at 04:23 PM.
lol yes, being in IT for nearly 10 years does allow me to learn a thing or two about the relation between servers and clients.
simply put. what I wanted to know was, whether or not there's a way for the server to tell if a disconnected local village has been attached to any G+ or GC account when the village requests to connect to a new account. If the server is able to, that means there has to be a unique ID# for each village created. OR, there's a file on the local device containing the account info - so the local game refuses to connect to a new account, which is obviously not secure as it can be easily altered. therefore i doubt it's the latter case.
Now if there's a unique village ID, when is the ID generated? I'd assume it's auto-generated when the village is created. So when you connect a village to a new google account, the game sends the unique village ID to the server, server searches for the ID through the database, if there's a match, the server will reject the connection. if it returns false, it will attach the village to the account, assuming the account is new and clean.
EDIT: now my question is... is the ID encrypted?![]()
Last edited by x0pht; September 9th, 2015 at 04:59 PM.
lol yea but actually if you think about it... all it could happen would be that the users would be able to start a mini without having to level it up.
The ID is generated on the client side, so whatever the algorithm is, it involves only the info on the client. e.g. uses MAC addresses on the wireless adapters as a part of the calculation. (EDIT: well it could get info from somewhere else instead of just the local device, but that would defeat the purpose of generating a unique ID). so technically, h@ckers wouldn't be able to re-generate the same ID without knowing certain specifics about the devices on which the village was created, even if they knew the algorithm.
Now let's say, they did get the unique ID, for the sake of argument. They create a lvl 1 rookie village, alter the ID with an existing one, and they will still fail to attach it to any account.
Last edited by x0pht; September 9th, 2015 at 05:26 PM.
I would be very surprised if that were the case.
The ID is almost certainly generated on the server side.
Whenever you start a "clean" Clash of Clans on your device, it will request an ID from the server, almost certainly at the point where it asks for your chief name. Prior to that, your new village will only exist on your device, and would restart from scratch if you left the game and restarted.
BTW, I just started my 2nd mini last night![]()